diff --git a/src/interface.jl b/src/interface.jl index 84b9ae1..be40b2c 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -84,10 +84,8 @@ function runMCTS( backpropagate(leafNode, simTrajectoryReward) end - # stop if the tree early stop condition is met - if typeof(earlystop) <: Function - result = earlystop(node.state) - + # stop if the early stop condition is met + if typeof(earlystop) <: Function && earlystop(node.state) break end end