Library tutorials & articles
AI 2 - Game Playing (Artificial intelligence)
By Chris Stones, published on 15 Mar 2003
Page 6 of 6
- Introduction
- Theory
- CODE 1
- CODE 2
- CODE 3
- Conclusion
Conclusion
AI Game playing - (Conclusion)
So, that probably looks wuite complicated, i would recomend you now download the zip file attached to this and see the whole thing in action. Remember, all you need to code to get a simple 2 player AI game playing is... A Class that...
- Holds all data on a possible game state
- knows the address of its parent
- Is capable of giving itself a score based on how favorable it is to the computer
- Can make itself a clone of its parent, then aply an operation (e.g. move X to grid 2).
- Knows how many childen it has spawned.
- Is capable of reporting its own score to its parent
- Knows when it is a terminal state
- Can grow a search tree of objects of the above class
- Can show the game state ggraphicaly
- Apply the minni-max algorithm
- Order possible next moves in order of score, and execute the state with the highest score
Related articles
Related discussion
-
conting repeated words
by Slicksim (2 replies)
-
Can somebody help: CAsyncSOcket class (Client-server networking)
by Mohammad Rastkar (3 replies)
-
custom progress bar in a datagridview with threading
by konikula (1 replies)
-
Calling C++ DLL from C#
by Thushan Fernando (1 replies)
Events coming up
-
Dec
6
Developing AJAX Web Applications with Castle Monorail
London, United Kingdom
Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!
wher do i get the windows.h header file? the main.cpp code doesnt seem to work and has quite a few errors. help please!
after you get this code to run i need to know how to be able to save to a file and replay the game play before. if the player is starting a new game he/she should be prompted to enter their name and it should be pass to a constructor of the tictactoe board object . if the user wishes to save the game they should be prompted to enter te name of the ouput file. the output should have the player info and as well as the different moves that make up the game.
i might need two sperate files containing the header and implementation of the player class , file representing the playing board and the file containing the main program.
I really need some help on getting this to work and any help with code or pseudocode to implement this will be appreaciated. can i be notify at oyetih@yahoo.com
This thread is for discussions of AI 2 - Game Playing (Artificial intelligence).