Fix CEM agent (prefer 'good' weights instead of 'lucky' weights) #330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Consider weights for
CEMAgent
. Given these weights, there are two options for action selection:At testing stage, an agent has only the latter option. However, at training stage, the former option is always activated. This is inconsistent, because it means that an agent is trained to do other things than those that are expected from it during testing/deployment.
Given weights, stochastic selection of actions may, by chance, result in abnormally high reward. However, there is no guarantee that deterministic selection of the most probable action can lead to the same reward. In general case, this does not hold true. Chances are that 'lucky' weights are preferred over 'good' weights during training. An evidence of it is that rewards at testing are lower than rewards reported at
self.best_seen
.This pull request fixes above problem and also fixes a minor issue with
EpisodeParameterMemory
.