Ignore:
Timestamp:
05/08/21 20:10:15 (4 years ago)
Author:
Maciej Komosinski
Message:

Introduced a parameter for the size of the hall of fame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/examples/standard.py

    r1133 r1140  
    77# TODO extend both standard.py and steadystate.py to support >1 criteria (using DEAP's selNSGA2() and selSPEA2())
    88# TODO add comments to all examples in this directory
    9 # TODO add to standard.py and steadystate.py evaluating each genotype in HOF N (configurable, default 10) times when the evolution ends instead of evaluating the last population as it is now in niching_novelty.py
    10 # TODO "debug" mode, displaying Step-based class names and their arguments so it is easy to see what happens during evolution
     9# TODO add to standard.py and steadystate.py evaluating each genotype in HOF N (configurable, default 20) times when the evolution ends, as it is in niching_novelty.py
     10# TODO "--debug" mode, indent nested steps (pre++, post-- of a static counter?) and print their arguments so it is easy to see what happens during evolution
    1111
    1212
     
    4343                        help='optimization criteria : vertpos, velocity, distance, vertvel, lifespan, numjoints, numparts, numneurons, numconnections (or other as long as it is provided by the .sim file and its .expdef). Single or multiple criteria.')
    4444    parser.add_argument('-lib', required=False, help="Filename of .so or .dll with the Framsticks library")
     45
    4546    parser.add_argument('-genformat', required=False, default="1",
    4647                        help='Genetic format for the demo run, for example 4, 9, or B. If not given, f1 is assumed.')
     
    4950    parser.add_argument('-generations', type=int, default=5, help="Number of generations, default 5.")
    5051    parser.add_argument('-tournament', type=int, default=5, help="Tournament size, default 5.")
     52
     53    parser.add_argument('-hof_size', type=int, default=10, help="Number of genotypes in Hall of Fame. Default: 10.")
    5154    return parser.parse_args()
    5255
     
    6568    frams_lib = FramsticksLib(parsed_args.path, parsed_args.lib, parsed_args.sim)
    6669
    67     hall_of_fame = HallOfFameStatistics(100, "fitness")
     70    hall_of_fame = HallOfFameStatistics(parsed_args.hof_size, "fitness")
    6871    statistics_union = UnionStep([
    6972        hall_of_fame,
Note: See TracChangeset for help on using the changeset viewer.