True if EnvModel contains `key`, else False
(self, key)
| 56 | return self._model[(s, a)][(r, s_)] |
| 57 | |
| 58 | def __contains__(self, key): |
| 59 | """True if EnvModel contains `key`, else False""" |
| 60 | s, a, r, s_ = key |
| 61 | p1 = (s, a) in self.state_action_pairs() |
| 62 | p2 = (r, s_) in self.reward_outcome_pairs() |
| 63 | return p1 and p2 |
| 64 | |
| 65 | def state_action_pairs(self): |
| 66 | """Return all (state, action) pairs in the environment model""" |
no test coverage detected