testing for action == -1
Opened this issue · 2 comments
There is some code in DESPOT.jl
that checks for action == -1
to decide what to do next. I am assuming that this is indicating some sort of exceptional circumstance. This is problematic for a couple reasons (I'm sure these have been considered but just haven't been fixed yet).
- There could be problems for which
-1
is a valid action, and - if the actions are not integers, there could be type stability issues.
We should fix this eventually, perhaps by having the functions return a Nullable{A}
.
Or maybe this is fine? maybe in these cases the action is not an actual action from the problem, but maybe just an integer representing the aciton.
I presume you are referring to src/nodes.jl, line 202? That's a vestige of my very first implementation of DESPOT, where actions where mapped to integer indices (shows that I have not really looked at pruning since then ;-)). Yes, this should really be handled with Nullable or something of the sort.