pollacchi 0 Newbie Poster

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)
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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.