MCPcopy Create free account
hub / github.com/MARIO-Math-Reasoning/Super_MARIO / update_recursive

Method update_recursive

mcts_math/nodes/mcts_node.py:41–45  ·  view source on GitHub ↗
(self, value: float, start_node: Type[BaseNode])

Source from the content-addressed store, hash-verified

39 self.__value_sum += value
40
41 def update_recursive(self, value: float, start_node: Type[BaseNode]) -> None:
42 self.update(value)
43 if self.tag == start_node.tag:
44 return
45 self.parent.update_recursive(value, start_node)
46
47 def puct(self) -> float:
48 q_value = self.q_value() if self.visit_count() > 0 else 0

Callers 4

eval_final_answerMethod · 0.80
select_next_stepMethod · 0.80
generate_next_stepMethod · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected