A chess engine that runs in the browser using webassembly. Searches via alpha-beta pruning and evaluates positions using an efficiently updateable neural network (NNUE).
Below is a sped up recording of spareduck (playing black) vs. a much simpler material based evaluation function (playing white).
To build the project in an isolated environment, use the Docker config.
By using docker compose we can avoid having to recompiling after changing the main JS files.
For the first time and whenever you change the c files you have to run:
docker-compose up --build -d
Otherwise you should be able to run:
docker-compose up -d
First build the Docker image. The project is compiled during this step.
docker build --file Dockerfile --tag spareduck:latest .
Then, run the Docker image and expose the port to http://localhost:8080.
docker run -d -p 8080:8080 spareduck:latest
Unit tests can be run with the following.
docker run spareduck:latest bash -c "cd .. && bash test.sh"
C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}