/tic-tac-toe

AI playing tic-tac-toe

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Build Status

#First try at AI using tic-tac-toe game as a usecase

What is it ?

This project offer three tools :

  • player.py : create an AI player from a learning file
  • tictactoe.py : generate the learning file or allow a human to play against an AI
  • generation.py : create players and try to obtain a good one by playing them against each other and breeding

The result so far ?

You can create an AI player which will not play on a already taken spot but will not be decent player.

#Player.py

usage: player.py learn [-h] --learn-file LEARN_FILE --player-file PLAYER_FILE
                       [--deep DEEP] [-v] [--not-random]

AI Player of Tic-Tac-Toe

positional arguments:
  {learn}

optional arguments:
  -h, --help            show this help message and exit
  --learn-file LEARN_FILE
  --player-file PLAYER_FILE
  --deep DEEP
  -v
  --not-random

#Tictactoe.py

usage: tictactoe.py [-h] {play,solve} ...

Play TicTacToe

positional arguments:
  {play,solve}

optional arguments:
  -h, --help    show this help message and exit
  --player-file PLAYER_FILE
  --export-file EXPORT_FILE