add panic if solution space is empty

This commit is contained in:
2026-08-18 20:33:26 +02:00
parent 992890ebb2
commit 416ab6beba
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -58,6 +58,10 @@ impl Solver {
let information_gained = self.possible_solutions.equal_likelieness_entropy()
- new_possible_solutions.equal_likelieness_entropy();
if new_possible_solutions.len() == 0 {
panic!("Solution space is empty");
}
self.possible_solutions = new_possible_solutions;
self.guesses.push(Guess {