Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyRS committed Sep 14, 2018
1 parent 26bd915 commit 1ebb3c1
Show file tree
Hide file tree
Showing 8 changed files with 497 additions and 614 deletions.
8 changes: 4 additions & 4 deletions src/ExampleEngineVSEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ public static void main(String[] args) throws IOException, InterruptedException
final String whiteName = "Stockfish 9";
final Engine whiteEngine = new Engine("stockfish_9_multivariant.exe", null, uciOptions, true);
//final String whiteName = "LCZero 594";
//final Engine whiteEngine = new Engine("lc0.exe", null, uciOptions, true).debug(true);
//final Engine whiteEngine = new Engine("lc0.exe", null, uciOptions, true);
//whiteEngine.evaluate(new Game().loadFEN("8/8/8/8/8/8/8/8 w - -").setTimed(1, 0).start()).awaitConclusion();
final String blackName = "Stockfish 9";
final Engine blackEngine = new Engine("stockfish_9_multivariant.exe", null, uciOptions, true);
//final String blackName = "LCZero 594";
//final Engine blackEngine = new Engine("lc0.exe", null, uciOptions, true).debug(true);
//final Engine blackEngine = new Engine("lc0.exe", null, uciOptions, true);
//blackEngine.evaluate(new Game().loadFEN("8/8/8/8/8/8/8/8 w - -").setTimed(1, 0).start()).awaitConclusion();
System.out.println("Engines are ready.");
try
{
//noinspection InfiniteLoopStatement
do
{
final Game game = new Game().setTimed(15 * 1000, 0).setPlayerNames(whiteName, blackName).setTag("Event", "Engine VS Engine").start();
final Game game = new Game().setTimed(15000, 0).setPlayerNames(whiteName, blackName).setTag("Event", "Engine VS Engine").start();
FileWriter fw = new FileWriter("board.svg", false);
fw.write(game.toSVG());
fw.close();
Expand All @@ -43,7 +43,7 @@ public static void main(String[] args) throws IOException, InterruptedException
Color mover = game.toMove;
Engine engine = (mover == Color.WHITE ? whiteEngine : blackEngine);
final Move move;
move = engine.evaluate(game.resetMoveTime()).awaitConclusion().getBestMove();
move = engine.evaluate(game).awaitConclusion().getBestMove();
fw = new FileWriter("info.txt", false);
fw.write(whiteName + " VS " + blackName + "\n");
if(engine.score == 0 && game.canDrawBeClaimed())
Expand Down
Loading

0 comments on commit 1ebb3c1

Please sign in to comment.