Changeset 57
- Timestamp:
- 01/26/10 15:27:17 (15 years ago)
- Location:
- java/ecj/framsticks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
java/ecj/framsticks/FramsticksIndividual.java
r44 r57 11 11 public class FramsticksIndividual extends Individual { 12 12 13 public static final String P_FRAMSTICKS_INDIVIDUAL = "framssticks-ind"; 13 private static final String P_FRAMSTICKS_INDIVIDUAL = "framsticks-ind"; 14 private static final String P_INIT_TYPE = "init-type"; 14 15 15 16 public String genotype; … … 39 40 public void setup(final EvolutionState state, final Parameter base) { 40 41 super.setup(state, base); 41 genotype = FramsticksUtils.getInstance(state).getNewGenotype(); 42 43 Parameter initTypeParam = base.push(P_INIT_TYPE); 44 int initializationType = state.parameters.getIntWithDefault(initTypeParam, null, 0); 45 genotype = FramsticksUtils.getInstance(state).getNewGenotype(initializationType); 42 46 } 43 47 -
java/ecj/framsticks/FramsticksUtils.java
r51 r57 18 18 public class FramsticksUtils { 19 19 20 private static final String NEW_CMD = "%s \"getsimplest 1 \" -q";20 private static final String NEW_CMD = "%s \"getsimplest 1 %s\" -q"; 21 21 private static final String EVAL_CMD = "%s \"ex %s\" \"eval %s %s\" -q"; 22 22 private static final String MUTATE_CMD = "%s rnd mut -q < %s"; … … 183 183 } 184 184 185 public String getNewGenotype( ) {186 return executeCommand(String.format(NEW_CMD, executableCommand ));185 public String getNewGenotype(int initializationType) { 186 return executeCommand(String.format(NEW_CMD, executableCommand, initializationType)); 187 187 } 188 188 -
java/ecj/framsticks/frams_coevolution2.params
r55 r57 24 24 pop.subpop.1 = ec.Subpopulation 25 25 26 pop.subpop.0.size = 827 pop.subpop.1.size = 826 pop.subpop.0.size = 1 27 pop.subpop.1.size = 1 28 28 pop.subpop.0.duplicate-retries = 0 29 29 pop.subpop.1.duplicate-retries = 0 … … 34 34 pop.subpop.0.species.crossover-prob = 1.0 35 35 pop.subpop.0.species.mutation-prob = 0.1 36 pop.subpop.0.species.ind.init-type = 2 36 37 37 38 pop.subpop.1.species = framsticks.FramsticksSpecies … … 40 41 pop.subpop.1.species.crossover-prob = 1.0 41 42 pop.subpop.1.species.mutation-prob = 0.1 43 pop.subpop.1.species.ind.init-type = 1 42 44 43 45 pop.subpop.0.species.pipe = framsticks.FramsticksMutationPipeline
Note: See TracChangeset
for help on using the changeset viewer.