mhahsler / pomdp

R package for Partially Observable Markov Decision Processes
16 stars 5 forks source link

solve_SARSOP executable failed #14

Closed meeheal closed 3 years ago

meeheal commented 3 years ago

Hi Michael,

I've been using this package for a while now, and recently became interested in trying solve_SARSOP instead of solve_POMDP, but the commands data("Tiger")

sol <- solve_SARSOP(model = Tiger) produce an error: Error in processx::run(path, strsplit(args, " ")[[1]], spinner = spinner, : System command 'pomdpsol.exe' failed, exit status: -1073741515, stderr empty Type .Last.error.trace to see where the error occured

I tried that and get this: Stack trace:

  1. pomdp:::solve_SARSOP(model = Tiger)
  2. base:::do.call(sarsop::pomdpsol, c(list(model = model_file, output = policy_file, ...
  3. (function (model, output = tempfile(), precision = 0.001, timeout = NULL, ...
  4. sarsop:::exec_program("pomdpsol", args, stdout = stdout, stderr = stderr, ...
  5. processx::run(path, strsplit(args, " ")[[1]], spinner = spinner, ...
  6. throw(new_process_error(res, call = sys.call(), echo = echo, ...

    x System command 'pomdpsol.exe' failed, exit status: -1073741515, stderr empty

Is this something you've come across in your development? Any help would be appreciated.

Regards.

mhahsler commented 3 years ago

It looks like package sarsop produces the error. The error message does not look very helpful...

Do you have the latest version of pomdp and sarsop?

I get the following:

> library(pomdp)
> data(Tiger)
> solve_POMDP(Tiger)
Solved POMDP model: Tiger Problem 
    solution method: grid 
    horizon: Inf 
    converged: TRUE 
    total expected reward (for start probabilities): 1.933439 
> solve_SARSOP(Tiger)
Solved POMDP model: Tiger Problem 
    solution method: sarsop 
    horizon: Inf 
    converged: TRUE 
    total expected reward (for start probabilities): 1.933005  
meeheal commented 3 years ago

My version of 'pomdp' is 0.99.3, and my version of 'sarsop' is 0.6.9.

I'm using RStudio. I did an "update" of all packages that RStudio said would require an update.

Same errors are occurring. I even tried this to directly use 'sarsop'

write_POMDP(Tiger, "tigerpomdp") pomdpsol(paste(getwd(), "tigerpomdp", sep = "/")) Error in processx::run(path, strsplit(args, " ")[[1]], spinner = spinner, : System command 'pomdpsol.exe' failed, exit status: -1073741515, stderr empty Type .Last.error.trace to see where the error occurred

Do you recommend I try contacting the 'sarsop' authors, Carl Boettiger?

meeheal commented 3 years ago

Hi Michael,

I did contact Carl and they could not replicate the issue either. I was able to resolve the issue. There was a problem with a dll file; this would be only applicable for windows users after some updates were applied. The problem was that C++ redistributable was not ready to implement the call from the sarsop pomdpsol function.

Again, thanks for your help. Have a great day.