Welcome to the i3ci Push weblog

December 9, 2008
by Lee Spector (lspector)

Push is a programming language designed for evolutionary computation, developed by Lee Spector in collaboration with many others including Alan Robinson, Jon Klein, Chris Perry, Maarten Keijzer, Bill Tozier, and Thomas Helmuth.

The official page for Push, with links to documentation and software, is http://hampshire.edu/lspector/push.html.

This i3ci weblog was created to post project updates and to facilitate communication among people working on Push. Let me know if you want author privileges. There is also a (very lightly used) Push email list.


Clojush updated to Clojure 1.3

March 25, 2012
by Lee Spector (lspector)

Among many other updates since the last post here (see the github commit logs for details) Clojush now works with (and indeed requires) Clojure 1.3. See https://github.com/lspector/Clojush


Many Clojush updates on github

February 18, 2012
by Lee Spector (lspector)

This is just a note to say that although no notices about Clojush updates have been posted here in a while, many updates have been made. See the commit history at https://github.com/lspector/Clojush for details.


ScalushGP (in Scala) and RushGP (in Typed Racket)

November 12, 2011
by Lee Spector (lspector)

Thanks to Luke Vilnis, there are now versions of Push and PushGP in Scala (ScalushGP) and in Typed Racket (RushGP).


Clojush source control and string stack

November 12, 2011
by Lee Spector (lspector)

I’ve just pushed to github a new version of Clojush that adds a string type/stack (added by Tom Helmuth). This is also the first Push push (!) under a new collaborative source control regime within the lab. Expect more rapid updates in the near future, and possibly some other changes in project management.

20111104: - Added string stack and a variety of string stack instructions.
          - Added two example pushgp runs that use the string stack in
            the file examples/string.clj.

 


Clojush project shuffle and minor updates

September 11, 2011
by Lee Spector (lspector)

