Changeset 1117


Ignore:
Timestamp:
03/27/21 03:43:22 (3 years ago)
Author:
Maciej Komosinski
Message:

Cosmetic

Location:
framspy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • framspy/FramsticksEvolution.py

    r1095 r1117  
    1010
    1111# The list of criteria includes 'vertpos', 'velocity', 'distance', 'vertvel', 'lifespan', 'numjoints', 'numparts', 'numneurons', 'numconnections'.
    12 OPTIMIZATION_CRITERIA = ['vertpos']  # Single or multiple criteria. Names from the standard-eval.expdef dictionary, e.g. ['vertpos', 'velocity'].
     12OPTIMIZATION_CRITERIA = ['velocity']  # Single or multiple criteria. Names from the standard-eval.expdef dictionary, e.g. ['vertpos', 'velocity'].
    1313
    1414
     
    2424        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
    2525                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))
    2727        return fitness
    2828
     
    9595        toolbox = prepareToolbox(framsLib, '1' if parsed_args.genformat is None else parsed_args.genformat)
    9696
    97         POPSIZE = 10
    98         GENERATIONS = 100
     97        POPSIZE = 20
     98        GENERATIONS = 50
    9999
    100100        pop = toolbox.population(n=POPSIZE)
  • framspy/run-evolalg-examples.cmd

    r1113 r1117  
    33rem Example usage:
    44
    5 set PATH_TO_DIR_WITH_FRAMS_LIBRARY=............
     5set DIR_WITH_FRAMS_LIBRARY=............
    66
    77
    8 python -m evolalg.examples.standard          -path %PATH_TO_DIR_WITH_FRAMS_LIBRARY%   -opt numneurons
     8python -m evolalg.examples.standard          -path %DIR_WITH_FRAMS_LIBRARY%   -opt numneurons
    99
    10 python -m evolalg.examples.niching_novelty   -path %PATH_TO_DIR_WITH_FRAMS_LIBRARY%   -opt velocity
     10python -m evolalg.examples.niching_novelty   -path %DIR_WITH_FRAMS_LIBRARY%   -opt velocity
Note: See TracChangeset for help on using the changeset viewer.