midtactoe logo

MidTacToe

Download

Current version: 1.1.0

JAD: http://jasonpratt.org/software/midtactoe/midtactoe.jad

JAR: http://jasonpratt.org/software/midtactoe/midtactoe.jar

Try pointing your cell phone's browser at the JAD link above. If that doesn't work, consult your cell phone's manual for information on how to download Java midlets to your device.

What is it?

MIDTacToe is a simple tic-tac-toe midlet. It should run on any J2ME/MIDP compliant device. It's designed specifically for cell phones. It has ten levels of difficulty, from ultra-easy (picking moves at random) to impossible (plays perfectly). My focus while building the program was to make a clean and efficient game engine, and build a facile interface that was well-suited for cell phones. I specifically avoided cramming in a lot of features.

Screenshots

screenshot1 screenshot2 screenshot3
screenshot4 screenshot5 screenshot6

FAQ

What is MIDTacToe?

See above.

How much does MIDTacToe cost?

MIDTacToe is FREE, distributed under the GNU GPL.

How do I install this on my cell phone or other MIDP device?

First, make sure you have a J2ME/MIDP device. Try this page for help. Most people should be able to download "over the air" (OTA) by pointing your cell phone's browser to the JAD link given above. If that doesn't work, consult your device's manual.

How does the program play tic-tac-toe?

MIDTacToe uses a standard minimax algorithm to search the game tree. Boards are evaluated very simply based on whether they are a win, and if so, how many moves it took to win (winning quickly is preferred over winning slowly). To speed things up, whenever a board value is determined, the value is cached for that board and all boards that are symmetrical to that board. Moves are searched in a random order so that the AI doesn't play the same way every game.

The game level is equivalent to the number of plys the AI searches when it is its turn. Thus, at level zero, the AI looks ahead zero moves, essentially playing randomly. At level one, the AI looks ahead only one move, so it will move randomly unless it sees a chance to win or a need to block the user from winning on the next turn. At level 9, the AI looks ahead nine moves, and can therefore play perfectly from a blank board.

Where do I report bugs, give feedback, and heap praise?

Please send all bugs, etc. to jason@jasonpratt.org.  No promises on actually doing anything, but I'll at least listen.

Where can I get the source?

The source is available under the GNU GPL here:

http://jasonpratt.org/software/midtactoe/midtactoeSource.zip.

Who is Jason Pratt?

I wrote MIDTacToe.  You can find out more about me here: http://jasonpratt.org/about/

jasonpratt.org