introduce bitloops
This commit is contained in:
@@ -54,10 +54,22 @@ public class ConnectivityTest {
|
||||
clues.setClueLo(1L << Masker.offset(2, 1), (byte)1);
|
||||
|
||||
long fitness = masker.maskFitness(clues, 2);
|
||||
|
||||
// Als 8-naburigheid NIET MEER meetelt, moet de penalty hoog zijn.
|
||||
System.out.println("[DEBUG_LOG] Fitness physically adjacent: " + fitness);
|
||||
assertTrue(fitness > 20000, "Should have island penalty even if physically adjacent");
|
||||
// Als 8-naburigheid NIET MEER meetelt, moet de penalty hoog zijn.
|
||||
System.out.println("[DEBUG_LOG] Fitness physically adjacent: " + fitness);
|
||||
assertTrue(fitness > 20000, "Should have island penalty even if physically adjacent");
|
||||
Clues clues2 = Clues.createEmpty();
|
||||
// Twee clues naast elkaar, maar slots kruisen niet.
|
||||
// Clue 1: (1,1) Right. Slot (1,2), (1,3), (1,4)
|
||||
// Clue 2: (2,1) Right. Slot (2,2), (2,3), (2,4)
|
||||
clues2.setClueLo(1L << Masker.offset(1, 1), (byte)1);
|
||||
clues2.setClueLo(1L << Masker.offset(3, 1), (byte)1);
|
||||
long fitness2 = new Masker(rng, new int[STACK_SIZE], Clues.createEmpty()).maskFitness(clues2, 2);
|
||||
// Als 8-naburigheid NIET MEER meetelt, moet de penalty hoog zijn.
|
||||
System.out.println("[DEBUG_LOG] Fitness physically adjacent: " + fitness2);
|
||||
assertTrue(fitness2 > 20000, "Should have island penalty even if physically adjacent");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -90,7 +90,6 @@ public class PerformanceTest {
|
||||
val subset = Arrays.copyOf(allSlots, i);
|
||||
// Arrays.sort(subset, Comparator.comparingInt(Slotinfo::score));
|
||||
System.out.printf("[DEBUG_LOG] Testing with first %d slots%n of %s", i, allSlots.length);
|
||||
var grid = Slotinfo.grid(subset);
|
||||
visualizeSlots(subset);
|
||||
measureFill(new Rng(123 + i), subset, "Subset size " + i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user