Help me: GoMoku AI Logic

This is a discussion on Help me: GoMoku AI Logic within the Game Programming forums, part of the General Programming Boards category; Greetings. I'm writing an MFC Go Moku game. If you don't know what that is (well for one thing, you ...

  1. #1
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001

    Exclamation Help me: GoMoku AI Logic


    I'm writing an MFC Go Moku game. If you don't know what that is (well for one thing, you probably can't help me), it is a board game on a 20x20 grid. It's a two player game: white vs black. The object is to get 5 in a row to win, and on your turn you can place a stone on any intersection in the grid.
    To give you an idea of the game, it will have network playability, so players can have 3 options: single player against the cpu, two player local, or two player network. The single player and two player modes are already running great (of course, single player isn't any fun with a dumb computer).

    Anyway, my predicament is the cpu AI. I can't quite wrap my mind around how to approach it. The way I'm set up now is generally to do this:
    void CMainWnd::CpuMove() {
      int x, y;
      CpuDetermineBestMove(x, y);
      CpuDetermineOpponentBestMove(x, y);
    The way I figure it, I want to determine the best coords for us to move then figure the best place our opponent can move (and if it will lead to a win) so we can block him if his best move is better than ours (meaning he wouldn't have to block our move). Of course this may not make sense the way I'm describing it, so if not, sorry.

    Please assist if you can hold my hand and toss out some ideas as to how you would approach this problem. And of course processing time does matter, but I want to have a very intelligent computer, so I'm aiming for quality over speed (although I will have different settings of difficulty for the AI).

    Thanks very much for any assistance you can offer.

    I'm attaching the program in its current state for you to look at.
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fun with pathfinding
    By BobMcGee123 in forum Game Programming
    Replies: 11
    Last Post: 06-15-2006, 02:28 PM
  2. chess ai contest
    By Raven Arkadon in forum Contests Board
    Replies: 7
    Last Post: 07-09-2005, 06:38 AM
  3. God
    By datainjector in forum A Brief History of
    Replies: 746
    Last Post: 12-22-2002, 11:01 AM
  4. Game Design Topic #1 - AI Behavior
    By TechWins in forum Game Programming
    Replies: 13
    Last Post: 10-11-2002, 10:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21