Tensorflow deep reinforcement learning agent playing Briscola card game.
This repository contains a Briscola game environment where different agents can play.
RandomAgent
: choose each move in a random fashionAIAgent
: knows the rules and the strategies for winning the gameDeepAgent
: agent trained using deep reinforcement learningHumanAgent
: yourself
sudo apt-get update && sudo apt-get install -y \
python-dev \
python3-pip
sudo pip install \
tensorflow \
hyperopt \
matplotlib \
pandas
Alternatively, a Dockerfile with all the dependencies installed is provided in this repo. To use it:
$ bash docker/build.sh
$ bash docker/run.sh
$ python3 train.py --network dqn --saved_model saved_model_dir
$ python3 human_vs_ai.py --network dqn --saved_model saved_model_dir
$ python3 human_vs_ai.py
Specify the network type using --network
command line argument
- Deep Q Network
- Deep Recurrent Q Network
- WIP Synchronous Advantage Actor Critic (A2C)
Train multiple agents using the self_train.py
python script.
$ python3 self_train.py --network dqn --saved_model saved_model_dir
-
Training a Deep Q Network model for 75k epochs: achieved 85% winrate against a random player.
-
Training a Deep Q Network model for 100k epochs using Self Play: achieved 90% winrate against a random player.