This project is developed in a custom Gym environment and with Pygame to help to visualize the agent and the environment. The goal of this agent is to avoid some n obstacles with helping himself with sensors all around the agent, the obstacles positions are random generated also as the agent position.
The obstacles random positions has some criteria to respect:
- Does not have to spawn on a position already taken
- Each obstacles needs to be at least 200 pixels from eachother
- calculated from the center of each obstacles
- Does not have to collide with any other obstacles
To install the requirements for the project run
pip install -r requirements.txt
In train.py
file, set the HYPER PARAMETERS as your choice then train the agent by running
python train.py
File of the model is saved in this location trained_agent/models/PPO_MODELS
Feel free to contribute on get the code works better or some new features to implement. Any contributions you make are greatly appreaciated.