Changeset 1128 for framspy/evolalg/examples/standard.py
- Timestamp:
- 04/11/21 03:21:14 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/examples/standard.py
r1113 r1128 42 42 43 43 parser.add_argument("-popsize", type=int, default=50, help="Size of population, default 50.") 44 parser.add_argument('-generations', type=int, default=5, help="Number of generations, default 5.") 44 45 return parser.parse_args() 45 46 … … 96 97 ) 97 98 experiment.init() 98 experiment.run( 3)99 for ind in hall_of_fame.hal offame:99 experiment.run(parsed_args.generations) 100 for ind in hall_of_fame.halloffame: 100 101 print("%g\t%s" % (ind.fitness, ind.genotype)) 101 102
Note: See TracChangeset
for help on using the changeset viewer.