Tic-Tac-Toe
  home | services | products | resources | forum
 
about us | contact   
Particle
November 25th, 2024



www.theparticle.com
Main
Services
Products
Resources
Forum
About Us
Contact

Particle Revelation
Hardware Destruction
Quotes
Humor [alpha]
Murphy's Laws

Programming
Java
Java Data Structures
C# Data Structures
Database Design
Graphics Tutorial
Artificial Intelligence

Downloads
SQLRunner
Graphics Tutorials
Hacking Tutorials
Java Applets
MIDI Music
Gov & Misc Docs

Games
Chess Game
Asteroids
Tic-Tac-Toe
Tetris

Applets
DRAW!
FlightBox
pWobble 3D
pRunner
NYU HWs
Swarms
Geometry
Chaos
Machine Learning

Academic
CISC 7700X
CISC 7512X
CISC 7500X
IT Mngmt (old)
SW (old)
Networks (old)
OS (old)
AI (old)
App Dev (old)
C++ (old)
OOP (old)
Web (old)
Perl (old)
DBMS (old)
ProgLangs (old)
PHP (old)
MltMedia (old)
Oracle (old)

Misc
Privacy Policy
Publications
profphreak.com



Tic-Tac-Toe

This Tic-Tac-Toe game uses an alpha-beta search algorithm. The implementation is kind of unconventional. It's recursive, with reversing and negating alpha-betas with each recursion. A version of this algorithm appeared in June 2001, JAVAPro magazine. It looked impressive, so we've reimplemented it (with a few modifications). The UI is mostly borrowed from the JDK demo TicTacToe.

The skill level directly represents the search depth. Skill 1 just generates moves, and then gets an estimate for each of those moves. Skill 2 generates the moves, recursively goes though those moves, then recursively goes though more moves, then, using an estimate, figures out the best move. Subsequent skills just increase the number of recursions that happen (thus, increasing the strength of this game).

So far we've managed to beat it (quite easily) on skills 1 through 3. If you can defeat it on skill 4 and up, please let us know (with the moves ;-) The reason the game gets virtually unbeatable around skill 4 is that by that point, it's looking though 7 ply+estimate in the game, which is nearly a complete game tree (ie: most of the time you either win or loose in 4 moves or less; beyond that it's usually a draw).

Note, tic-tac-toe is one of those games where you can always force a draw. Even on skill 6, (where it definitely goes through the complete game tree; and plays a perfect game), you can still not let the computer win.

Anyway, have fun. (Compiled via JDK 1.0.2; Tested under IE5.5 & NS3)

Btw: if you want the source, just get it here: [pTicTacToe.java]

Skill 1 Skill 2
   
Skill 3 Skill 4
   
Skill 5 Skill 6





















© 1996-2024 by End of the World Production, LLC.