Read diff data from changes_r{round}.json file. Returns None if file doesn't exist.
(self, player_name: str, round_num: int)
| 140 | self.logger.info(f"Pre-initialized agents for {len(self.players)} players across {self.rounds + 1} rounds") |
| 141 | |
| 142 | def _get_round_diff(self, player_name: str, round_num: int) -> str | None: |
| 143 | """Read diff data from changes_r{round}.json file. Returns None if file doesn't exist.""" |
| 144 | if round_num == 0: |
| 145 | return "" |
| 146 | changes_file = self.pvp_output_dir / "players" / player_name / f"changes_r{round_num}.json" |
| 147 | try: |
| 148 | changes_data = json.loads(changes_file.read_text()) |
| 149 | return changes_data.get("full_diff", "") |
| 150 | except FileNotFoundError: |
| 151 | return None |
| 152 | |
| 153 | def _create_dummy_agent(self, player_name: str, agent_suffix: str = "") -> Dummy: |
| 154 | """Create a dummy agent for matrix evaluation.""" |
no test coverage detected