JuliaPOMDP / JuliaPOMDP/BasicPOMCP.jl

POMDPs.value doesn't work w/ POMCPPlanner

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
39
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I was trying to do some benchmarking for the upcoming CompressedBeliefMDPs.jl package and ran into some trouble when trying to use [POMDPs.value](https://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.value) on `POMCPPlanner`. Is this expected behavior? [`POMCPPlanner` subclasses `POMDPs.Policy`](https://github.com/JuliaPOMDP/BasicPOMCP.jl/blob/bcd221caa195c776a88dbe1030657752b4b21489/src/BasicPOMCP.jl#L207), so I thought it would support the POMDPs.jl interface.

# Steps to Recreate
```julia
using BasicPOMCP
using POMDPs
using POMDPTools
using POMDPModels

pomdp = BabyPOMDP()
solver = POMCPSolver()
planner = solve(solver, pomdp)
r = value(planner, initialstate(pomdp))
```
# Error
```julia
ERROR: LoadError: MethodError: no method matching value(::POMCPPlanner{BabyPOMDP, BasicPOMCP.SolvedPORollout{RandomPolicy{Random._GLOBAL_RNG, BabyPOMDP, NothingUpdater}, NothingUpdater, Random._GLOBAL_RNG}, Random._GLOBAL_RNG}, ::BoolDistribution)

Closest candidates are:
value(::MCTS.MCTSPlanner, ::Any)
@ MCTS ~/.julia/packages/MCTS/AjLdf/src/vanilla.jl:199
value(::MCTS.MCTSTree, ::Any)
@ MCTS ~/.julia/packages/MCTS/AjLdf/src/vanilla.jl:206
value(::MCTS.MCTSPlanner{<:Union{MDP, POMDP}, S, A}, ::S, ::A) where {S, A}
@ MCTS ~/.julia/packages/MCTS/AjLdf/src/vanilla.jl:214
...

Stacktrace:
[1] top-level scope
@ ~/VSCodeProjects/BeliefCompression/demos/pomcp_test.jl:9
in expression starting at /Users/logan/VSCodeProjects/BeliefCompression/demos/pomcp_test.jl:9
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.