The world is inhabited by carrots, rabbits, and wolves! 🌎
Rabbits would roam this world eating carrots that grew in random patches. When they had eaten enough carrots, the rabbits would get fat and split in two. Wolves ran around eating up the rabbits; if they managed to catch and eat enough rabbits, they would also get fat and split. Rabbits and wolves within a certain distance of each other would broadcast information on food and predators. If a rabbit found a carrot patch, other rabbits would quickly join him. If a wolf found a rabbit, the pack would start chasing it.
- You will need to install NodeJS (
v14or newer) and npm on your machine for testing it (if it isn't the case).- If needed, download them both here: https://nodejs.org/en/download
- At the location to which the project has been unzipped,
- Run
npm installto install the dependencies. - Then, run
node src/cli.js(or justnpm start). - See the results shown in the command line.
- See the results in
results.txt
- Run
npm run testOr with npx
npx avaAvailable in both results.txt and world-simulation-results.png files.
👉 Click here to watch on YouTube
Happy Hunting! 🥕🐇🐺
Pierre-Henry Soria. A passionate software AI engineer who loves automating content creation! 🚀 Enthusiast for traveling around the world, photography, AI, learning, and health! 😊 Find me at pH7.me 🚀
☕️ Do you enjoy this project? Would you feel like offering me an oat flat white?? 😋
Distributed under MIT license 🚀


