项目作者: ChakradharG

项目描述 :
A tictactoe playing bot that learns from losing and remembers not to make the same losing move again
高级语言: Python
项目地址: git://github.com/ChakradharG/TicTacToe_Trainable.git
创建时间: 2019-04-04T11:59:22Z
项目社区:https://github.com/ChakradharG/TicTacToe_Trainable

开源协议:MIT License

下载


TicTacToe_Trainable

A tictactoe playing bot that implements trial and error method wherein whenever it loses, it deletes the last (wrong) move it made from the list of possible moves. If only 1 move is possible for that particular board then the cpu deletes the previous move (i.e., it backtracks).

At the time of upload, 1 have trained the code in excess of 1200 games. But it would take round about 10,000 games
to learn all the moves.

T3_Final is the actual game which imports the T3_Core file.
T3_board contains all possible combinations of the board.
T3_do contains the corresponding possible moves for the current state of board.
T3_winratio contains win/loss details, 1 means the cpu won/tie and 0 means it lost.


Getting Started

  • Clone this repository
  • cd TicTacToe_Trainable
  • Run T3_Final.py