Changeset 1117
- Timestamp:
- 03/27/21 03:43:22 (4 years ago)
- Location:
- framspy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/FramsticksEvolution.py
r1095 r1117 10 10 11 11 # The list of criteria includes 'vertpos', 'velocity', 'distance', 'vertvel', 'lifespan', 'numjoints', 'numparts', 'numneurons', 'numconnections'. 12 OPTIMIZATION_CRITERIA = ['ve rtpos'] # Single or multiple criteria. Names from the standard-eval.expdef dictionary, e.g. ['vertpos', 'velocity'].12 OPTIMIZATION_CRITERIA = ['velocity'] # Single or multiple criteria. Names from the standard-eval.expdef dictionary, e.g. ['vertpos', 'velocity']. 13 13 14 14 … … 24 24 except (KeyError, TypeError) as e: # the evaluation may have failed for an invalid genotype (such as X[@][@] with "Don't simulate genotypes with warnings" option) or for some other reason 25 25 fitness = [-1] * len(OPTIMIZATION_CRITERIA) # fitness of -1 is intended to discourage further propagation of this genotype via selection ("this one is very poor") 26 print( "Error '%s': could not evaluate genotype '%s', returning fitness %s"% (str(e), genotype, fitness))26 print('Error "%s": could not evaluate genotype "%s", returning fitness %s' % (str(e), genotype, fitness)) 27 27 return fitness 28 28 … … 95 95 toolbox = prepareToolbox(framsLib, '1' if parsed_args.genformat is None else parsed_args.genformat) 96 96 97 POPSIZE = 1098 GENERATIONS = 10097 POPSIZE = 20 98 GENERATIONS = 50 99 99 100 100 pop = toolbox.population(n=POPSIZE) -
framspy/run-evolalg-examples.cmd
r1113 r1117 3 3 rem Example usage: 4 4 5 set PATH_TO_DIR_WITH_FRAMS_LIBRARY=............5 set DIR_WITH_FRAMS_LIBRARY=............ 6 6 7 7 8 python -m evolalg.examples.standard -path % PATH_TO_DIR_WITH_FRAMS_LIBRARY% -opt numneurons8 python -m evolalg.examples.standard -path %DIR_WITH_FRAMS_LIBRARY% -opt numneurons 9 9 10 python -m evolalg.examples.niching_novelty -path % PATH_TO_DIR_WITH_FRAMS_LIBRARY% -opt velocity10 python -m evolalg.examples.niching_novelty -path %DIR_WITH_FRAMS_LIBRARY% -opt velocity
Note: See TracChangeset
for help on using the changeset viewer.