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
StarStarStarStarStar 81%Total: 5,323 All time: 484 This week: 78Up
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: 23829 in United States United States
Week rank: 683 Down76 in United States United States Down
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,323
This week:0
All time:484
This week:78Up
User Ratings User Comments (8)
 All time
Utility:91%StarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:86%StarStarStarStarStar
Examples:96%StarStarStarStarStar
Tests:80%StarStarStarStarStar
Videos:-
Overall:81%StarStarStarStarStar
Rank:13
 
Great class.
9 years ago (Michael McGinn)
90%StarStarStarStarStar
It was very good experience to use this demo script.
9 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