Difficulty Implementing Example MDP #422
Unanswered
ryan-o-c
asked this question in
Debugging Help
Replies: 1 comment 1 reply
-
Hi @ryan-o-c , one possible issue is that MCTS is designed for MDPs whereas the problem you are trying to solve is a POMDP. You might be able to solve the issue by switching from MCTSSolver to POMCPSolver from BasicPOMCP.jl |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I just wanted to ask for some help as I'm trying to get to grips with this package. I'm trying to run an end to end implementation of an MDP solver for one of the simple problems (eventually I hope to use the solvers on a more complex MDP I will have to define myself). For now, I'm trying the Tiger problem. I've copied the code for the mdp definition from the documentation page "Defining POMDPs and MDPs", and the simulation code is mostly copied from "Simulation Standards". I'll leave the code at the bottom.
The error I'm encountering is at the line "a = action(policy, b)" which reads:
I've tried to define b0 using the default "b0 = initialstate(pomdp)`", but I get an error that @ref is not defined (I can't figure out what @ref even does!). I've tried to define b0 otherwise (as below), and although it doesn't spit an error immediately, I am doubtful that I have it right!
Another issue I'm having is with beliefs; They are vaguely defined in the documentation as they depend on the updater, but I can't figure out what kind of belief is relevant to the updater I'm currently using (DiscreteUpdater)?
When I can hopefully move onto my own MDP, I'm also unsure as to what form the state must take - need I define the entire state space on initialisation? The mountaincar example does not seem to do so, hence my confusion. I have done something similar when using ReinforcementLearning.jl but I'm not sure how exactly to define my state space for this package. The examples seem to just list all of the states, but mine is a very large state space of coordinates, defined by two arrays of size (N,2) over the numbers from 0 to 2N. (For now, N=8!)
I hope someone can help me with this smattering of questions - I'm struggling to get a handle on how this package works and hopefully these answers will get me on my way. Maybe it's very apparent from my questions, but I am a Julia novice and not a fantastic programmer in general, so apologies if my questions are trivial - I have been trying to answer these questions without clogging this forum but I'm at the end of my tether!
Entire code for the problem/solver I'm trying to implement is as follows:
Julia indicates that the error is at the line
and the full error reads:
P.S. I promise I'm spacing with tabs, but I'm additionally having trouble getting github to format my code nicely in this post!
Beta Was this translation helpful? Give feedback.
All reactions