BG1, PRELOAD BG2, PRELOAD

Results 1 to 6 of 6
  1. #1

    Default Artificial Intelligence!

    I wanted to make a computer opponent in my tic-tac-toe level but I never had experience in AI programming, so I was wondering where I would start considering that I want to work on other AI projects.

  2. Thanks!


  3. #2
    German Community Moderator CuriousSack's Avatar
    Points: 90,484, Level: 93
    Level completed: 60%, Points required for next Level: 766
    Overall activity: 100.0%
    100 Experience Points 7 days registered 250 Experience Points 30 days registered 500 Experience Points
    PSN
    CuriousSack
    Join Date
    May 2011
    Location
    Germany
    Posts
    3,673
    Blog Entries
    19

    Default

    So here's the chance for our logic puzzle freaks to betray secrets and help our new friend!

  4. Thanks!


  5. #3

    Default

    If you want an unbeatable AI that can calculate all the possible moves, the best solution would be to make a binary algorithmic system but I have never delved too deep into that and it takes some knowledge to make it work correctly, any tiny mistake and the whole thing fails basically.

    I'm lazy so I would never even attempt the method previously mentioned. What I would do is to use tags to map out the board conditions. The AI should know which ones of the 9 squares that are available and by analyzing the taken ones, be able to play accordingly. You need to set up rules. For example; if 2 squares in a row are taken, the third square should be highlighted for the AI, thus prioritized. The more rules you add the smarter the AI will become. You basically need to learn a bunch of tags and selectors how to play tic-tac-toe.


  6. #4

    Default

    This goes for any other board game right?

  7. Thanks!


  8. #5

    Default

    Pretty much, yes. Some are harder and some are easier. I'd label tic-tac-toe as an easier one due to the simplicity of the game.


  9. #6
    Sackperson Private koltonaugust's Avatar
    Points: 25,934, Level: 49
    Level completed: 39%, Points required for next Level: 616
    Overall activity: 65.0%
    7 days registered 100 Experience Points 250 Experience Points 500 Experience Points 30 days registered
    PSN
    Koltonaugust
    Join Date
    Jul 2010
    Location
    Texas
    Posts
    1,200
    Blog Entries
    19

    Default

    Tic Tac Toe is actually very easy to make an unbeatable ai. You could do a variety of different things such as counting each possible line for X's and O's (8 lines) for 2 either. There's also just go for middle if it's not taken. Basically the order should be:
    0. Is the middle taken (optional): If no, put it on middle
    1. Can my opponent win: if yes, block them.
    2. Is there a free corner: If yes, take one.
    3. Is there a free spot: If yes, take one.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •