Author Topic: AI programming  (Read 2279 times)

0 Members and 1 Guest are viewing this topic.

Offline TiAddict

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +0/-0
    • View Profile
AI programming
« on: July 26, 2012, 06:25:36 pm »
Hello, im back to programming! And im creating a game, but im having hard time with programming the decision algorithm of AI. Can someone show me how "chess" AI algorithm work? Thank you! :D

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: AI programming
« Reply #1 on: July 26, 2012, 06:41:31 pm »
I wouldn't know that, i guess you could hard code every piece, or maybe look up the algorythm, so making chess-game? Much luck, and hope it turns out to be good and creative

Edit: hardcoding should be like this:
Make it tile-based, store all places in list or string, first let the ai check the opponents board, then check ai's pieces and let him look for the most important piece he could defeat atm, and else let him do a move to be close to defeating a piece, and just go on every move like that
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: AI programming
« Reply #2 on: July 26, 2012, 09:40:16 pm »
I know thepenguin made a really nice chess program, you can find that here.

I also remember that he put his formula for determining the moves somewhere. It assigns each possible move a rating based on what pieces it can attack, what pieces can attack it, and how it compared to its original possition. I forget the exact formula :P

P.S. You could rename your topic to something more descriptive like Chess AI.
« Last Edit: July 26, 2012, 09:40:39 pm by cyanophycean314 »

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: AI programming
« Reply #3 on: July 26, 2012, 09:47:21 pm »
One minor issue is that this would be a basics project? And thepenguin has an axe/asm version of the chess, so implementing the formula could e rather hard, i'm sure you could work it out with the same methode for the formula, but you would have to change a lot to have it working in basic

Edit: i haven't read it completely myself but here's a link to an descission algorythm theorie http://en.m.wikipedia.org/wiki/Minimax
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER