Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Any recommendation to fix this? #388

Closed
Etwari3 opened this issue Jul 18, 2022 · 1 comment
Closed

Any recommendation to fix this? #388

Etwari3 opened this issue Jul 18, 2022 · 1 comment

Comments

@Etwari3
Copy link

Etwari3 commented Jul 18, 2022

MethodError: no method matching pdf(::Array{Float64, 3}, ::String)

@zsunberg
Copy link
Member

This means that the solver is trying to evaluate the probability of a particular string in an array of floats.

This error is likely caused by returning an array of Floats instead of a Distribution object in transition, observation or initialstate. Judging by the error, it seems like your states are Strings. So instead of something like

return [0.1, 0.2, 0.7]

you should use a distribution object such as a 'SparseCat'

return SparseCat(["a", "b", "c"], [0.1, 0.2, 0.7])

in your transition, observation, and initialstate functions.

Side note: for future questions, it may be more helpful to post in the discussions section of POMDPs.jl https://github.com/JuliaPOMDP/POMDPs.jl/discussions rather than as an issue in this particular solver.

@zsunberg zsunberg transferred this issue from JuliaPOMDP/POMDPSolve.jl Jul 18, 2022
@JuliaPOMDP JuliaPOMDP locked and limited conversation to collaborators Jul 18, 2022
@zsunberg zsunberg converted this issue into discussion #389 Jul 18, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants