Libraryless. Click here for Pure Java version (1255L/9K/29K).
!752 !include #1001500 // Stockfish p { Stockfish client = new Stockfish(); String FEN = "8/6pk/8/1R5p/3K3P/8/6r1/8 b - - 0 42"; // initialize and connect to engine if (client.startEngine()) { System.out.println("Engine has started.."); } else { System.out.println("Oops! Something went wrong.."); } // send commands manually client.sendCommand("uci"); // receive output dump System.out.println(client.getOutput(0)); // get the best move for a position with a given think time System.out.println("Best move : " + client.getBestMove(FEN, 100)); // get all the legal moves from a given position System.out.println("Legal moves : " + client.getLegalMoves(FEN)); // draw board from a given position System.out.println("Board state :"); client.drawBoard(FEN); // get the evaluation score of current position System.out.println("Evaluation score : " + client.getEvalScore(FEN, 2000)); // stop the engine System.out.println("Stopping engine.."); client.stopEngine(); }
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): agxbjmyenqqu, aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001501 |
Snippet name: | Test Stockfish |
Eternal ID of this version: | #1001501/1 |
Text MD5: | a904dd49b1249b9e629f6aec6d372c0c |
Transpilation MD5: | db649a37e145c8b4fcedf49707487847 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-07-03 14:53:24 |
Source code size: | 1037 bytes / 38 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 965 / 877 |
Referenced in: | #3000190 - Answer for stefanreich(>> t 20 questions) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |