5 Replies - 1845 Views - Last Post: 13 September 2010 - 06:13 AM Rate Topic: -----

#1 Eclipse Reborn  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 135
  • Joined: 26-June 10

[C++] Basic AI

Posted 11 September 2010 - 03:13 AM

I'm interested in creating some sort of AI, I was thinking of creating one for Tic Tac Toe. But a bunch of if statements isn't really an AI.

if (user[0][0]) ....
else if (user[0][1]) ...


And it isn't very dynamic, as it wouldn't act on 2 squares next to each other, I'm kinda stumped on making it dynamic. I was thinking on building a board of all the users moves, then choosing the best square ( if you could win, that would be top priority, losing would be 2nd, then just pick a random square ).

Any recommendations would be nice.

Is This A Good Question/Topic? 0
  • +

Replies To: [C++] Basic AI

#2 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: [C++] Basic AI

Posted 11 September 2010 - 03:47 AM

A good place to read up at
http://ai-depot.com/
Was This Post Helpful? 1
  • +
  • -

#3 Eclipse Reborn  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 135
  • Joined: 26-June 10

Re: [C++] Basic AI

Posted 11 September 2010 - 06:53 PM

I had a look at the site, and if there is something that is going to help me, it is hidden pretty good.
Was This Post Helpful? 0
  • +
  • -

#4 Eclipse Reborn  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 135
  • Joined: 26-June 10

Re: [C++] Basic AI

Posted 12 September 2010 - 04:27 AM

I've been looking around and there doesn't seem to be many AI tutorials out there, and all the ones I've found aren't that great.
Was This Post Helpful? 0
  • +
  • -

#5 Eclipse Reborn  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 135
  • Joined: 26-June 10

Re: [C++] Basic AI

Posted 13 September 2010 - 03:45 AM

Don't know if bumps are allowed.
Was This Post Helpful? 0
  • +
  • -

#6 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: [C++] Basic AI

Posted 13 September 2010 - 06:13 AM

Minimax. Also, available on the site Janotte linked to.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1