run SPSA (see gist) #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |