(self)
| 281 | self.rooms.update(res["rooms"]) |
| 282 | |
| 283 | def state(self): |
| 284 | return {"cells": {k: {"snapshot": c.snapshot, "score": c.score, |
| 285 | "traj_len": c.traj_len, "traj_last": c.traj_last, |
| 286 | "seen": c.seen, "chosen": c.chosen, |
| 287 | "chosen_since_new": c.chosen_since_new, "lives": c.lives} |
| 288 | for k, c in self.cells.items()}, |
| 289 | "rooms": sorted(self.rooms), "done_scores": self.done_scores[-200:]} |
| 290 | |
| 291 | def load_state(self, st): |
| 292 | self.cells = {} |