Interactive environment for training and testing a simple Deep Reinforcement Learning agent based on ε-Greedy Q-Learning.
Python==3.12.1
numpy==1.26.3
torch==2.2.1
pygame==2.5.2
matplotlib==3.8.3
pandas==2.2.1
To train the agent in random environments run
python training.py
and input the desired grid size when prompted.
Once the training is over, the parameters of the model will be saved in trained_agent.pt
.
Once you have trained an agent, you can test it by running
python testing.py
You need to input the desired grid size, which does not need to be the same as the one used during training.
When you run testing.py
, you will be able to create a custom environment to test your agent in.
- Left-click on a grid cell to place/remove an obstacle;
- Enter to start the test.
The agent trained is very simple and will probably not perform well in certain environments.
The goal of the project is simply to experiment with DRL and explore its limitations.