Skip to content

Commit af638b9

Browse files
committed
correcting sqrt
1 parent cb36290 commit af638b9

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

md/Monte-Carlo-Tree-Search.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,34 @@ __function__ MONTE-CARLO-TREE-SEARCH(_state_) __returns__ an action
1212

1313
---
1414

15-
__function__ PLAYOUT(_tree_) __returns__ _updated tree_
16-
 _node_ ← _tree_
17-
 __while__ _node_ is not terminal and was already in _tree_ __do__
18-
   _move_ ← SELECT(_node_)
19-
   _node_ ← FOLLOW\-LINK(_node_,_move_)
20-
 _outcome_ ← SIMULATION(_node_.STATE)
21-
 UPDATE(_node_,_outcome_)
22-
 __return__ _tree_
15+
__function__ PLAYOUT(_tree_) __returns__ _updated tree_
16+
 _node_ ← _tree_
17+
 __while__ _node_ is not terminal and was already in _tree_ __do__
18+
   _move_ ← SELECT(_node_)
19+
   _node_ ← FOLLOW\-LINK(_node_,_move_)
20+
 _outcome_ ← SIMULATION(_node_.STATE)
21+
 UPDATE(_node_,_outcome_)
22+
 __return__ _tree_
2323

2424
---
2525

26-
__function__ SELECT(_node_) __returns__ _an action_
27-
&emsp;__return__ argmax<sub>m &isin; FEASIBLE\-ACTIONS(_node_)</sub> UCB(RESULT(_node_,_m_))
26+
__function__ SELECT(_node_) __returns__ _an action_
27+
&emsp;__return__ argmax<sub>m &isin; FEASIBLE\-ACTIONS(_node_)</sub> UCB(RESULT(_node_,_m_))
2828

2929
---
3030

31-
__function__ UCB(_child_) __returns__ _a number_
32-
&emsp;__return__ _child_.VALUE + C &times;<span class="math">$\sqrt{\frac{\log{_child_.PARENT.N}}{_child_.N}}$</span>
31+
__function__ UCB(_child_) __returns__ _a number_
32+
&emsp;__return__ _child_.VALUE + C &times; <math>
33+
<mrow>
34+
<mn>1</mn>
35+
<msqrt>
36+
<mfrac>
37+
<mi>log _child_.PARENT.N</mi>
38+
<mi>_child_.N</mi>
39+
</mfrac>
40+
</msqrt>
41+
</mrow>
42+
</math>
3343

3444

3545
---

0 commit comments

Comments
 (0)