Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/tournament-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,25 @@ jobs:
$output | Write-Host
if ($output -notcontains 'uciok') { throw 'Missing uciok from Windows build.' }
if ($output -notcontains 'readyok') { throw 'Missing readyok from Windows build.' }
- name: Run FastChess UCI compliance
shell: pwsh
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
$headers = @{
'User-Agent' = 'Pickle-Elo-Harness-CI'
'Authorization' = "Bearer $env:GITHUB_TOKEN"
}
$release = Invoke-RestMethod -Uri 'https://api.github.com/repos/Disservin/fastchess/releases/latest' -Headers $headers
$asset = @($release.assets) | Where-Object {
$_.name -match '(?i)windows' -and
$_.name -match '(?i)(x86[-_]?64|x64)' -and
$_.name -match '\.zip$'
} | Select-Object -First 1
if (-not $asset) { throw "No Windows x86-64 FastChess ZIP found in $($release.tag_name)." }
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile fastchess.zip
Expand-Archive -Path fastchess.zip -DestinationPath fastchess-ci -Force
$fast = Get-ChildItem fastchess-ci -Recurse -File | Where-Object { $_.Name -match '(?i)^fastchess.*\.exe$' } | Select-Object -First 1
if (-not $fast) { throw 'FastChess executable not found after extraction.' }
& $fast.FullName --compliance .\build-windows\Release\pickle.exe
if ($LASTEXITCODE -ne 0) { throw "FastChess compliance failed with exit code $LASTEXITCODE." }
9 changes: 9 additions & 0 deletions uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ void uci_loop(Board& board) {
}

set_time_limits(time_left, inc, movetime, depth);

// FastChess expects the most recent parseable info line before
// bestmove to contain a score. A book hit may return immediately,
// so publish PickleBook's neutral stored score up front. Normal
// searches immediately replace this with their iterative score.
if (opening_book_enabled()) {
std::cout << "info depth 0 nodes 0 time 0 nps 0 score cp 0\n" << std::flush;
}

search_position(board, depth);
}
else if (command == "stop") {
Expand Down