From b1a39507c1223e2bd137dbc9fd8cc6f6cb7ef929 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 15 Aug 2025 16:02:22 +0000 Subject: [PATCH 1/2] Add actions workflow file for auto tests (#2) Reviewed-on: https://git.joshuaschuett.com/projects/chess/pulls/2 Co-authored-by: Josh Co-committed-by: Josh --- .gitea/workflows/run-tests.yml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitea/workflows/run-tests.yml diff --git a/.gitea/workflows/run-tests.yml b/.gitea/workflows/run-tests.yml new file mode 100644 index 0000000..b2f2b27 --- /dev/null +++ b/.gitea/workflows/run-tests.yml @@ -0,0 +1,43 @@ +name: Python tests (make) + +on: + push: + branches: ["**"] + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-22.04 + container: mcr.microsoft.com/devcontainers/python:3.11 + + steps: + - name: Install Node (and git/make) inside container + run: | + set -eux + apt-get update + # add gcc & toolchain while keeping your originals + apt-get install -y --no-install-recommends curl ca-certificates git build-essential make + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + apt-get install -y --no-install-recommends nodejs + node -v + rm -rf /var/lib/apt/lists/* + + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + if: hashFiles('requirements.txt') != '' + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Show Python info + run: | + python --version + pip --version || true + + - name: Run tests via make + env: + LD_LIBRARY_PATH: build + run: make test \ No newline at end of file From d7c7176c346ad7eae38e41b64ea5c8536fdd1311 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 15 Aug 2025 16:25:09 +0000 Subject: [PATCH 2/2] Update readme with proper formatting (#3) Reviewed-on: https://git.joshuaschuett.com/projects/chess/pulls/3 Co-authored-by: Josh Co-committed-by: Josh --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85be545..848afcb 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -The goal of this project is to build a clean, fast chess engine in C that starts from a FEN string and produces fully legal moves, verified via PERFT for correctness and speed. It uses a bitboard architecture with precomputed attack caches (pawns, knights, king; sliders later) and a small, well-structured codebase that’s easy to extend. The emphasis is on correctness-first approach (FEN → board → legal movegen → perft). Later, we will incorporate different algorithms and methods of evaluating chess positions to enable an AI player. \ No newline at end of file +# Chess Engine in C — Project Goal + +Build a clean, fast chess engine in C that starts from a FEN string and produces fully legal moves, verified via **PERFT** for correctness and speed. + +## Approach +- **Correctness-first engine:** `FEN → board → legal movegen → PERFT` + +## Future Work +- Incorporate algorithms and evaluation methods for chess positions to enable an **AI player**. + +- Build an API to facilitate chess games with the AI player over the web. + - Starting with a commandline client. + - Later building a web based client. + +## Chess Engine Programming & Information +- **Chess Programming Wiki (CPW):** +- **PERFT (definition & methodology):** +- **PERFT Results & test positions:** +- **FEN reference:** +- **Bitboards** \ No newline at end of file