New Connect Four Game

This is a discussion on New Connect Four Game within the Game Programming forums, part of the General Programming Boards category; Just updated my connect four game to using trap search, a hash table, and the added ability to learn from ...

  1. #1
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728

    New Connect Four Game

    Just updated my connect four game to using trap search, a hash table, and the added ability to learn from its own mistakes. This means that you cannot beat it the exact same way twice ever (unless you delete the hash file! )!

    Its still console, I wanted to get it up and going before I spend the endless hours trying to make it into a mouse driven GUI.

    The algorithm is a little different than the traditional algorithm for connect four which relies on alpha-beta pruning, but I wanted to see if I could come up with a different way. So far it plays very well and you'll be hard pressed to beat it. Unfortunately I haven't been able to find another connect four game that uses the traditional algorithm to play against mine to see how well it would do. All the ones I've found have different dimensions than my board.

    Anyways enjoy! And if you have any comments, criticisms (except for complaints that its only console!), or whatever, I welcome them on this board! Also let me know how you fare, ie how often you beat it vs losing to it.
    Attached Files Attached Files

  2. #2
    ahhhh!!!
    Guest
    good game. the AI is very defensive. oh yeah, i wasnt sure what your quit command is so i typed "exit" and it sent the game into an infinite loop of output.... "where do you want to go" over and over.

  3. #3
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Oops I included exiting the game and error checking for text at the last second, but accidentally uploaded the old version without it. When I get home tonight I'll upload the .exe that includes those!

  4. #4
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Hehe, i've made a connect 4 game as well, not i didnt' spend much time on the ai. But im developing an othello game now, implementing minimax.

    Your game ai is pretti good, as said. But....i think your computer thinks too slowly lol..

  5. #5
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Yeah, unfortunately with since my algorithm relies so much on trap finding, there really isn't any way around having to check EVERY single move, which really bogs down the time it takes to think. The hash table helps out a little, but not as much as I had hoped for. How long was it taking to think? For me it takes about 20 seconds near the beginning, then picks up in the later stages of the game. But then again I have a fairly fast computer.

    **sigh** I was hoping for a better way to do it than the traditional way, but maybe I should write it over with minamax using alpha beta pruning, and then have the two programs go against each other to see which algorithm is better!

    PS, has anybody here been able to beat it on a regular basis?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 12:32 PM
  3. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-21-2006, 11:23 PM
  4. u got me wrong fellas
    By clover in forum Game Programming
    Replies: 4
    Last Post: 10-18-2003, 04:23 PM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

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