introduce bitloops

This commit is contained in:
mike
2026-01-10 07:36:26 +01:00
parent 558f0f9e0e
commit 1521e461bc
3 changed files with 22 additions and 28 deletions

View File

@@ -132,7 +132,7 @@ public class MainTest {
public void testAttempt() {
// Arrange
var opts = new Main.Opts();
opts.seed = 12347;
opts.seed = 12348;
opts.pop = 4; // Tiny population
opts.gens = 20; // Very few generations
opts.minSimplicity = 0;
@@ -165,10 +165,10 @@ public class MainTest {
Assertions.assertTrue(res.filled().ok(), "Puzzle generation failed (not ok)");
// Regression baseline for seed search starting at 12347, pop 4, gens 20
Assertions.assertEquals(12347, foundSeed, "Found seed changed");
Assertions.assertEquals(24, res.filled().clueMap().size(), "Number of assigned words changed");
Assertions.assertEquals(735.7083333333334, res.filled().stats().simplicity, 1e-9, "Simplicity value changed");
Assertions.assertArrayEquals(new byte[]{ 'E', 'B', 'B', 'E', 'N' }, res.filled().clueMap().get(515).word());
Assertions.assertEquals(12348, foundSeed, "Found seed changed");
Assertions.assertEquals(22, res.filled().clueMap().size(), "Number of assigned words changed");
Assertions.assertEquals(767.8636363636364, res.filled().stats().simplicity, 1e-9, "Simplicity value changed");
Assertions.assertArrayEquals(new byte[]{ 'T', 'R', 'U', 'I' }, res.filled().clueMap().get(515).word());
}
@Test
public void testIsLetterA() {