Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. private void backpropagate() {
  2.  
  3. Node curNode = new Node(null,-1,-1);
  4. double score = 0;
  5.  
  6. for (int i = 0 ; i < pods.length ; i++) {
  7.  
  8. curNode = current[i];
  9. score = curNode.score;
  10.  
  11. while (curNode.parent != null) {
  12. curNode.parent.score += score;
  13. curNode.visits++;
  14. curNode = curNode.parent;
  15. }
  16.  
  17. if (curNode.parent == null) {
  18. //minLog("Increment root !");
  19. curNode.visits++;
  20. }
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement