Skip to content

Commit

Permalink
⚠️[FIX] MCTS score
Browse files Browse the repository at this point in the history
  • Loading branch information
fairyshine committed Oct 29, 2024
1 parent 5efa82c commit f57e07c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fastmindapi/algo/tree/mcts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def calculate_score(node, scalar):
exploit = node.reward / node.visits
explore = math.sqrt(2.0 * math.log(node.visits) / float(node.visits))
explore = math.sqrt(2.0 * math.log(node.parent.visits) / float(node.visits))
return exploit + scalar * explore

class MCTSState(ABC):
Expand Down

0 comments on commit f57e07c

Please sign in to comment.