Thread: question on writing connect 4

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    24

    Question question on writing connect 4

    i have already written the connect 4. but i would like to play with (i.e. play with ai)
    how can i do that??

    p.s. i am writing by c++ and in dos only
    Last edited by fail50; 04-13-2011 at 08:37 AM.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Search the board, we had a connect 4 competition some years ago. All of the source was posted (but don't download mine cause it was really broken!)

    Alternatively, google for "mini-max algorithm" and/or "alpha-beta pruning"

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    24
    can i write by heuristic function???
    but after searching by google i have no idea for this
    how can i start??

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Start by writing code and running into specific issues. Then come here and ask about said specific issues.

  5. #5
    Registered User
    Join Date
    Apr 2011
    Posts
    5
    I saw a connect four on here that was pretty cool although the post was a bit old, my question was that i Built a board but then got totally lost in the place and drop function for the users pieces and have been told this is the simple part of the process, I was not looking to have the win function yet just get the game working. the one i saw used addition charaters to make up a small square and used coloured x's and o's, I am just looking at a simple game that works for the moment.

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Closed. Please do not bump old threads.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. some problems about writing connect 4
    By fail50 in forum C++ Programming
    Replies: 5
    Last Post: 04-04-2011, 08:43 AM
  2. Writing use cases for AI systems question.
    By Orange Lozenge in forum General AI Programming
    Replies: 1
    Last Post: 12-01-2010, 07:44 AM
  3. A simple question about writing a Makefile
    By meili100 in forum C++ Programming
    Replies: 3
    Last Post: 04-29-2008, 08:07 PM
  4. File reading/writing question
    By Rider in forum C++ Programming
    Replies: 26
    Last Post: 12-23-2006, 05:27 AM
  5. Client timed-out once on connect(), can never connect() again
    By registering in forum Networking/Device Communication
    Replies: 6
    Last Post: 10-28-2003, 03:46 PM