Changeset 1129 for framspy/evolalg/examples
- Timestamp:
- 04/11/21 03:27:06 (4 years ago)
- Location:
- framspy/evolalg/examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
framspy/evolalg/examples/niching_novelty.py
r1128 r1129 65 65 parser.add_argument('-fit', required=False, default=Fitness.raw, type=Fitness, 66 66 help=' Fitness criteria DEFAULT = raw', choices=list(Fitness)) 67 parser.add_argument('-popsize', type=int, default=50, help=" Size of population, default 50.")67 parser.add_argument('-popsize', type=int, default=50, help="Population size, default 50.") 68 68 parser.add_argument('-generations', type=int, default=5, help="Number of generations, default 5.") 69 parser.add_argument('-num_parts', type=int, default=None, help="Maximum number of parts. Default None") 69 parser.add_argument('-tournament', type=int, default=5, help="Tournament size, default 5.") 70 parser.add_argument('-num_parts', type=int, default=None, help="Maximum number of Parts. Default: no limit") 70 71 parser.add_argument('-checkpoint_path', required=False, default=None, help="Path to the checkpoint file") 71 72 parser.add_argument('-checkpoint_interval', required=False, type=int, default=100, help="Checkpoint interval") … … 117 118 118 119 # Selection procedure 119 selection = TournamentSelection( 5,120 selection = TournamentSelection(parsed_args.tournament, 120 121 copy=True) # 'fitness' by default, the targeted attribute can be changed, e.g. fit_attr="fitness_raw" 121 122 -
framspy/evolalg/examples/standard.py
r1128 r1129 41 41 help='Genetic format for the demo run, for example 4, 9, or B. If not given, f1 is assumed.') 42 42 43 parser.add_argument("-popsize", type=int, default=50, help=" Size of population, default 50.")43 parser.add_argument("-popsize", type=int, default=50, help="Population size, default 50.") 44 44 parser.add_argument('-generations', type=int, default=5, help="Number of generations, default 5.") 45 parser.add_argument('-tournament', type=int, default=5, help="Tournament size, default 5.") 45 46 return parser.parse_args() 46 47 … … 78 79 statistics_union] 79 80 80 selection = TournamentSelection( 5, copy=True, fit_attr="fitness")81 selection = TournamentSelection(parsed_args.tournament, copy=True, fit_attr="fitness") 81 82 82 83 new_generation_steps = [
Note: See TracChangeset
for help on using the changeset viewer.