M,N,K Game AI
AI for a generic m,n,k game written in Python by Ryan Peterman and Scott Shi. Uses Minimax Algorithm to explore possible game states. Applies Alpha-Beta Pruning to only explore necessary states. Deployed on Heroku using Flask. Front-end written in ReactJS.
Usage
- From command line:
$ python tic-tac-toe.py
- From web: Current Link Here
Project file structure
├── app.py
├── package.json
├── Procfile
├── README.md
├── requirements.txt
├── src
│ ├── client
│ │ ├── app
│ │ │ ├── components
│ │ │ │ └── Board.js
│ │ │ ├── index.jsx
│ │ │ └── static
│ │ ├── index.html
│ │ └── public
│ │ ├── bundle.js
│ │ └── bundle.js.map
│ └── server
│ ├── board.py
│ ├── player.py
│ └── tictactoe.py
└── webpack.config.js
M-N-K Generalization (In progress)
- Generalize Board:
- Restrictions:
- K must be at least 3 (must match at least 3 in a row to win, else it's too easy)
- min(M, N) >= K (the smaller dimension of (M,N) must be greater than K to allow for a playable game
- M, N must be less than 10 (just for your convenience...)
- CURRENT --> Refine Computation of Game States:
- Create a general board checker for a NxN square board
- For cases in which M != N, continuously pass in subsets of square boards to check game state
- Set up front-end hosting separate from personal website
- Clean up backend response