While playing around with the PDB heuristic, we encountered a bug that is caused
by an overflow of the num_states variable in "pattern_database.*". "num_states
is computed in the constructor of PatternDatabase.
It happens when using the following pattern: "manual([0, 1, 2, 3, 5, 6, 7, 8,
9])" in the attached task. The heuristic will falsely detect the initial state
as a dead-end. "Falsely" here means that with the given pattern, the PDB should
not be able to detect the task unsolvable in the initial state, although the
task indeed is unsolvable.
One could probably argue that, when using a manual pattern, you should always be
careful to check for the size of the abstract state space. On the other hand,
including a check is quite easy (in this case), and even just getting an error
is better than a wrong result.
|