Chess engine recognizer

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Chess engine recognizer

Post by Dann Corbit »

In this 7-zip archive:
http://cap.connx.com/chess-engines/new- ... h/check.7z

You will find a primitive, first-swipe try at a chess engine recognizer that runs on Windows operating systems.

What it does is memory map a chess binary file, then search for uci or winboard keywords. If key words are found, then it emits the keywords. When the program exits, the count of keywords found is given.

The UCI chess engine finder will only emit output if the string "uci" is found somewhere in the executable. The Winboard chess engine finder will only emit output if the string "xboard" is found somewhere in the executable.

c:\chess\winboard\crafty>wbcheck64 craftydd.exe
file mapping read data is
found accepted
found analyze
found bk
found black
found colors
found computer
found cores
found debug
found draw
found easy
found edit
found egt
found feature
found force
found go
found hard
found hint
found ics
found level
found memory
found move
found myname
found name
found new
found nopost
found nps
found offer
found option
found otim
found ping
found playother
found post
found protover
found quit
found random
found rating
found rejected
found remove
found resign
found result
found reuse
found san
found sd
found setboard
found sigint
found sigterm
found smp
found st
found tellics
found tellicsnoalias
found time
found undo
found variant
found variants
found white
found xboard

program exits with the number 56 returned to the operating system.

ucicheck was fooled by crafty:

c:\chess\winboard\crafty>ucicheck64 craftydd.exe
file mapping read data is
found btime
found check
found code
found cp
found debug
found default
found depth
found go
found hash
found id
found info
found is
found later
found mate
found max
found min
found name
found nodes
found nps
found option
found ponder
found position
found pv
found quit
found register
found score
found spin
found string
found time
found type
found uci
found var
found wtime

program exits with the number 33

c:\chess\winboard\Rybka>wbcheck64 "Rybka 3.exe"
file mapping read data is

program exits with 0


c:\chess\winboard\Rybka>ucicheck64 "Rybka 3.exe"
file mapping read data is
found author
found bestmove
found binc
found btime
found button
found check
found code
found combo
found cp
found currmove
found currmovenumber
found debug
found default
found depth
found go
found hash
found id
found infinite
found info
found is
found isready
found lowerbound
found mate
found max
found min
found movestogo
found movetime
found multipv
found nalimovcache
found nalimovpath
found name
found nodes
found nps
found option
found ponder
found ponderhit
found position
found pv
found quit
found readyok
found register
found score
found searchmoves
found setoption
found spin
found stop
found string
found tbhits
found time
found type
found uci
found uci_elo
found uci_limitstrength
found ucinewgame
found uciok
found upperbound
found var
found winc
found wtime

program exits with 59

Suggestion for automated engine analyzers:
Run these programs first, and if the score is above a certain level, then run additional diagnostics like starting the engine and analyzing the conversation (several programs do this now, but they check every binary in the universe, including things like uninst00.exe, ecoExtract.exe and other things that are definitely not chess engines).

I imagine that it is not foolproof, and obviously can be made much better (e.g. checking to see that '.exe' is the file extension is one obvious example).
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Chess engine recognizer

Post by bob »

What is this run against (Crafty version)??? IE what version of Crafty has "cores" as a command???
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Chess engine recognizer

Post by Dann Corbit »

bob wrote:What is this run against (Crafty version)??? IE what version of Crafty has "cores" as a command???
It only means that somewhere in the binary the substring 'c' 'o' 'r' 'e' 's' exists (not necessarily in that case).

So if the string "scores" is embedded anywhere in crafty, it would emit a false positive (for instance).

The idea of the application is simply to locate possible candidates and reject those things that are clearly not chess engines. It would probably make sense to add additional checks for both UCI and Xboard to include a minimum required set (e.g. I don't think any uci engine can play a game of chess without understanding ucinewgame).
User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Chess engine recognizer

Post by hgm »

Of course if you think that Crafty does not have "cores" as a command, this can immediately give you a good idea for a way to improve it. :lol:

It must be quite annoying to most users when an engine does not react to the "Max Nr of CPUs" they specify in the XBoard menu.