Results 1 to 3 of 3
Thread: Connect 4 AI help!
- 09-30-2012, 02:20 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 63
- Rep Power
- 0
Connect 4 AI help!
I need help in making a AI for my connect 4 program. Specifically it's not just any connect 4, but to win, you must get a L shape.
(ie. ***) . I am trying to figure out how to make a recursive method to give me the next best possible move based on the move depth.
*
Having trouble figuring out the point system, and how to know if a move is better than another. Also maybe a general outline of how I should achieve this.
Any help would be appreciated.
-Billy
- 09-30-2012, 09:48 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,402
- Blog Entries
- 7
- Rep Power
- 17
Re: Connect 4 AI help!
Google for the 'mini-max', 'alpha-beta pruning' or 'Shannon A', 'Shannon B' methods; they all try to find a 'best' move in a game tree (recursion!) and an evaluation function.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-01-2012, 01:35 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 63
- Rep Power
- 0
Re: Connect 4 AI help!
Hmm, after looking at it, i'm not too sure on how to import past moves into play. In this program, the human player always goes first. Lets say after the computer makes the 2nd move, how would it test for all moves excluding the one's that are already filled out?
maybe say at that spot, if it's not white, increment the column?
Similar Threads
-
Connect Four
By tabchas in forum New To JavaReplies: 4Last Post: 05-03-2011, 01:11 AM -
Connect to wap
By HoangNgoc in forum CLDC and MIDPReplies: 2Last Post: 12-23-2010, 09:13 AM -
connect through usb
By taufiqbzz in forum NetworkingReplies: 0Last Post: 11-01-2010, 11:04 PM -
Connect Four
By chick in forum New To JavaReplies: 3Last Post: 05-04-2010, 04:33 AM -
how connect
By herfnai in forum JDBCReplies: 1Last Post: 08-18-2008, 06:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks