Thread: AI contest: Connect four

  1. #61
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Had to change your for loops so that x is declared in each loop, not just the first, like the standard says.
    I appreciate your smugness and must note that, standard or not standard, what you've described is not compiler independent. I prefer using for loops the way you describe as standard, but Microsoft is intent on stopping me from practicing using my preferred technique. (in any case pardon my lack of standardized code).

    Maybe the other players have some test bots as well?
    I just had my AI play against itself and sometimes I played against it and other times both.

  2. #62
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    I prefer using for loops the way you describe as standard, but Microsoft is intent on stopping me from practicing using my preferred technique.
    I feel your pain, that drives me nuts with MSVC++ as well meaning I have to declare the variable outside the loop everytime if theres even a chance that it might be compiled with anything else. Grrrrr...

    Dang, if I had known so few people would have entered, I would have kept my initial AI which had a completely different eval function and way of picking moves. It played all right but it was slow so I unfortunately trashed it when I redid the AI.

  3. #63
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Jeremy might still submit; he seemed quite interested, but he hasn't been online since before the dark period.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #64
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I feel your pain, that drives me nuts with MSVC++ as well meaning I have to declare the variable outside the loop everytime if theres even a chance that it might be compiled with anything else. Grrrrr...
    Code:
    #define for if( 0 ); else for
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  5. #65
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Code:
    #define for if( 0 ); else for
    That's nice. Even simpler:
    Code:
    #define for if (1) for
    or even simpler than that, Microsoft could actually follow the standard.
    Last edited by LuckY; 11-11-2004 at 09:55 AM.

  6. #66
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,090
    Don't make it too simple (yours has unexpected results here):
    Code:
    if (isFalse)
        for (int i = 0; i < 10; ++i)
            cout << i << endl;
    else
        for (int i = 0; i < 10; ++i)
            cout << 10 - i << endl;

  7. #67

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Action Game - AI Contest
    By Queatrix in forum Contests Board
    Replies: 4
    Last Post: 01-18-2007, 06:55 PM
  2. New AI contest: sign up
    By Sang-drax in forum Contests Board
    Replies: 20
    Last Post: 07-27-2005, 05:54 PM
  3. chess ai contest
    By Raven Arkadon in forum Contests Board
    Replies: 7
    Last Post: 07-09-2005, 06:38 AM
  4. AI Contest Proposal
    By MadCow257 in forum Contests Board
    Replies: 4
    Last Post: 03-13-2005, 03:27 PM
  5. Game Design Topic #1 - AI Behavior
    By TechWins in forum Game Programming
    Replies: 13
    Last Post: 10-11-2002, 10:35 AM