Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
coding challenge: Create an app that can interactively play the game and never lose. http://djtickytack.michaljwallace.com/
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
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