954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

negamax algorithm

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

pollacchi
Newbie Poster
1 post since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You