943,541 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 5765
  • Java RSS
Jul 26th, 2004
0

negamax algorithm

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
pollacchi is offline Offline
1 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Using the *awt package
Next Thread in Java Forum Timeline: Passing arguments to jsp file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC