|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ec.Evolve
Evolve is the main entry class for an evolutionary computation run.
An EC run is done with one of two argument formats:
java ec.Evolve -file parameter_file [-p parameter=value]*
This starts a new evolutionary run, using the parameter file parameter_file. The user can provide optional overriding parameters on the command-line with the -p option.
java ec.Evolve -checkpoint checkpoint_file
This starts up an evolutionary run from a previous checkpoint file.
Debugging with BeanShell. The jdb debugger isn't very good. In fact, it's just plain awful. One approach around this is to use BeanShell, a full on-line shell system for Java. BeanShell basically provides you with a Java listener, just like a Lisp listener (command line). And it's free! You should definitely try it out.
To try out this feature, Evolve provides a special method, make, which works much like Evolve.main(), except that instead of running the EvolutionState, it just returns it. You can then call the go() method on the EvolutionState to pulse it through its steps (if your particular EvolutionState supports debug-pulsing). Each go() method prints out the current state (evaluating, initializing, breeding, whatever), plus the present generation or pseudogeneration. Other than that, everything is printed as normal. For example, let's say you want to look at the third individual in the 4th generation. In bsh, you might do something like:
jifsan> bsh BeanShell 1.0 beta - by Pat Niemeyer (pat@pat.net) bsh % e = ec.Evolve.make(new String[] {"-file", "params"}); | ECJ | An evolutionary computation system (version 1) | Copyright 1999 by Sean Luke | Mail: seanl@cs.umd.edu | URL: http://www.cs.umd.edu/users/seanl/ | Date: Tuesday, November 16, 1999 | Suggested Java version: 1.2.2/Hotspot | Minimum Java version: 1.1 bsh % e.go(); 0) DEBUG: INIT Setting up Processing GP Types Processing GP Node Constraints Processing GP Function Sets Processing GP Tree Constraints WARNING: Ant trail file ended prematurely Initializing Generation 0 Using default GPNodeSelector for #0 of pop.subpop.0.species.pipe.0 Using default terminal probability for KozaNodeSelector gp.koza.xover.ns Using default nonterminal probability for KozaNodeSelector gp.koza.xover.ns Using default root probability for KozaNodeSelector gp.koza.xover.ns Using default GPNodeSelector for #1 of pop.subpop.0.species.pipe.0 Using default terminal probability for KozaNodeSelector gp.koza.xover.ns Using default nonterminal probability for KozaNodeSelector gp.koza.xover.ns Using default root probability for KozaNodeSelector gp.koza.xover.ns Using default numTries for pop.subpop.0.species.pipe.0 Using default maxDepth for pop.subpop.0.species.pipe.0 bsh % e.go(); 1) DEBUG: EVAL, Generation 0 bsh % e.go(); 2) DEBUG: BREED, Generation 0 Generation 1 bsh % e.go(5); 3) DEBUG: EVAL, Generation 1 4) DEBUG: BREED, Generation 1 Generation 2 5) DEBUG: EVAL, Generation 2 6) DEBUG: BREED, Generation 2 Generation 3 7) DEBUG: EVAL, Generation 3 bsh % e.go(); 8) DEBUG: BREED, Generation 3 Generation 4 bsh % e.population.subpops[0].individuals[3].printIndividualForHumans(e,0,3000); Evaluated: false Fitness: Raw=56.0 Adjusted=0.01754386 Hits=33 Tree 0: (progn2 move (if-food-ahead (if-food-ahead (progn2 left right) (progn3 right (progn3 move (progn2 move left) right) left)) (progn3 right (progn3 move (progn2 move left) right) left))) |
Parameters
nostore bool = true or false (default) |
(should the ec.util.Output facility not store announcements in memory?) |
flush bool = true or false (default) |
(should I flush all output as soon as it's printed (useful for debugging when an exception occurs)) |
verbosity int >= 0 |
(the ec.util.Output object's verbosity) |
evalthreads int >= 1 |
(the number of threads to spawn for evaluation) |
breedthreads int >= 1 |
(the number of threads to spawn for breeding) |
seed.n int != 0, or string = time |
(the seed for random number generator #n. n should range from 0 to Max(evalthreads,breedthreads)-1. If value is time, then the seed is based on the system clock plus n.) |
state classname, inherits and != ec.EvolutionState |
(the EvolutionState object class) |
print-accessed-params bool = true or false (default) |
(at the end of a run, do we print out a list of all the parameters requested during the run?) |
print-used-params bool = true or false (default) |
(at the end of a run, do we print out a list of all the parameters actually used during the run?) |
print-unaccessed-params bool = true or false (default) |
(at the end of a run, do we print out a list of all the parameters NOT requested during the run?) |
print-unused-params bool = true or false (default) |
(at the end of a run, do we print out a list of all the parameters NOT actually used during the run?) |
print-all-params bool = true or false (default) |
(at the end of a run, do we print out a list of all the parameters stored in the parameter database?) |
Field Summary | |
static java.lang.String |
A_CHECKPOINT
The argument indicating that we're starting up from a checkpoint file. |
static java.lang.String |
A_FILE
The argument indicating that we're starting fresh from a new parameter file. |
static java.lang.String |
P_BREEDTHREADS
breedthreads parameter |
static java.lang.String |
P_EVALTHREADS
evalthreads parameter |
static java.lang.String |
P_FLUSH
flush announcements parameter |
static java.lang.String |
P_PRINTACCESSEDPARAMETERS
|
static java.lang.String |
P_PRINTALLPARAMETERS
|
static java.lang.String |
P_PRINTUNACCESSEDPARAMETERS
|
static java.lang.String |
P_PRINTUNUSEDPARAMETERS
|
static java.lang.String |
P_PRINTUSEDPARAMETERS
|
static java.lang.String |
P_SEED
seed parameter |
static java.lang.String |
P_STATE
state parameter |
static java.lang.String |
P_STORE
nostore parameter |
static java.lang.String |
P_VERBOSITY
verbosity parameter |
static java.lang.String |
V_SEED_TIME
'time' seed parameter value |
Constructor Summary | |
Evolve()
|
Method Summary | |
static void |
main(java.lang.String[] args)
The entry method for an evolutionary run. |
static EvolutionState |
make(java.lang.String[] args)
Creates an EvolutionState as normal, but returns it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String P_PRINTACCESSEDPARAMETERS
public static final java.lang.String P_PRINTUSEDPARAMETERS
public static final java.lang.String P_PRINTALLPARAMETERS
public static final java.lang.String P_PRINTUNUSEDPARAMETERS
public static final java.lang.String P_PRINTUNACCESSEDPARAMETERS
public static final java.lang.String A_CHECKPOINT
public static final java.lang.String A_FILE
public static final java.lang.String P_FLUSH
public static final java.lang.String P_STORE
public static final java.lang.String P_VERBOSITY
public static final java.lang.String P_EVALTHREADS
public static final java.lang.String P_BREEDTHREADS
public static final java.lang.String P_SEED
public static final java.lang.String V_SEED_TIME
public static final java.lang.String P_STATE
Constructor Detail |
public Evolve()
Method Detail |
public static void main(java.lang.String[] args)
public static EvolutionState make(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |