| 289 | "rooms": sorted(self.rooms), "done_scores": self.done_scores[-200:]} |
| 290 | |
| 291 | def load_state(self, st): |
| 292 | self.cells = {} |
| 293 | for k, d in st["cells"].items(): |
| 294 | c = Cell(d["snapshot"], d["score"], d["traj_len"], d["traj_last"], d["lives"]) |
| 295 | c.seen, c.chosen, c.chosen_since_new = d["seen"], d["chosen"], d["chosen_since_new"] |
| 296 | self.cells[k] = c |
| 297 | self.rooms = set(st["rooms"]) |
| 298 | self.done_scores = list(st["done_scores"]) |
| 299 | |
| 300 | |
| 301 | # --------------------------------------------------------------------------- |