CuckooChess: Back-ported Texel improvements to CuckooChess. +24 ELO against previous version after 1894 games at 60/6 time control.

This commit is contained in:
Peter Osterlund
2012-07-15 10:39:23 +00:00
parent 6861e6d266
commit ab87bb9ae8
12 changed files with 292 additions and 185 deletions

View File

@@ -125,6 +125,19 @@ public class BitBoardTest {
}
}
private static final int computeDistance(int from, int to) {
int dx = Position.getX(to) - Position.getX(from);
int dy = Position.getY(to) - Position.getY(from);
return Math.max(Math.abs(dx), Math.abs(dy));
}
@Test
public void testGetDistance() {
for (int from = 0; from < 64; from++)
for (int to = 0; to < 64; to++)
assertEquals(computeDistance(from, to), BitBoard.getDistance(from, to));
}
@Test
public void testTrailingZeros() {
System.out.println("trailingZeros");