Love this site? Hate it? Leave us some comments.

Tic-Tac-Toe program (C source)

Submitted By: Unknown
Rating: starstarstarhalf star (Rate It)
Share: Share By Email By Email

Uses alpha-beta pruning minimax search to play a "perfect"
game. The alpha-beta pruning can be removed, but will increase
search time. The heuristic and move ordering in Best_Move() can
also be removed with an increase in search time.


NOTE: Some downloads must be obtained through publishers´s site.
Do you want to get your software listed on this site? Go to our submissions area.

Screenshot


Details

File Name:
SC_TTT.ZIP
Product homepage:
Order page:
Languages:
Unknown
Platforms:
Unknown
Release date:
1/1/1900
License:
Unknown
Size:
3 KB
Price/Fee (US$):
Unknown
Number of downloads:
16759

Comments (7)

this is awesome starstarstarstar   Posted by: Avanthi on Sunday, May 05, 2002

this is a piece of good work i think.

Comment starstarstarstar   Posted by: Nikhil on Wednesday, June 27, 2007

Excellent work! Could have used graphic to improve the quality of the game.

Comment starstarstarstarstar   Posted on Friday, August 31, 2007

well done....

Comment starstarstarstarstar   Posted by: CcCompile on Saturday, March 22, 2008

Amazing works perfectly. Thanks.

Best:_Move starstarstarstarstar   Posted by: I Need Help on Tuesday, December 02, 2008

Could somebody help me about these lines of the code????:

int Best_Move(Board_Type Board, Square_Type Player, int *Square, int Move_Nbr,
int Alpha, int Beta) {
int Best_Square = -1;
int Moves = 0;
int I;
Move_Heuristic_Type Move_Heuristic[Squares];

Total_Nodes++;

/* Find the heuristic for each move and sort moves in descending order */
for (I = 0; I < Squares; I++) {
if (Board[I] == Empty) {
int Heuristic;
int J;
Play(Board, I, Player);
Heuristic = Evaluate(Board, Player);
Play(Board, I, Empty);
for (J = Moves-1; J >= 0 &&
Move_Heuristic[J].Heuristic < Heuristic; J--) {
Move_Heuristic[J + 1].Heuristic = Move_Heuristic[J].Heuristic;
Move_Heuristic[J + 1].Square = Move_Heuristic[J].Square;
}
Move_Heuristic[J + 1].Heuristic = Heuristic;
Move_Heuristic[J + 1].Square = I;
Moves++;
}
}

Thanks in advance.

ah!! great job to the programmer

help me please star   Posted by: christina on Tuesday, March 31, 2009

I am astudent ,I have a project about the tick tack toe . I want you to help me please

TIC TAC TOE Praogram starstarstar   Posted by: vikash on Wednesday, May 06, 2009

your program can be more enhanced.

Add Your Rating

(Not published)
star
starstar
starstarstar
starstarstarstar
starstarstarstarstar
 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.