All notable changes to the LeggedSnake will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
examples/
is now in the main folder. It was indocs/
previously.
- Project links fixed in pyproject.toml.
- Documentation should be directly under
docs/
but the recommended method was placing it indocs/html
.
- View all walkers!
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.
- 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.
- 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.
setup.cfg
should no longer be used, as it is replaced bypyproject.toml
.
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.
time_coef
,calc_rate
andmax_sub
parameters ofparams["simul"]
replaced by a uniquephysics_period
set to 0.02 (s).leggedsnake/Population evolution.json
removed. It contained data about an evolution run and is not relevant for users.
Starting from 0.3.1, we won't include "-alpha" or "-beta" in the naming scheme, as it is considered irrelevant.
requirements-dev.txt
that contain dev requirements. It makes contribution easier.- PyCharm configuration files.
- Animations are now all stored in local variables, and no longer in an "ani" global list of animations.
- The main example file
strider.py
was launching animations for each subprocess. This file is now considered an executable. evolutionary_optimization_builtin
was during the last evaluation of linkages.data_descriptors
were not save for the first line of data only ingeneticoptimizer
.- Multiple grammar corrections.
- The
video
function ofphysicsengine.py
now effectively launches the video (no call to plt.show required). - The
video
function ofphysicsengine.py
usingdebug=True
was crashing.
- Multiprocessing is here! The genetic optimization can now be run in parallel! Performances got improved by 65 % using 4 processes only.
- We now save data using JSON! Slow computer users, you can relax and stop computing when you want.
- The sidebar in the documentation is a bit more useful.
- Not having tqdm will cause an exception.
- Corrected the example, the genetic optimization is now properly fixed but slower.
- Native support for PyGAD is no longer present.
evolutionnary_optimization
(replaced byevolutionary_optimization
).- Data saved in the old txt format are no longer readable (were they readable?)
- Dependency to tqdm and matplotlib.
- The
evolutionary_optimization
replacesevolutionnary_optimization
.- The
ite
parameter renamediters
for consistency with pylinkage. - The new parameter
verbose
let you display a nice progress bar, more information on optimization state, or nothing.
- The
- The best solution can be displayed with PyGAD as well.
- Typos and cleans-up in
docs/examples/strider.py
. evolutionnary_optimization_legacy
renamed toevolutionary_optimization_builtin
.
evolutionnary_optimization
is now deprecated. Please useevolutionary_optimization
.
- Explicit dependency to PyGAD. There is no longer an annoying message when PyGAD is not installed.
- It is now possible and advised to import class and functions using quick
paths, for instance
from leggedsnake import Walker
instead offrom leggedsnake.walker import Walker
. - You do no longer have to manually import pylinkage, we silently import the useful stuff for you.
- We now use bump2version for version maintenance.
- This is fixed by the
road_y
parameter inWorld
let you define a custom height for the base ground.
docs/examples/strider.py
has been updated to the latest version of leggedsnake 0.1.4.
- The full swarm representation in polar graph has been repaired in
docs/examples/strider.py
. - During a dynamic simulation, linkages with long legs could appear through the road.
- The documentation was not properly rendered because Napoleon (NumPy coding style) was not integrated.
This package was lacking real documentation, it is fixed in this version.
- Sphinx documentation!
- Website hosted on GitHub pages, check hugofara.github.io/leggedsnake!
- Expanded README with the quick links section.
- Tests moved from
leggedsnake/tests
totests/
. - Examples moved from
leggedsnake/examples/
todocs/examples/
. - I was testing my code on
leggedsnake/examples/strider.py
(the old path) and that's why it was a big mess. I cleaned up that all. Sorry for the inconvenience!
- A lot of outdated code in the
leggedsnake/examples/strider.py
- Changelog URL was broken in
setup.cfg
.
- Security: tests with
tox.ini
now include Python 3.9 and Flake 8.
- The
step
function execution speed has been increased by 25% whenreturn_res
isTrue
! Small performance improvement whenreturn_res
isFalse
. - The
size
argument ofstep
function is now known aswitdh
. - We now require pylinkage>=0.4.0.
- Files in
leggedsnake/examples/
were not included in the PyPi package. - The example was incompatible with pylinkage 0.4.0.
- Test suite was unusable by tox.
- Tests fixed.
- Incompatible argument between PyGAD init_pop and built-in GA.
- The example file
examples/strider.py
is now shipped with the Python package. leggedsnake/geneticoptimizer.py
can now automatically switch to the built-in GA algorithm if PyGAD is not installed.
setup.cfg
metadata
- Code vulnerabilities automatic checks
- Example videos in
examples/images/
- Many reforms in code style in order to make the dynamic part of naming conventions consistent with Pymunk.
- Images in the
README.md
!
- You can now define linkages with an enormous number of legs. Systems with many should no longer break physics but your CPU instead :)
- Started walkthrough demo in
README.md
- Automatic release to PyPi
- Pymunk version should be at least 6.0.0 in requirement files.
- Some URLs typos in
README.md
- Versioning tests not executing (GitHub action)
requirement.txt
was absent due to.gitignore
misconfiguration.
.gitignore
now ignores .txt files only in the leggedsnake folder.environment.yml
more flexible (versions can be superior to the selected). pymunk>5.0.0 and pylinkage added.leggedsnake/utility.py
not having zipfile or xml modules error encapsulation.
setup.cfg
was not PyPi compatible. Removed mail (use GitHub!), we now explicitly say thatREADME.md
is markdown (PyPi is conservative)
Basic version, supporting Genetic Algorithm optimization, but with various problems.
CODE_OF_CONDUCT.md
to help community.LICENSE
MIT License.MANIFEST.in
to include more files.README.md
as a very minimal version.environment.yml
with matplotlib, numpy, and pygad requirement.examples/strider.py
a complete demo with Strider linkage.leggedsnake/__init__.py
.leggedsnake/dynamiclinkage.py
.leggedsnake/geneticoptimizer.py
.leggedsnake/physicsengine.py
.leggedsnake/show_evolution.py
just a legacy package, no utility.leggedsnake/tests/test_utility.py
untested test caseleggedsnake/utility.py
contain some useful evaluation function (step
andstride
) and a broken GeoGebra interface.walker.py
defines theWalker
object.pyproject.toml
.setup.cfg
.setup.py
empty, for compatibility purposes only.tox.ini
tox with Python 3.7 and 3.8.