This repo contains a little bit of theory around Reinforcement Learning (RL), using a 2-player game called Quarto as a practical example.
- This repo uses conda to manage the Python, Jupyter Notebook and other dependencies. If you do not have it installed yet, you just have to follow the official instructions for your platform.
- With
condainstalled, you should clone this repo, by opening a command prompt and executing:git clone https://github.com/school-of-ai-angers/quarto.git cd quarto - While still inside the same terminal window, install the dependencies and start the Jupyter server:
You should now see a new tab in your Browser.
conda env create jupyter notebook
You may start by reading a take on Reinforcement Learning basics. We encourage you to also search online more examples and other topics.
Then, you can use the notebook Play against it to manually explore the Quarto game and the environment (how the state and action spaces are encoded, rewards, etc). In doubt, the environment is implemented by the environment.py file with comments to ease understanding.
Finally, a "working" implementation of Q-learning is given in the notebook Train your player. We encourage you to read the algorithm implementation and see how the agent training run. Then, you can use this squeleton to implement your own algorithm and train your agent. For submission in an online plateforme - Arena to compete with others implementations, you need to create a zip file with your code. The last cell has a tool to create this zip in the right format.