ShapeExtractor extends PatternExtractor { @Override void buildPatternData(File inputFile){ String sfString = Float.toString(scalingFactor); sfString = sfString.substring(sfString.indexOf('.') + 1); buildPatternData(inputFile.getPath(), OREGO_ROOT + "patterns/patterns" + minStones + "stones-SHAPE-sf" + sfString + ".data"); } ShapeExtractor(boolean verbose, float scalingFactor, int minStones); static void main(String[] args); short reflect(short move); short rotate90(short move);  }
@Test public void test() { String outputFile = "test-books/3x3PatternTest.data"; extractor.buildPatternData("sgf-test-files/19/PatternTest.sgf", outputFile); ShapeTable table = new ShapeTable(outputFile, 0.99f); Board board = new Board(9); HistoryObserver history = new HistoryObserver(board); board.play("d5"); board.play("a1"); board.play("f5"); assertTrue(table.getWinRate(PatternFinder.getHash(board, board.getCoordinateSystem().at("e4"), 2, history.get(board.getTurn()-1))) > 0.5); assertTrue(table.getWinRate(PatternFinder.getHash(board, board.getCoordinateSystem().at("e6"), 2, history.get(board.getTurn()-1))) > 0.5); }