I’ve switched my Clojure working environment from Eclipse/Counterclockwise to Clooj/Leiningen (these tools are available from https://github.com/arthuredelstein/clooj and https://github.com/technomancy/leiningen), and in the process the project structure has been recreated, a bit differently, and with some other changes made simultaneously (details below). Available as usual from: https://github.com/lspector/Clojush

20110911: - Switched from Eclipse to Clooj/Leiningen for development and
            rearranged the project for this.
          - Added calls to end of all example files.
          - Examples can be run from the OS command line (assuming
            that leiningen is available) with calls like:
              lein run examples.simple-regression
          - Added local-file dependency and used file* for file access.
          - Removed ant and tagged-ant examples because of bugs related
            to confusion of push interpreted states and ant world states.

Mackey-Glass, Pagie-Hogeweg, dynamic problems, and more (from Kyle)

August 9, 2011
by Lee Spector (lspector)

Kyle Harrington has contributed a bunch of new goodies to Clojush. Available as usual from: https://github.com/lspector/Clojush

20110809: - Several additions/enhancements by Kyle Harrington:
            - Converted problem-specific-report to a parameter in pushgp.
            - Added reporting of program repeat counts in population.
            - Added "error-reuse" parameter to pushgp for use in stochastic
              and dynamic problems (for which reuse would be turned off).
            - Added examples/mackey_glass_int.clj, a symbolic regression
              problem as described in Langdon & Banzhaf's 2005 paper
              (citation in file).
            - Added examples/pagie_hogeweg.clj problem, a difficult
              symbolic regression problem when coevolution is not used.
              Introduced by Pagie & Hogeweg's 1997 paper (citation in file).

Fixes and traces

August 9, 2011
by Lee Spector (lspector)

Several recent changes to report to Clojush, which is available as usual from: https://github.com/lspector/Clojush

20110629: - Fixed abbreviate-tagged-code-macros printing of empty lists.
          - Added seq condition to walklist to permit walking of seqs that
            aren't actually full-fledged lists.
20110702: - Several fixes/refinements to tagged-code macros:
            - Fixed incorrect no-op of arg-free calls with empty tag space.
            - Added :additional_args to tagged-code macro structure; the
              value should be a list of items and these will be executed
              in order before calling the macro's instruction.
            - Added optional 5th arg to tagged-code-macro-erc; this should
              be a function of zero args that will be called to produce
              the value of :additional_args (e.g. if you want to have one
              random integer arg then you could specify a 5th arg of
              (fn [] (list (lrand-int 101))).
            - Changed format produced by abbreviate-tagged-code-macros to
              handle :additional_args and to be slightly more concise.
20110714: - Added "trace" argument to eval-push and run-push. If this is
            true then the resulting state will map :trace to a list of
            executed instructions and literals, in reverse order of
            execution. If the argument is :changes then instructions that
            have no effect on the state will be excluded.

Tagged-code macros, bug-fixes for examples, and other minor Clojush updates

June 24, 2011
by Lee Spector (lspector)

There have been a couple of Clojush updates since my last post here, with the most significant being tagged-code macros for facilitating the manipulation of code within the tag space (taking arguments from the tag space and then tagging results). Details are in the update comment below.

Available as usual from: https://github.com/lspector/Clojush

20110618: - Switched to Kyle Harrington's version of overlap; it's more clear,
            possibly faster, and may fix a hard-to-trace bug that cropped up
            in a long evolutionary run (?).
20110624: - Replaced lawnmower and dsoar examples with bugfixed versions
            (thanks to Kyle Harrington).
          - Added namespace and made miscellaneous other changes to
            clojush-tests.clj.
          - Added support for tagged-code macros. Tagged-code macro calls
            have the effect of code instructions, but they take their
            code arguments from the tag space and they tag their code return
            values. They are implemented as macros to leverage the existing
            code instruction set; note that this means that a single call
            will contribute more than one iteration step toward the
            evalpush-limit. Tagged-code macros appear in programs as hash maps
            that map :tagged_code_macro to true, :instruction to a code
            instruction, :argument_tags to a sequence of tags to be used
            to acquire arguments, and :result_tags to a sequence of tags
            to be used for tagging results. Execution of a macro expands
            the needed code onto the exec stack to grab arguments from the tag
            space and push them on the code stack, execute the code instruction,
            and tag results. Note that results will also be left on the code
            stack if global-pop-when-tagging is false. Conceptually, tag values
            are "baked in" to these macros in much the same way that tag values
            are "baked in" to the instruction names for stackless tag
            instructions; we use hash maps simply because there is more
            information to bake in and this prevents us from having to parse
            the names (which would get messy and also waste time). Because
            the maps make it difficult to read programs, however, a utility
            function called abbreviate-tagged-code-macros is provided to
            produce copies of programs with more human-readable (but not
            currently executable) representations of tagged-macro calls.
            A tagged-code-macro-erc is provided to generate random tagged-code
            macros in pushgp runs. A new example, codesize20, provides
            a simple demonstration of the use of tagged-code macros.

Overlap

June 7, 2011
by Lee Spector (lspector)

Overlap is a new measure of the similarity of possibly nested data structures.

Footnote: I think it’s new; let me know if you think otherwise! Also let me know if you think this should have a different name; I had a half dozen candidates and “overlap” was my favorite of those, but there may well be a better one.

Overlap can be applied to many kinds of data including Push code and symbolic expressions of the kind used in Koza-style genetic programming systems. Unlike many of the code similarity/difference measures described in the genetic programming literature overlap is not directly tied to any specific syntax or semantics or to any specific notion of “editing steps.” It deals with changes to list lengths, nesting level, and ordering in ways that reflect both what changes and what does not change in such transformations. That said, no similarity measure will be perfect for all applications, and I make no such claims about overlap. But overlap does have the following nice features:

  • Broadly applicable.
  • Handles arbitrary transformations in reasonable ways.
  • Easy to describe and to compute.
  • Ranges from 0 (for entirely distinct inputs) to 1 (for identical inputs)

Overlap is defined in terms of the collections of the items contained in each of the arguments, including nested items at all levels. For example, if x is (a (b c)) then Items(x) will contain the following five items: a, b, c, (b c) and (a (b c)). Within this context we define:

Overlap(x, y) = the maximal number of simultaneous, disjoint pairings by identity of items in Items(x) with items in Items(y), divided by the size of the larger of Items(x) and Items(y).

Following are some examples, produced by the new overlap-demo function in Clojush (see below):

a , () --- float overlap: 0.0
a , a --- float overlap: 1.0
a , b --- float overlap: 0.0
a , (a b) --- float overlap: 0.33333334
a , (a a) --- float overlap: 0.33333334
(a) , (a b) --- float overlap: 0.33333334
(a b) , (a c) --- float overlap: 0.33333334
(a b) , (a b c) --- float overlap: 0.5
(a b c) , (a b d) --- float overlap: 0.5
(a b c d) , (a b c e) --- float overlap: 0.6
(a b c d) , (d c b a) --- float overlap: 0.8
(a b c d e f g) , (a b c d e f h) --- float overlap: 0.75
(a b) , (a b c d e f) --- float overlap: 0.2857143
(a (b (c))) , (a (b (c))) --- float overlap: 1.0
(a (b (c))) , (a (b (x))) --- float overlap: 0.33333334
(a (b (c))) , (a (x (c))) --- float overlap: 0.5
(a (b (c))) , (x (b (c))) --- float overlap: 0.6666667
(a (b c) (d (e f))) , ((d (e f)) a) --- float overlap: 0.6
(a (b c) (d (e f))) , (a a (b c) (d (e f))) --- float overlap: 0.8181818

I developed overlap for comparisons of Push programs (for various purposes), but I could imagine it having other uses as well. Might it be useful for analysis or diversity maintenance in Koza-style genetic programming? I don’t know, but if anyone wants to explore that I’d love to hear about it. It may be that the syntax restrictions of Koza-style symbolic expressions make the flexibility of overlap unnecessary, and maybe overlap reduces to some other measure in such circumstances… but I don’t know.

Push users should also note that overlap differs in several ways from the “discrepancy” measure that has long been included with Push implementations (e.g. in the code_discrepancy instruction). Aside from the difference in direction (higher overlap means more similar, while higher discrepancy means less similar) a major difference is that overlap is normalized to [0, 1] while discrepancy ranges from 0 up to arbitrarily large integers. Analysis of other differences is left as an exercise to the reader.

An overlap utility function, an overlap-demo function, and a code_overlap Push instruction have been added to the latest commit of Clojush; details below.

Clojush is available as usual from: https://github.com/lspector/Clojush

Here is the latest commit message:

20110607: - Added overlap utility function, overlap-demo (which just prints
            some examples to show how overlap works), and code_overlap
            instruction. Overlap can be applied to any two (possibly
            nested) things and it returns a number between 0 (meaning
            no overlap) and 1 (meaning exact match). The overlap utility
            function returns a ratio, but the code_overlap instruction
            pushes a float.
          - Removed complex number support from 20110505. There were previous
            reports of problems and I've noticed problems from the fact that
            (apply + ()) => zero (as opposed to 0) in the clojush namespace
            defined by the code as revised for complex number support. If
            someone knows how to re-introduce complex number support without
            such problems then please let me know.