rawburt / rl-ttt

Reiniforcement learning Tic-Tac-Toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reinforcement Learning Tic-Tac-Toe

This program uses a Q-Learning algorithm to teach an AI to play Tic-Tac-Toe.

Program Requirements

  • Python 3.11+

Python libraries:

  • matplotlib

The required Python libraries can be installed using pip3:

pip3 install -r requirements.txt

Program Usage

From the project directory, run the main.py file to run the simulation:

python3 main.py -p

The following command-line options are available:

usage: main.py [-h] [-g] [-p]

Train a Q-Learning Agent to play Tic-Tac-Toe.

options:
  -h, --help   show this help message and exit
  -g, --graph  generate Q-Learning Agent vs Random Agent graph
  -p, --play   play 10 rounds against the Q-Learning Agent

References

  • "Artificial Intelligence: A Modern Approach" by Peter Norvig and Stuart J. Russell
  • "Reinforcement Learning: An Introduction" by Richard S. Sutton and Andrew G. Barto

About

Reiniforcement learning Tic-Tac-Toe


Languages

Language:Python 100.0%