Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCTSSolver fails test_solver on BabyPOMDP #111

Closed
FlyingWorkshop opened this issue Jul 14, 2024 · 2 comments
Closed

MCTSSolver fails test_solver on BabyPOMDP #111

FlyingWorkshop opened this issue Jul 14, 2024 · 2 comments

Comments

@FlyingWorkshop
Copy link
Member

I was trying to use MCTS to verify whether a custom POMDP could be solved using MCTSSolver and test_solver. I realized that MCTSSolver also appears to fail on standard POMDPs. Is this expected?

Code:

using POMDPModels
using POMDPTools
using POMDPs
using MCTS

pomdp = BabyPOMDP()
solver = MCTSSolver(n_iterations=10, depth=5, exploration_constant=5.0)
test_solver(solver, pomdp)

Throws

ERROR: LoadError: MethodError: no method matching updater(::MCTSPlanner{BabyPOMDP, Bool, Bool, MCTS.SolvedRolloutEstimator{RandomPolicy{Random._GLOBAL_RNG, BabyPOMDP, NothingUpdater}, Random._GLOBAL_RNG}, Random._GLOBAL_RNG})

Closest candidates are:
  updater(::CompressedBeliefPolicy)
   @ CompressedBeliefMDPs ~/Documents/VSCodeProjects/BeliefCompression/CompressedBeliefMDPs/src/solver.jl:45
  updater(::AlwaysFeed)
   @ POMDPModels ~/.julia/packages/POMDPModels/eZX2K/src/CryingBabies.jl:70
  updater(::FeedWhenCrying)
   @ POMDPModels ~/.julia/packages/POMDPModels/eZX2K/src/CryingBabies.jl:74
  ...

Stacktrace:
 [1] test_solver(solver::MCTSSolver, problem::BabyPOMDP; max_steps::Int64, updater::Nothing)
   @ POMDPTools.Testing ~/.julia/packages/POMDPTools/7Rekv/src/Testing/solver.jl:82
 [2] test_solver(solver::MCTSSolver, problem::BabyPOMDP)
   @ POMDPTools.Testing ~/.julia/packages/POMDPTools/7Rekv/src/Testing/solver.jl:78
 [3] top-level scope
   @ ~/Documents/VSCodeProjects/BeliefCompression/arena/circles/mcts.jl:8
 [4] include(fname::String)
   @ Base.MainInclude ./client.jl:489
 [5] top-level scope
   @ REPL[3]:1
 [6] top-level scope
   @ none:1
in expression starting at /Users/logan/Documents/VSCodeProjects/BeliefCompression/arena/circles/mcts.jl:8
@zsunberg
Copy link
Member

This is expected. MCTS.jl is designed for MDPs. Use BasicPOMCP if you want to apply MCTS in the standard way to a POMDP.

(We could perhaps change the behavior so that this is more clear.)

@zsunberg
Copy link
Member

Closing since this is expected behavior, but please re-open if you would like to discuss further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants