Skip to content

run SPSA (see gist)

run SPSA (see gist) #5

Workflow file for this run

name: run SPSA (see gist)
on:
workflow_dispatch:
inputs:
base_ref:
description: "Tune branch"
required: false
default: "HandcraftedEngine"
output_exec:
description: "Executable output file name"
required: false
default: "engine"
jobs:
worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.base_ref }}
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
wget https://github.com/official-stockfish/books/raw/refs/heads/master/UHO_Lichess_4852_v1.epd.zip
unzip UHO_Lichess_4852_v1.epd.zip
wget https://github.com/Disservin/fastchess/releases/download/v1.8.0-alpha/fastchess-linux-x86-64.tar
tar -xf fastchess-linux-x86-64.tar
chmod +x fastchess-linux-x86-64/fastchess
mv fastchess-linux-x86-64/fastchess fastchess
- name: Build engine
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j$(nproc)
- name: Tune engine
run: |
python spsa.py --iters 300 --pairs 30 --engine build/engine --workers $(nproc)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: spsa-results
path: |
./Weights.h
*.pgn
*.epd
compression-level: 0