ECJ
An Evolutionary Computation and Genetic Programming System

### Documentation and Help

This distribution comes with several pieces of documentation:

Still confused? The ECJ mailing list is here to help you. See the ECJ webpage for more information. Please post questions to the list. There is also a direct email address to the authors which you may use, but try not to do so except for direct questions to the authors, not general questions about using ECJ.

### Tutorials

Here are some tutorials to get you up to speed. As I have time, I'll produce tutorials on the other various odd features of the system.

1. Tutorial 1: Build a Genetic Algorithm for the MaxOnes Problem. Introduces the basics of building a simple ECJ problem, high-level ECJ constructs, the concepts behind the parameter files, and how to make an evaluation function.
2. Tutorial 2: Build a Genetic Algorithm for an Integer Problem. Shows how to use a new representation (integer vectors), parent parameter files, multiple threads, custom breeding pipelines and breeding operators, and other good stuff.
3. Tutorial 3: Build a Floating-Point Evolution Strategies Problem. Shows how to build a generational ES, to perform and recover from checkpointing, to use the setup() method, to make custom selection and statistics classes, and to read and write populations to files.
4. Tutorial 4: Build a Genetic Programming Symbolic Regression Problem. Shows how to use the genetic programming package, how to manipulate the GP statistics classes, and how to add elitism.
5. Post-Tutorial Discussion: Quick roundup of additional stuff ECJ does that's not in the tutorials.

### Using the GUI

ECJ now has a basic GUI for loading and running jobs from parameter files and checkpoint files, editing parameters, and charting statistics. Try the quick examples in the next section; afterwards, you can try it by running java ec.display.Console. There are certain versions of the examples (in the gui) which, when loaded into the Console, will do charting for you as well.

The GUI can optionally chart statistics (see the ec/app/gui/ directory for some examples). However to use the charting, you need to install the JFreeChart and iText libraries (for charting and PDF export respectively). The console will still run without them, but you will not be able to run the charting examples. To compile the charting, facility, you compile with make chart

### Quick Examples

Some runs which result in the ideal individual being found (in most cases). First, cd to the ec directory. Then add the parent directory of the ec directory to your CLASSPATH. Then issue javac -O *.java */*.java */*/*.java */*/*/*.java Alternatively you can run the makefile.

Now you're ready. Here are some problems to try.

(GA) Vector Sum (pop=100, 10 genes)
java ec.Evolve -file app/sum/sum.params
(GA) Rastrigin (pop=1000, 100 genes)
java ec.Evolve -file app/ecsuite/ecsuite.params
(GA) Rosenbrock (pop=1000, 100 genes)
java ec.Evolve -file app/ecsuite/ecsuite.params -p eval.problem.type=rosenbrock
(GA) Sphere (pop=1000, 100 genes)
java ec.Evolve -file app/ecsuite/ecsuite.params -p eval.problem.type=sphere
(GA) Step (pop=1000, 100 genes)
java ec.Evolve -file app/ecsuite/ecsuite.params -p eval.problem.type=step
(GA) Noisy-Quartic (pop=1000, 100 genes)
java ec.Evolve -file app/ecsuite/ecsuite.params -p eval.problem.type=noisy-quartic
(GP) Symbolic Regression, no ercs, x4+x3+x2+x equation
java ec.Evolve -file app/regression/noerc.params
(GP) Symbolic Regression with ercs, x4+x3+x2+x equation
java ec.Evolve -file app/regression/erc.params
(GP) Symbolic Regression, no ercs, x5-2x3+x equation
java ec.Evolve -file app/regression/quinticnoerc.params
(GP) Symbolic Regression with ercs, x5-2x3+x equation
java ec.Evolve -file app/regression/quinticerc.params
(GP) Symbolic Regression, no ercs, x6-2x4+x2 equation
java ec.Evolve -file app/regression/sexticnoerc.params
(GP) Symbolic Regression with ercs, x6-2x4+x2 equation
java ec.Evolve -file app/regression/sexticerc.params
(GP) Two Box Problem, no ADFs
(GP) Two Box Problem with ADFs
(GP) Artificial Ant, Santa Fe Trail
java ec.Evolve -file app/ant/ant.params
(GP) Artificial Ant, Los Altos Hills Trail
java ec.Evolve -file app/ant/ant.params -p eval.problem.file=app/ant/losaltos.trl
(GP) Boolean 3 Multiplexer (new fast form)
java ec.Evolve -file app/multiplexer/3.params
(GP) Boolean 6 Multiplexer (new fast form)
java ec.Evolve -file app/multiplexer/6.params
(GP) Boolean 11 Multiplexer (new fast form)
java ec.Evolve -file app/multiplexer/11.params
(GP) Boolean 3 Multiplexer (original form)
java ec.Evolve -file app/multiplexerslow/3.params
(GP) Boolean 6 Multiplexer (original form)
java ec.Evolve -file app/multiplexerslow/6.params
(GP) Boolean 11 Multiplexer (original form)
java ec.Evolve -file app/multiplexerslow/11.params
(GP) 8x8 Lawnmower
(GP) 8x8 Lawnmower with 2 ADFs
(GP) Even 4-Parity
java ec.Evolve -file app/parity/parity.params -p eval.problem.even=true
(GP) Odd 4-Parity
java ec.Evolve -file app/parity/parity.params -p eval.problem.even=false
(GP) Odd 10-Parity
java ec.Evolve -file app/parity/parity.params -p eval.problem.even=false -p eval.problem.bits=10 -p gp.fs.0.size=14
(GP) Even 3-Parity with 2 ADFs
java ec.Evolve -file app/parity/adf.params -p eval.problem.even=true
(GP) Odd 3-Parity with 2 ADFs
java ec.Evolve -file app/parity/adf.params -p eval.problem.even=false
(GP) Simple Edge Encoding for Tomita Language Problem 3
java ec.Evolve -file app/edge/3.params

After a run, various statistical information is written to the out.stat file. All the GP examples use a population size of 1024, and 7-tournament selection. All other parameters are Koza-I/II standard.