I can't figure out how to implement this in java, i'm using a 2D array to store the board state. Can someone write some code on how to implement this with variable depth search and maybe alpha beta pruning.
I'm confused on how to write the max and min functions o_o
Minimax algorithm AI connect 4
Started by farzher, Jun 14 2010 12:10 PM
5 replies to this topic
#1
Posted 14 June 2010 - 12:10 PM
|
|
|
#2
Posted 14 June 2010 - 12:41 PM
bump, any kind of connect 4 AI would be great. minimax just seemed to be the most popular. halp!
#3
Posted 14 June 2010 - 12:59 PM
Any move that leads to a forced loss would be a good option for pruning.
#4
Posted 14 June 2010 - 01:44 PM
I gotta implement the basic algorithm before I can start pruning D:
#5
Posted 14 June 2010 - 02:23 PM
We aren't going to write code for you. You may have to post some of your code for comment. Recursion is pretty common for this type of thing.
#6
Posted 14 June 2010 - 02:34 PM
I don't have any code to show, I have the heuristic function that returns the value of the board for the given player, and i'm storing the board as a 2D array. But besides that I have no AI code.


Sign In
Create Account

Back to top









