forked from sabren/Tic-Tac-Toe
-
Notifications
You must be signed in to change notification settings - Fork 0
coding challenge: Create an app that can interactively play the game and never lose.
rajasekaran86/Tic-Tac-Toe
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DJTickyTack =========== DJTickyTack is a Tic-Tac-Toe server built in python with Django. Players can create or join any number of games, and play proceeds asynchronously. Although Tic-Tac-Toe is a rather silly application of this technology, the software serves as prototype server for more advanced turn based games, such as Chess, Checkers, or Go. It provides both a rudimentary HTML interface and a RESTful API. Requirements: ------------- python (developed with v 2.7) django (developed with v1.2.4) django-registration Running the Server ------------------ To set up the database (only required before the first run): python manage.py syncdb To start the server: python manage.py runserver localhost:8888 Then go to: http://localhost:8888/ MinMaxMoe ========= MinMaxMoe implements the rules of tic tac toe and a complete brute-force solution to the game based on the minimax algorithm from game theory. It can play you interactively in the shell, or can be scheduled to play asynchronously on a DJTickyTack server. Setup ----- MinMaxMoe uses a database of all possible lines of play. The game tree is stored in 'gametree.dbm', which you must generate manually. # from TickyTack directory: python MinMaxMoe/gentree.py On my low-end 2010 win64 laptop, this takes about two and half minutes and generates a 4.5MB file. Your mileage may vary depending on CPU strength and the anydbm modules you have configured in your python. NOTE: You only need to do this *once*. (See the docstrings in gentree.py for rationale.) Running ------- # from TickyTack directory: python MinMaxMoe/play.py
About
coding challenge: Create an app that can interactively play the game and never lose.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 98.6%
- CSS 1.4%