PHP Classes

Tic-Tac-Toe: Tic-Tac-Toe game using alpha beta search algorithm

Recommend this page to a friend!
  Info   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum (13)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 79%Total: 5,334 This week: 1All time: 483 This week: 89Up
Version License PHP version Categories
tic-tac-toe 1.0GNU General Publi...5Algorithms, PHP 5, Games, Artificial ...
Description 

Author

This package implements an interactive Tic-Tac-Toe game

It can present a Tic-Tac-Toe board that is updated using AJAX requests upon each user move.

The package implements the alpha beta search algorithm (Minimax search optimized by performing alpha beta pruning) for determining the next move, which are common algorithms for zero-sum two player games (e.g. Tic Tac Toe and Chess).

Innovation Award
PHP Programming Innovation award winner
December 2010
Winner


Prize: One copy of the Zend Studio
Tic-Tac-Toe is a very simple game. However, it is not trivial to implement a strategy to win as a computer opponent.

This class implements the alpha beta search algorithm to determine the next move of a computer opponent in a Tic-Tac-Toe game.

Manuel Lemos
Picture of Amin
Name: Amin <contact>
Classes: 3 packages by
Country: United States United States
Age: 35
All time rank: 23929 in United States United States
Week rank: 91 Up11 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details

If you want the computer to start the game, please make following change in Const object(/libs/Position.js): TURN : this.COM

  Files folder image Files  
File Role Description
Files folder imagelibs (4 files)
Files folder imagetest (2 files)
Plain text file Board.php Class board class
Accessible without login Plain text file COPYING.txt Lic. GPL
Plain text file GameSearch.php Class abstract search class
Accessible without login Plain text file index.html Data example
Accessible without login Plain text file index.php Example
Accessible without login Plain text file README.txt Doc. Read me
Plain text file TicTacToe.php Class main class

  Files folder image Files  /  libs  
File Role Description
  Accessible without login Plain text file jquery-1.4.2.js Data js library
  Accessible without login Plain text file Position.js Data js library
  Accessible without login Plain text file raphael-min.js Data js library
  Accessible without login Plain text file TicTacToe.js Data js library

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file BoardTest.php Test test
  Accessible without login Plain text file TicTacToeTest.php Test test

 Version Control Unique User Downloads Download Rankings  
 0%
Total:5,334
This week:1
All time:483
This week:89Up
User Ratings User Comments (8)
 All time
Utility:89%StarStarStarStarStar
Consistency:90%StarStarStarStarStar
Documentation:84%StarStarStarStarStar
Examples:93%StarStarStarStarStar
Tests:78%StarStarStarStar
Videos:-
Overall:79%StarStarStarStar
Rank:28
 
Great class.
9 years ago (Michael McGinn)
90%StarStarStarStarStar
It was very good experience to use this demo script.
10 years ago (Priyank Khunt)
67%StarStarStarStar
good for practise
10 years ago (shyam6511)
87%StarStarStarStarStar
this is real awesome
10 years ago (Bokang Moqelane)
90%StarStarStarStarStar
Great Job! Works flawlessly.
12 years ago (Alexander W Clark)
85%StarStarStarStarStar
Great!!
12 years ago (Enmanuel Alabau)
90%StarStarStarStarStar
His work is as ever: Robust, straight forward and simple
13 years ago (Keyhan Sedaghat)
90%StarStarStarStarStar
Very cool.
13 years ago (rudie dirkx)
85%StarStarStarStarStar