update
This commit is contained in:
16
src/mcts.jl
16
src/mcts.jl
@@ -137,17 +137,6 @@ function expand(a::T1, node::MCTSNode, decisionMaker::Function,
|
||||
|
||||
nthSample = 0
|
||||
while nthSample < n
|
||||
try
|
||||
|
||||
catch e
|
||||
io = IOBuffer()
|
||||
showerror(io, e)
|
||||
errorMsg = String(take!(io))
|
||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
println("")
|
||||
@warn "Error occurred: $errorMsg\n$st"
|
||||
println("")
|
||||
end
|
||||
|
||||
thoughtDict = decisionMaker(a, node.state)
|
||||
|
||||
@@ -160,8 +149,9 @@ function expand(a::T1, node::MCTSNode, decisionMaker::Function,
|
||||
if reward < 0
|
||||
pprint(newstate[:thoughtHistory])
|
||||
newstate[:evaluation] = stateevaluation
|
||||
newstate[:feedback] = reflector(a, newstate)
|
||||
print("done reflection")
|
||||
newstate[:lesson] = reflector(a, newstate)
|
||||
a.lesson[:lesson_1] = deepcopy(newstate)
|
||||
print("---> reflector()")
|
||||
end
|
||||
|
||||
if newNodeKey ∉ keys(node.children)
|
||||
|
||||
Reference in New Issue
Block a user