Skip to content

Commit

Permalink
Merge branch 'main' into hbPlayground
Browse files Browse the repository at this point in the history
  • Loading branch information
fathzer committed Mar 25, 2024
2 parents c132cc0 + da61cae commit a500701
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
[![javadoc](https://javadoc.io/badge2/com.fathzer/chesslib-uci-engine/javadoc.svg)](https://javadoc.io/doc/com.fathzer/chesslib-uci-engine)

# chesslib-uci-engine
A basic [UCI](https://en.wikipedia.org/wiki/Universal_Chess_Interface) engine based on the [bhlangonijr/chesslib](https://github.com/bhlangonijr/chesslib) move generator, and the [games-core](https://github.com/fathzer-games/games-core) alpha beta search algorithm implementation.
A basic [UCI](https://en.wikipedia.org/wiki/Universal_Chess_Interface) engine based on the [bhlangonijr/chesslib](https://github.com/bhlangonijr/chesslib) move generator, and the [games-core](https://github.com/fathzer-games/games-core) alpha beta search algorithm implementation. It uses the evaluation functions, the remaining move oracle and some other things from the [chess-utils](https://github.com/fathzer-games/chess-utils) library.

You can play against it on [Lichess](https://lichess.org/@/fathzer-jchess). It runs on a Minisforum U300 with [3867U processor](https://www.cpubenchmark.net/cpu.php?cpu=Intel+Celeron+3867U+%40+1.80GHz&id=3442).

## How to run the engine
It requires a Java 11+ virtual machine.
It requires a Java 17+ virtual machine.

Download the jar, then Launch the engine with the following command: ```java -jar chesslib-uci-engine.jar```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.fathzer.jchess.chesslib.ai;

import java.util.List;

import com.fathzer.games.ai.SearchResult;
import com.fathzer.games.ai.evaluation.EvaluatedMove;
import com.fathzer.games.ai.iterativedeepening.DeepeningPolicy;

public final class ChessLibDeepeningPolicy extends DeepeningPolicy {
Expand All @@ -22,13 +18,4 @@ public int getNextDepth(int currentDepth) {
public boolean isEnoughTimeToDeepen(int depth) {
return depth<5 || getSpent()<getMaxTime()/3;
}

@Override
public <M> void mergeInterrupted(SearchResult<M> bestMoves, int bestMovesDepth, List<EvaluatedMove<M>> partialList, int interruptionDepth) {
if ((interruptionDepth - bestMovesDepth)%2==0) {
//TODO Remove when quiesce will be implemented
// Do not merge results if depth are optimistic and pessimistic.
super.mergeInterrupted(bestMoves, bestMovesDepth, partialList, interruptionDepth);
}
}
}

0 comments on commit a500701

Please sign in to comment.