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

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“XML is like violence - if it's not working for you, you're not using enough of it.”