Package nl.zoidberg.calculon.engine

Examples of nl.zoidberg.calculon.engine.ChessEngine$ScoredMove


    BitBoard board = new BitBoard().initialise();
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String s;
    while((s = br.readLine()) != null) {
      PGNUtils.applyMove(board, s);
      ChessEngine node = new ChessEngine();
      String move = node.getPreferredMove(board);
      System.out.println(PGNUtils.translateMove(board, move));
      board.makeMove(board.getMove(move));
    }
  }
View Full Code Here


//        game.getBoard());
   
    for (;;) {
      GameScorer useScorer = game.getBoard().getPlayer() == Piece.WHITE ?
          game.getWhitePlayer().getGameScorer() : game.getBlackPlayer().getGameScorer();
      ChessEngine node = new ChessEngine(useScorer);
      String bestMove = node.getPreferredMove(game.getBoard());
     
      if (bestMove == null) {
        break;
      }
      if (game.getBoard().getHalfMoveCount() >= 100) {
View Full Code Here

  public static void main(String[] args) throws Exception {
    OpeningBook.setUseOpeningBook(false);
   
    BitBoard board = new BitBoard();
    FENUtils.loadPosition("1rbq2r1/3pkpp1/2n1p2p/1N1n4/1p1P3N/3Q2P1/1PP2PBP/R3R1K1 b - - 1 16", board);
    ChessEngine engine = new ChessEngine();
    engine.setDepth(3);

    long pre = System.currentTimeMillis();
    engine.getPreferredMove(board);
        System.out.println("Time (search): " + (System.currentTimeMillis() - pre) + " ms");

        pre = System.currentTimeMillis();
    engine.getPreferredMove(board);
        System.out.println("Time (search2): " + (System.currentTimeMillis() - pre) + " ms");

        pre = System.currentTimeMillis();
    engine = new ChessEngine();
    engine.getPreferredMove(board);
        System.out.println("Time (search3): " + (System.currentTimeMillis() - pre) + " ms");

        pre = System.currentTimeMillis();
    engine = new ChessEngine();
    engine.setDepth(5);
    engine.getPreferredMove(board);
        System.out.println("Time (search4): " + (System.currentTimeMillis() - pre) + " ms");

    pre = System.currentTimeMillis();
        RunningCount rc = new RunningCount();
    generateToDepth(5, board, rc);
View Full Code Here

TOP

Related Classes of nl.zoidberg.calculon.engine.ChessEngine$ScoredMove

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.