Archive for the 'Uncategorized' Category

A few more minor Clojush updates

Friday, March 19th, 2010

A few more improvements to clojush, the version of Push3/PushGP implemented in Clojure.

20100319: - Added problem-specific-report function (to be customized per problem).
      	    This can also be a convenient place to put other stuff that you want
      	    done once per generation.
      	  - Added support for saving lists of ancestors (maternal line only)
      	    along with global parameters to turn both this and the saving
      	    of total-error histories on and off.
          - Added missing calls to "keep-number-reasonable" in numeric
      	    Push instructions. This eliminates some potential crashes from runaway
            number growth.

Updates to clojush

Sunday, March 14th, 2010

Several improvements have been made to clojush, the version of Push3/PushGP implemented in Clojure. The version history additions are listed below, but I can also report getting upwards of 1300% CPU utilization on a dual 4-core mac, which is very nice!

20100227: - First distributed version.
20100301: - Added (shutdown-agents) for proper termination.
20100306: - Added history (of total errors of ancestors) to individuals.
	  - Commented out (shutdown-agents) because it prevents multiple runs
	    in a single launch of a Clojure REPL.
20100307: - Fixed bug in history: reproductive auto-simplification added was 
            adding duplicate items.
20100314: - Added instructions: *_shove, code_extract, code_insert, 
  	    code_subst, code_contains, code_container, code_position,
	    code_discrepancy, *_rand. NOTE that the presence of *_rand
            instructions means that programs produced using the full set
            of instructions may be non-deterministic. As of this writing
            pushgp (via evaluate-individual) will evaluate an individual
            only once, so it will always have whatever fitness value it 
            had upon first testing.
	  - Added globals to support integer_rand and float_rand:
            min-random-integer, max-random-integer, min-random-float
          - Fixed bug in code_car that could produce nil.
          - Made execute-instruction safe for nil (although it shouldn't 
            arise anyway).
	  - Added stress-test for testing and debugging new Push instructions.
	    See the stress-test documentation string for details.
          - Implemented size limits on intermediate results on code stack 
            (in code_cons, code_list, code-append, code_insert, code_subst, 
            exec_s, exec_y).
	  - Fixed bug in exec_s (was always a noop previously).


Sunday, February 28th, 2010

A first version of Push3/PushGP in Clojure is available from It’s currently roughly the same stuff as was implemented in the first versions of Schush, but Clojure makes it easy to do some nice things like taking advantage of multi-core CPUs. When I run this on a 2-core machine I sometimes see CPU utilizations approaching 200% — I hope to try it on an 8-core machine soon…

Psh v0.2

Sunday, February 7th, 2010

Psh, the Java implementation of Push, has been updated significantly and released as Psh v0.2. The following changes were made, among many others:

  • Added PshInspector, a Psh interpreter inspector that displays the Psh stacks after every step of an executed program.
  • Fixed iteration instructions, which were not working properly.
  • Implemented auto-simplification, both as a genetic operator and to simplify programs for reports.

Psh is now being hosted on GitHub, where you can also find a more in-depth readme:

Schush do*range bug fixes

Sunday, January 24th, 2010

The latest fixes bugs in the implementations of*range and*range that were noticed by Tom Helmuth:

20100123: - Fixed bugs in orders in which*range and*range pushed things
            onto the exec stack.

Schush performance improvements and mate selection

Thursday, January 21st, 2010

The latest includes a significant performance improvement and a new option for crossover mate selection:

20100121: - Eliminated calls to eval in Push program execution, speeding up all Push
            program execution significantly. This is done with an instruction name/procedure
            hash table to which instructions are added when registered. Note that now 
            ALL instructions that appear in Push programs must be defined with
            define-registered, rather than define.
          - Fixed examples in this file to define input instructions with define-registered.
          - Added compensatory mate selection, in which mates for crossover with individual 
            i are selected on the basis of low sums, over fitness cases, of the product
            of i's error and the crossover candidate's error. This is off by default but
            can be turned on by passing a value of #t to the compensatory-mate-selection
            argument of schushgp.

Schush execution traces

Sunday, January 3rd, 2010

The updated includes a simple mechanism for saving execution traces for later analysis, etc.:

20100103: - Added option to save execution traces. If the global parameter save-traces
            is #t then the global variable trace will contain an execution trace
            after each call to run-schush. A trace is a list of exec stack tops, listed
            last first.

Schush: trivial geography, historically assessed hardness, and other goodies

Saturday, January 2nd, 2010

A bigger update for the new year:

The biggest additions are trivial geography (which was trivial to add 🙂 but which can make a big difference) and error scaling using one form of historically assessed hardness. Here’s the full list of new changes:

20091229: - Added scale-errors parameter to schushgp; when #t this calculates
            scaled errors via the Historically Assessed Hardness (HAH) method (in the
            "current generation / quotient" setting) and uses these scaled errors
            as the basis of selection. HAH is described in:
              Klein, J., and L. Spector. 2008. Genetic Programming with Historically
              Assessed Hardness. In Genetic Programming Theory and Practice VI, edited by
              R. L. Riolo, T. Soule, and B. Worzel, pp. 61-74. New York: Springer-Verlag.
            This form of HAH is similar but non-identical (for non-Boolean problems)
            to "implicit fitness sharing" as described by McKay in:
              McKay, R. I. 2001. An investigation of fitness sharing in genetic programming.
              The Australian J. of Intelligent Information Processing Systems, 7(1/2):43–51.
            Also added examples using the scale-errors parameter.
          - Added three schushgp parameters to control the number of iterations of
            automatic simplification performed at various times:
            - report-simplifications:
                the number performed for each schushgp generation report
            - final-report-simplifications:
                the number performed on successful results
            - reproduction-simplifications:
                the number performed by the simplification genetic operator
          - Fixed bug in cases for factorial example.
          - Added YANK and YANKDUP instructions for all types.
20100102: - Added trivial geography, controlled by a trivial-geography-radius parameter
            to schushgp; set this to zero (the default) for no trivial geography.
            Trivial geography is described in:
              Spector, L., and J. Klein. 2005. Trivial Geography in Genetic Programming.
              In Genetic Programming Theory and Practice III, edited by T. Yu, R.L. Riolo,
              and B. Worzel, pp. 109-124. Boston, MA: Kluwer Academic Publishers.
            Also added an example using trivial geography.
          - Made several minor corrections to the documentation.

Trig in Schush

Saturday, December 26th, 2009

A minor update, adding floating point trigonometry instructions:

20091226: - Added float.sin, float.cos, float.tan.

Schush updates

Monday, September 21st, 2009

An updated version of Schush/SchushGP, a Scheme implementation of Push/PushGP, is now available from:

The recent changes are as follows:

20090919: - New shuffle algorithm (slightly slower but conses less, more elegant).
          - Removed number-list in favor of in-range (faster, conses less, more
            elegant, but PLT-specific).
20090920: - Added explicit copyright and GPL notice, replacing previous disclaimers.
          - Interpreter states now printed in human-friendly form by run-schush
            when called with print argument #t; based on code by Thomas Helmuth.