Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-02-2012, 09:51 PM   PM User | #1
Tabarzin
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Tabarzin is an unknown quantity at this point
Question 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?
Tabarzin is offline   Reply With Quote
Reply

Bookmarks

Tags
as2, gomoku, minimax

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:52 AM.


Advertisement
Log in to turn off these ads.