Skip to content
coding challenge: Create an app that can interactively play the game and never lose.
Branch: master
Clone or download
Pull request Compare This branch is 31 commits ahead, 25 commits behind coxmediagroup:master.
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 is a Tic-Tac-Toe server built in python with Django.
Players can create or join any number of games, and play proceeds

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.


  python (developed with v 2.7)
  django (developed with v1.2.4)


Running the Server

To set up the database (only required before the first run):

  python syncdb

To start the server:

  python runserver localhost:8888

Then go to:



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.


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/

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 for rationale.)


  # from TickyTack directory:
  python MinMaxMoe/

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.