With this release we reached a great achievement for this project: optimization is faster, more reliable and much more fun. It addresses many issues and missing features, so I hope you will enjoy it!
Added
- View all walkers (#3)!
show_all_walkers
indocs/examples/strider.py
let you see all walkers in one simulation!- You can set the color of walkers during display.
- Genetic optimization:
GeneticOptimization
class ingeneticoptimizer.py
that will replace the previous functional paradigm.- The average score is now displayed.
VisualWorld
has a new method calledreload_visuals
.show_evolution.py
is a new script plotting various data about the Walkers population's evolution during
genetic optimization.- In
docs/examples/strider.py
we recommend to usetotal_distance
as the fitness function.
Changed
- Genetic optimization:
- During genetic optimization, population is now stable at max_pop (it used to fluctuate a lot).
- Genetic optimization do no longer display all dimensions in the progress bar.
startnstop
argument may now be the name of the file to use (a string).max_genetic_distance
was changed from 0.7 to 10. Results are much better now!
- Visuals:
update
method ofVisualWorld
replaced byvisual_update
. It clearly separates physics and display time.- Frame rate and physics speed are now independent parameters.
- Visuals go to a new file
worldvisualizer.py
. - Camera parameters should now be accessed from
CAMERA
instead ofparams["camera"]
. - The camera feels more cinematic.
- You can define a custom load when using
World.add_linkage
orVisualWorld.add_linkage
. The default is 0. pyproject.toml
updated with the data ofsetup.cfg
. This is now the recommended metadata for the project.- In
docs/example/strider.py
, simulation time was increased from 30 seconds to 40. It was just not enough.
Fixed
- Documentation of
evolutionary_optimization_builtin
was wrong: returned data were in order (fitness, dimensions, position),
but (fitness, position, dimensions) was indicated. - After a genetic optimization, the example script was assigning wrong data to the demo walker.
kwargs_switcher
fromgeneticoptimizer.py
do no longer pop (destroy) argument from the input dictionary.
Deprecated
setup.cfg
should no longer be used, as it is replaced bypyproject.toml
.
Removed
evolutionary_optimization
function is removed. UseGeneticOptimization
class instead.- You can no longer use the argument "init_pop" to change the size of the initial population.
It now always set to max_pop.
- You can no longer use the argument "init_pop" to change the size of the initial population.
time_coef
,calc_rate
andmax_sub
parameters ofparams["simul"]
replaced by a unique
physics_period
set to 0.02 (s).leggedsnake/Population evolution.json
removed.
It contained data about an evolution run and is not relevant for users.