Skip to content

mishig25/neuroevolution-robots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neuroevolution-Bots

Neuroevolution-Bots is a personal project that demonstrates neuroevolution in a browser environment using TensorFlow.js, Neataptic (for neural nets) and HTML5 Canvas (for graphics). I tried to create a scaled down 2D version of the popular Gym's Humanoid-v2 environment using Planck.js, a JavaScript rewrite of Box2D.

screen capture from demo

The bots in the simulation have simple brains (neural nets) that control their movements. Input to the brains: bot's head position in the world space and angles of bot's leg and knee joints; output of the brains: rotation forces to bot's leg and knee joints. After every iteration, a fitness function chooses the most fit bots to the next iteration (fitness score of bot: how much the bot traveled to the right + whether bot fell down or not).

Two variations of neuroevolution are available:

  • NEAT (network architecture and weights are updated) (using Neataptic.js)
  • Vanilla Neuroevolution (only network weights are updated) (using Tensorflow.js)

TRY THE DEMO: here

References and inspirations:

License: MIT