Skip to content

Commit

Permalink
duplicate check during backup
Browse files Browse the repository at this point in the history
  • Loading branch information
qhho committed Jul 29, 2024
1 parent ba8c452 commit 3e10a8c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/backup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ function backup!(tree, b_idx)
best_action = a
end
end

α = AlphaVec(best_α, best_action, Set(b_idx))
push!(Γ, α)
α_idx = findfirst(x->x == best_α, Γ)
if α_idx === nothing
α = AlphaVec(best_α, best_action, Set(b_idx))
push!(Γ, α)
else
union!(Γ[α_idx].witnesses, b_idx)
end
tree.V_lower[b_idx] = V
end

Expand Down

0 comments on commit 3e10a8c

Please sign in to comment.