This program creates an artificial environment where neural-network-powered agents (simple artificial lifeforms) learn to compete, cooperate, and interact using the NEAT-python library.
-
Install Python 3.x from the official website: https://www.python.org/downloads/
-
Install the required libraries using pip:
pip install -r requirements.txt
The program uses a configuration file named config-neat
to define the settings for the NEAT algorithm. You can modify this file to adjust the parameters of the neural networks and the evolutionary process.
python app.py
You can customize the program by modifying the constants at the top of the code:
WIDTH
andHEIGHT
: The dimensions of the simulation window.FOOD_RADIUS
,AGENT_RADIUS
, andOBSTACLE_RADIUS
: The sizes of the food, agents, and obstacles.NUM_FOOD
andNUM_OBSTACLES
: The number of food items and obstacles in the environment.
You can also experiment with different neural network architectures and configurations by modifying the config-neat
file.