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.
To play with the code visit Playground
TODO
This project is licensed under the MIT License - see the LICENSE file for details
- Big thank to Daniel Shiffman whose p5 code was used as a basis for the project