Skip to content

Train simple agents using basic NeuroEvolution in a virtual environment using p5.js and tensorflow.js

License

Notifications You must be signed in to change notification settings

lfrati/Agents_p5

Repository files navigation

Toy NeuroEvolution with p5.js and tf.js

Isn't it nice when you can see the creatures you have created live peacefully in their own digital environment? Running complex simulations sure is rewarding but seeing the results in a huge CSV is not as satisfying as seeing the agents wander around. Making a nice looking real-time visualization of the simulation is usually not an easy task. Luckily P5.js comes to the rescue by providing some simple to use graphic primitives.

The project has been inspired by the amazing tutorials of Daniel Shiffman from which much of the code upon which this project is built has been borrowed.

But what is this project about? Evolving agents. Simple, eh? Not? What is that do you ask? Well, the agent part is pretty straightforward, they are "entities" that do "stuff", pieces of code in this specific case, that change some variables they have been allowed to change. And where do the evolution part comes in? Easy, that's how they "choose" what variables to change. I'm quoting the choosing part since we might debate endlessly if there is any real choice involved here. But that's not the point. The point is that it's both interesting to experiment with and pleasant to look at.

Getting Started

To play with the code visit Playground

How it works

TODO

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Big thank to Daniel Shiffman whose p5 code was used as a basis for the project

About

Train simple agents using basic NeuroEvolution in a virtual environment using p5.js and tensorflow.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published