Hello,
in the OnlineKnapsackEnv, when an item is refused (action is 0) the state is not updated.
This means that the agent will be presented with the same item until it eventually accepts it or the episode ends because the step_limit is reached. I suppose this is not what should happen.
Adding self._update_state() at the end of the else statement in the _STEP() function (line 464 of knapsack.py) should fix the problem.
Hello, in the OnlineKnapsackEnv, when an item is refused (action is 0) the state is not updated. This means that the agent will be presented with the same item until it eventually accepts it or the episode ends because the step_limit is reached. I suppose this is not what should happen.
Adding
self._update_state()
at the end of theelse
statement in the_STEP()
function (line 464 of knapsack.py) should fix the problem.