Here the V2.0 of my little batch-tool, which investigates pgn-files, containing games, played with cutechess-cli or cutechessGUI.
Now, the tool counts the timelosses, disconnects and illegal moves, instead of just looking for a match.
Just copy the following code in a .bat File. When using, edit line 2, where the name of the file to be investigated is written...
The good thing here is, this tool an be run on pgn-files of an ongoing testrun or tournament, so its easy to see, if an engine is buggy.
@echo off
set games=UHO_Ratinglist_games.pgn
set /A err=0
echo *************************************************
echo *************************************************
echo Investigated file: %games%
echo *************************************************
echo *************************************************
echo Searching for timelosses...
REM *** Search for orfeit, means "time forfeit", without first letter
set /A timelosses=0
for /f "tokens=2,* delims= " %%G in ('find /C "orfeit" %games%') do set /A timelosses=%%H
IF %timelosses% EQU 0 (
echo OK: No timelosses found
) ELSE (
echo ERROR: %timelosses% timelosses found
set /A err=1
)
echo *************************************************
echo Searching for disconnects...
REM *** Search for isconnect, means "disconnect", without first letter
set /A disconnects=0
for /f "tokens=2,* delims= " %%G in ('find /C "isconnect" %games%') do set /A disconnects=%%H
IF %disconnects% EQU 0 (
echo OK: No disconnects found
) ELSE (
echo ERROR: %disconnects% disconnects found
set /A err=1
)
echo *************************************************
echo Searching for illegal moves...
REM *** Search for llegal, means "illegal", without first letter
set /A illegal=0
for /f "tokens=2,* delims= " %%G in ('find /C "llegal" %games%') do set /A illegal=%%H
IF %illegal% EQU 0 (
echo OK: No illegal moves found
) ELSE (
echo ERROR: %illegal% illegal moves found
set /A err=1
)
echo *************************************************
echo *************************************************
echo *************************************************
IF %err%==1 (
echo ERRORS found - check gamesfile manually
) ELSE (
echo All games are OK
)
echo *************************************************
echo Press any key to close window
pause
New tool searching for not normal game endings in cutechess games
Moderator: Ras
-
pohl4711
- Posts: 2822
- Joined: Sat Sep 03, 2011 7:25 am
- Location: Berlin, Germany
- Full name: Stefan Pohl