Sample a completely random parent from all programs
(self)
| 1418 | return self.programs[parent_id] |
| 1419 | |
| 1420 | def _sample_random_parent(self) -> Program: |
| 1421 | """ |
| 1422 | Sample a completely random parent from all programs |
| 1423 | """ |
| 1424 | if not self.programs: |
| 1425 | raise ValueError("No programs available for sampling") |
| 1426 | |
| 1427 | # Sample randomly from all programs |
| 1428 | program_id = random.choice(list(self.programs.keys())) |
| 1429 | return self.programs[program_id] |
| 1430 | |
| 1431 | def _sample_from_island_weighted(self, island_id: int) -> Program: |
| 1432 | """ |
no outgoing calls
no test coverage detected