AI 1 - Problem Solving (Artificial intelligence)

Conclusion

As I said earlier, I would recommend you read through the source code in this tutorial, then download the zip file, open it with Visual c++, and see the thing in action.

Because of the size of the example program, I'm guessing that you havent followed it 100%. And it looks much much more complicated that it atually is.

To code your own ai program all you need is:

  • A method of storeing States
  • A method for expanding states
  • A way of tracing back to the initial state
  • A way of sorting the states
  • A function for scoreing a state.
  • And a main loop that removes 1 state from a list, and puts its children onto the list.

Each of the above very easy for a comfortable c++ programmer. The difficult part is putting it all together and making it readable and understandable to others!

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.”