add panic if solution space is empty
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user