Jump to content
  • Advertisement
Sign in to follow this  

My first AI program

This topic is 3480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After spending two days on this program, I finally finished my first AI player for a game. Whoo! I created the game "Seven" and implemented the AI for it. The game is a console text-based game, so its not super exciting. The big hurdle was to figure out how to use trees for making decisions. I used a min-max tree with connection weights which are adjusted each time the game is played so the computer 'learns' by choosing the highest weighted connections. It's not truly a min-max tree, but its pretty close. The only problem with my implementation is that the AI will lose all of its initial games until it learns by trial and error, which moves are good and bad. It doesn't try to predict which move would be 'best'. Anyways, if you want to try out the game or compile the source code, here's a link to the zip file which contains the .exe and project/source files. I think my next project will be the AI for tic-tac-toe.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!