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

change argument's type of two functions from "MDP" to "Union{MDP,POMDP}" #29

Closed
wants to merge 1 commit into from

Conversation

mexsser
Copy link

@mexsser mexsser commented Feb 14, 2019

When I check the source code of QMDP solver, which is a POMDP solver, I find that ValueIterationSolver from this repo is used. And in this repo, a faster solver SparseValueIterationSolver is also provided. So I think maybe I can modify the source code of QMDP to add this solver as an optional solver. But soon I find that the two functions transition_matrix_a_s_sp(mdp::MDP) and reward_s_a(mdp::MDP) only accept argument of MDP Type. According to my understanding this two function can actually also accept POMDP type. I have tried the modified version in my QMDP solver and everything runs smoothly. The results are also as expected.

@MaximeBouton
Copy link
Contributor

Hi @mexsser,
We started discussing this point here #25.
You might want to look at the solution using UnderlyingMDP from POMDPModelTools.
I think it would be better to modify QMDP such that we could use any Value Iteration solver, it would require extracting the mdp first, something like this (in QMDP.jl):

function solve(solver::QMDPSolver, pomdp::POMDP)
    mdp = UnderlyingMDP(pomdp) 
    vi_policy = solve(solver.vi_solver, mdp)
    # convert to alpha vector ...
    return policy 
end

where vi_solver would be a new field in the QMDPSolver.

@MaximeBouton
Copy link
Contributor

Fixed JuliaPOMDP/QMDP.jl#15 and #32

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

Successfully merging this pull request may close these issues.

None yet

2 participants