negamax algorithm

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2004
Posts: 1
Reputation: pollacchi is an unknown quantity at this point 
Solved Threads: 0
pollacchi pollacchi is offline Offline
Newbie Poster

negamax algorithm

 
0
  #1
Jul 26th, 2004
HI there

I am designing a draughts program and require a game tree for the computer moves. I intend to use a negamax game tree and have obtained the following algorithm

Algorithm:
1: if (depth ==0) then
2: return evaluate(tree)
3: score = -inf
4: for i<-1 to node.branch.length
5: new_tree = traverse(tree, tree.branch[i])
6: value = negamax(new_tree,depth-1)
7: if (value>score) then
8: score = value
9: return score

does anyone know how to implement this in java. any help would be much appreciated
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC