Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Minimax in AS2
10-02-2012, 10:51 PM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
Minimax in AS2
I am making a gomoku AI using actionscript 2.0 and I am using the minimax (probably with alpha beta pruning)
(gomoku is like tic tac toe, but on a 15x15 board and you have to make 5 in a row)
I have everything working except the minimax part.
I know what minimax is and how it works and that it's recursive.
The only problem I'm having is implementing it.
the board is an array 225 long.
I have these functions in the code
placeB(#) - places a black piece on # of array and on the screen
placeW(#) -places a white ...
checkwin(board) - checks if there are any 5 in a rows in the board returns 2 if it's white 1 if it's black
Value(board) - returns the value of the board using my criteria(dw about these)
and I have the part that runs everything
So how would I implement minimax to this game?