Library tutorials & articles

AI 2 - Game Playing (Artificial intelligence)

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
And code that...
  • 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

Comments

  1. 12 Sep 2005 at 07:49

    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!

  2. 07 Aug 2005 at 17:45

    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  

  3. 01 Jan 1999 at 00:00

    This thread is for discussions of AI 2 - Game Playing (Artificial intelligence).

Leave a comment

Sign in or Join us (it's free).

AddThis

Related discussion

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!