A web app to visualize the minimax algorithm on a standard tic tac toe board
I used the Django framework for the back end. I used WebSockets, as implemented in django-channels, to maintain a persistent connection and push the tree to the client. The tree is rendered using the d3.js framework.
Check it out at https://minimax-visualizer.herokuapp.com/
The logic for the tic tac toe is contained in /tic_tac_toe/ttt_game
. The JavaScript files for drawing the tree and game control are in /tic_tac_toe/static/tic_tac_toe
.
-
Clone this repo to your local machine using
https://github.com/saisunku/games.git
-
Create a virtual environment and install everything in
requirements.txt
-pip install -r requirements.txt