diff --git a/README.md b/README.md index c1e8a05..e47e9fc 100644 --- a/README.md +++ b/README.md @@ -73,5 +73,5 @@ On the first 20000 seeds, we have these average scores and win rates: |---------|---------|---------|---------|---------| | cheat | 24.8594 | 24.9785 | 24.9720 | 24.9557 | | | 90.59 % | 98.17 % | 97.76 % | 96.42 % | -| info | 22.3249 | 24.7278 | 24.8919 | 24.8961 | -| | 09.81 % | 80.54 % | 91.67 % | 91.90 % | +| info | 22.3316 | 24.7246 | 24.8892 | 24.8969 | +| | 09.81 % | 80.38 % | 91.45 % | 91.94 % | diff --git a/src/strategies/information.rs b/src/strategies/information.rs index 0d6ed70..49cf466 100644 --- a/src/strategies/information.rs +++ b/src/strategies/information.rs @@ -29,7 +29,7 @@ impl ModulusInformation { } pub fn combine(&mut self, other: Self) { - self.value = self.value * other.modulus + other.value; + self.value = self.value + self.modulus * other.value; self.modulus = self.modulus * other.modulus; } @@ -39,10 +39,10 @@ impl ModulusInformation { let original_modulus = self.modulus; let original_value = self.value; self.modulus = self.modulus / modulus; - let value = self.value / self.modulus; - self.value = self.value - value * self.modulus; + let value = self.value % modulus; + self.value = self.value / modulus; assert!(original_modulus == modulus * self.modulus); - assert!(original_value == value * self.modulus + self.value); + assert!(original_value == value + modulus * self.value); Self::new(modulus, value) }