Evolving Robot Behaviors

From molecubes
Revision as of 05:28, 7 September 2019 by Victor Zykov (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Evolve a virtual robot

The simulator can evolve the behaviors of a robot by building adapted controllers.

Load a robot

To evolve a virtual robot the first step is to load a robot from a mmf file or to build one. To build and save a robot see the section on Building Robots in Simulation. Note if you build your own robot, you need to save it before to evolve it because the robot will be load at each simulation from the mmf file and the filename will be use to save the evolution data.

Evolve

To start the evolution, you only need to click on the "EVOLVE" button in the evolution window part. The robot will evolve with the goal to travel the longest distance. The results are saved in different files like filename+"Genes.txt", filename+"EvoResult.txt" and filename+"BestMove.txt".

Description of the evolution files.

  • "Genes.txt" contains all the genes create during the simulation. A gene represents rotation commands for the actuator cubes.
  • "EvoResult.txt" contains all the genes of the controller that improve the simulation during the evolution.
  • "BestMove.txt" constains the best controller of the simulation.

To stop an evolution just click again on the "EVOLVE" button otherwise the evolution will continue forever. Note: for the moment if you stop the evolution is not possible to continue it later.

Play results

To display the result of the evolution click on "PLAY RESULT", this functionality will play the results saved in the EvoResult file.

Get data

To save the best result in MSF file click on the button "GET DATA", this will play the best result and save it in filname.msf. Another file filename+"data.txt" is also creates to save the angles positions of the motion of the robot. Please note that writing the .MSF file is only completed when the simulator software is closed. This is a known bug and we are currently working on its fix.