Changeset 1293
- Timestamp:
- 02/21/24 16:51:42 (11 months ago)
- Location:
- framspy
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/FramsticksEvolution.py
r1205 r1293 32 32 default_evaluation_data = evaluation_data[""] 33 33 fitness = [default_evaluation_data[crit] for crit in OPTIMIZATION_CRITERIA] 34 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 reason34 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 because the creature failed to stabilize, or for some other reason 35 35 valid = False 36 36 print('Problem "%s" so could not evaluate genotype "%s", hence assigned it low fitness: %s' % (str(e), genotype, BAD_FITNESS)) … … 154 154 print('Best individuals:') 155 155 for ind in hof: 156 print(ind.fitness, '\t -->\t', ind[0])156 print(ind.fitness, '\t<--\t', ind[0]) 157 157 if parsed_args.hof_savefile is not None: 158 158 save_genotypes(parsed_args.hof_savefile, OPTIMIZATION_CRITERIA, hof) -
framspy/evolalg/run_numerical_example.py
r1289 r1293 24 24 print('Best individuals:') 25 25 for ind in hof: 26 print(ind.rawfitness, '\t -->\t', ind.genotype)26 print(ind.rawfitness, '\t<--\t', ind.genotype) 27 27 28 28 -
framspy/evolalg/run_numerical_islands_example.py
r1289 r1293 26 26 print('Best individuals:') 27 27 for ind in hof: 28 print(ind.rawfitness, '\t -->\t', ind.genotype)28 print(ind.rawfitness, '\t<--\t', ind.genotype) 29 29 30 30
Note: See TracChangeset
for help on using the changeset viewer.