Advertisement

tic-tac-toe AI tips pls....

Started by March 29, 2002 10:34 PM
23 comments, last by mickey 22 years, 7 months ago
i just don't want my code to contain lots of if else statements....as much as possible, i want it as small as possible, suggestions like loading it from a file is great but pls explain more as i don't fully understand this concept, more tips would be greatly apprecieted thanks! oh btw, i'll be making an unbeatable computer, Edited by - mickey on March 29, 2002 11:44:08 PM
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Someplace out there in the linked articles from this site is an explanation of the "Min-Max" theory specific to a t/t/t game. I think it may very well be disguised as a chess thing or even a search algorithm. Seek and you shall find.

Dave Mark
President and Lead Designer
Intrinsic Algorithm Development

"Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Advertisement
Tic-Tac-Toe... Make the computer go first, Search for "How to Always Win in Tic-Tac-Toe" Then put that in a text file using your own language, and read from it and use what it says to determine your next move, Or you could just caculate every possible move, and elimiate all the moves which lead to a Possible lose, and use the tree to win, quite simple.

Ps. the only way to make an unbeatable player in Tic-Tac-Toe is make it always go first.
quote: Ps. the only way to make an unbeatable player in Tic-Tac-Toe is make it always go first.
Actually the second player in TTT can always force a draw.
Hmm, yeah I belive your right, I just know that 1st player can force player 2 to not win... but if player2 can force a draw, then you cannot make an unbeatable computer
didn''t you people ever see War Games ?
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Advertisement
Gee Mathew Broderick was YOUNG back then... but it WAS a fun film for it''s time!

Timkin
Check out this link at Gamasutra. You will need to register (free) but if you haven''t registered at Gamasutra, you aren''t REALLY a game programmer anyway! The article explains EXACTLY how to do AI for TTT.

Dave Mark
President and Lead Designer
Intrinsic Algorithm Development

"Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

I did one using MFC. I used minimax and depth-first search. It is merely searching recursively through 8 search depths, decreasing 1 each depth.
Yep. Sounds about right.

Dave Mark
President and Lead Designer
Intrinsic Algorithm Development

"Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement