Skip to content
Snippets Groups Projects
Commit 5d96a906 authored by Foh, Chuan Dr (Comp Sci & Elec Eng)'s avatar Foh, Chuan Dr (Comp Sci & Elec Eng)
Browse files

Update README.md

parent 02094367
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
## Introduction ## Introduction
The goal of this project is to develop an AI Bot to learn and play the popular game Snake from scratch. The implementation includes playing by human player, using rule-based, Q-learn, and finally Deep Reinforcement Learning algorithms. For Q-learning and Deep Reinforcement Learning, no rules about the game are given, and initially the Bot has to try exploring all options to learn what to do to get a good reward. The goal of this project is to develop an AI Bot to learn and play the popular game Snake from scratch. The implementation includes playing by human player, using rule-based, Q-learn, and finally Deep Reinforcement Learning algorithms. For Q-learning and Deep Reinforcement Learning, no rules about the game are given, and initially the Bot has to try exploring all options to learn what to do to get a good reward.
The code follows the following tutorial:
https://towardsdatascience.com/how-to-teach-an-ai-to-play-games-deep-reinforcement-learning-28f9b920440a
## Install ## Install
This project requires Python 3.8 with the pygame library installed, as well as Keras with Tensorflow backend. This project requires Python 3.8 with the pygame library installed, as well as Keras with Tensorflow backend.
```bash ```bash
...@@ -25,13 +29,13 @@ python main.py --help ...@@ -25,13 +29,13 @@ python main.py --help
To change to a Bot, modify main.py by uncommenting the appropriate algorithm to run: To change to a Bot, modify main.py by uncommenting the appropriate algorithm to run:
``` ```
## AI selector, pick one: ## AI selector, pick one:
algo = AI_Player0() # do nothing, let human player control algo = AI_Player0() # do nothing, let human player control
#algo = AI_RuleBased() # rule-based algorithm #algo = AI_RuleBased() # rule-based algorithm
#algo = AI_RLQ() # Q-learning - training mode #algo = AI_RLQ() # Q-learning - training mode
#algo = AI_RLQ(False) # Q-learning - testing mode, no exploration #algo = AI_RLQ(False) # Q-learning - testing mode, no exploration
#algo = AI_DQN() # DQN - training mode #algo = AI_DQN() # DQN - training mode
#algo = AI_DQN(False) # DQN - testing mode, no exploration #algo = AI_DQN(False) # DQN - testing mode, no exploration
``` ```
## Trained Data (for Q-Learning) ## Trained Data (for Q-Learning)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment