Yorum Sayısı: 1
Konu Sayısı: 1
Üyelik Tarihi: Dec 2008
Merhaba;
UCI protokolü ile ilgili her yerde bulunan birkaç sayfalık döküman dışında nereden kaynak bulabilirim?
Yorum Sayısı: 1,912
Konu Sayısı: 400
Üyelik Tarihi: Feb 2008
Furkan KAMACI Nickli Kullanıcıdan Alıntı:Merhaba;
UCI protokolü ile ilgili her yerde bulunan birkaç sayfalık döküman dışında nereden kaynak bulabilirim?
UCI protokolu SMK tarafından geliştirilmiştir:
Kısa bilgi:
http://www.shredderchess.com/chess-info/...rface.html
İndirme:
http://www.shredderchess.com/download.html
Doğrudan indirme hiperbağı:
http://download.shredderchess.com/div/uci.zip
KG,
IECC 2246, MAPEJK 2300, DESC 2213
Best regards, iyi günler, mfSG, HT
Yorum Sayısı: 1,912
Konu Sayısı: 400
Üyelik Tarihi: Feb 2008
S:
http://www.uciengines.de/UCI_Protocol/uci_protocol.html
Alıntı:You will find the official UCI Protocol on the Shredder pages with new additions, here called UCI 2!
Here is a commented Logfile of the most important commands.
(> GUI to Engine, < Engine to GUI)
The Enginestart and Engineoptions:
> uci
< id name Engine Name
< id author Author Name
After the ‘uci’ by the GUI the engine definies it’s name and author.After that it tells the available options.
< option name Ponder type check default false
< option name Hash type spin default 1 min 1 max 1024
< option name NalimovCache type spin min 1 max 16 default 2
< option name NalimovPath type string default <empty>
< option name MultiPV type spin min 1 max 20 default 1
< option name OwnBook type check default true
This options are implemented in the GUI and must have the same name, In the UCI 2 protocol there are several other native options.
< option name Clear Hash type button
Clear Hash is implemented in Fritz, other button options are not shown.
Under other GUI’s Clear Hash is available through the engineoptions.
Here are 5 examples of the different engine option types:
< option name Position Learning type check default true
< option name BookFile type string default dbbook.bin
< option name Book Size type combo default Big var Small var Medium var Big
< option name Selectivity type spin min 0 max 15 default 5
< option name Clear Book Learning type button
< uciok
With the ‘uciok’ the engine tells that all options are sent.
Then the GUI set the options and finish with ‘isready’.
After initializing, the engine answers with ‘readyok’
> setoption name Ponder value true
> setoption name Hash value 16
> setoption name NalimovCache value 4
> setoption name NalimovPath value D:\tbs
> setoption name Position Learning value true
> setoption name BookFile value dbbook.bin
> setoption name Book Size value Big
> setoption name Selectivity value 5
> isready
< readyok
Arena sets all available options, Fritz and Shredder only the options with different values as the default values.
If the engine don’t support hashtables, Fritz sends:
> setoption name Hash value 1
The button options will be sent, when the user pressed the button:
> setoption name Clear Book Learning
or
> setoption name Clear Book Learning value true
The Move (GUI to Engine):
UCI 2 GUI’s will send:
> ucinewgame
When the following move is from a different game
Every move by the GUI is done by the position or by the position with a movelist followed by the ‘go’ command with timesettings:
> position startpos
or
> position startpos moves g1f3 d7d5 b2b3 c8g4 c1b2 b8c6 h2h3
(castling is done by the kingmove e.g.: e1g1 or e8c8,
promotion by e7e8q for promotion to queen or e7e8n for promotion to knight)
> position fen 8/1K6/1Q6/8/5r2/4rk2/8/8 w - - 0 0
or
> position fen 8/1K6/1Q6/8/5r2/4rk2/8/8 w - - 0 0 moves b6b1 e3e2
The fen position is only used after setting up a position.
After the go command with the timesettings the engine has to start calculating the move:
> go btime 300000 wtime 300000
for game in 5min.
> go btime 302000 wtime 302000 winc 2000 binc 2000
with incremental clock 5 min + 2 sec.
> go movestogo 40 wtime 300000 btime 300000
for 40 moves in 5 min.
> go depth 5
for fixed depth 5.
> go infinite
for analysing.
> go movetime 300000
Exactly 5min for the next move, not supported by Fritz.
> go mate 7
search a mate in 7 moves
> go nodes 1000
search 1000 nodes. This is only supported by Arena.
The Engineoutput:
Here are examples of the possible info output:
< info currmove e8e7 (current calculated move)
< info currmovenumber 29
< info nps 291506 (nodes per sec, Fritz calculates the nps itself)
< info tbhits 830
< info depth 9
< info score cp12 (in centipawns)
< info score mate 5 (or mate -5)
< info nodes 288973
< info time 11192 (milliseconds)
< info pv e2e4 e7e5 g1f3 b8c6 f1d3 f8c5 e1g1 g8e7 b1c3
(Shredder Classic don’t show the PV info, if it stands alone with no other infos, Fritz shows some infos only after depth 6!)
< info hashfull 999 (Hashtableusage in permill, not shown by Fritz)
< info cpuload 999 (CPU usage in permill, not shown by Fritz)
The infos can be also combinied:
< info depth 9 score cp 12 nodes 3266879 time 11192 pv e2e4 e7e5 g1f3 b8c6 f1d3 f8c5 e1g1 g8e7 b1c3
< info string smp processes := 1
The info string is shown by the GUI 1:1. Under Fritz with a PopUp window before the engine sends the ‘readyok’, later info strings are shown in an own window.
The Move (Engine to GUI):
< bestmove e2e4
or for promotion to knight:
< bestmove d7d8N
Before the bestmove the engine should send a final info
Pondering:
If an engine is able to ponder it must tell it the GUI at startup (option name Ponder). When pondering is swithed on the GUI sends:
> setoption name Ponder value true
After that the engine tells the pondermove with every move, but don’t start pondering itself. Some engines send the pondermove also if pondering is switched off.
Most GUI’s accept the pondermove also if the engine don’t send the ponderoption at startup.
< bestmove e2e4 ponder g8f6
The GUI answers imediatelly with the ponder command:
> position startpos moves h2h4 e7e5 d2d4 e5d4 d1d4 d7d5 e2e4 g8f6
> go ponder wtime 7188043 btime 7166483
Some earlier versions of Fritz send this line also if an engine don’t support pondering. The pondermove is taken from the PV!
Now the engine ponders, the GUI sends now:
> ponderhit
if the pondermove is played, or:
> stop
> position startpos moves h2h4 e7e5 d2d4 e5d4 d1d4 d7d5 e2e4 h4h5
if another move is played.
In the UCI 2 protocol the engine is allowed to ponder on a different move than
MultiPV:
> setoption name MultiPV value 3
after that the engine should show the mainlines of the 3 best moves:
< info multipv 1 depth 2 seldepth 4 time 63 score cp 126 nodes 65 nps 1031 hashfull 0 pv c8g4 f1g2
< info multipv 2 depth 2 seldepth 4 time 63 score cp 78 nodes 150 nps 2380 hashfull 0 pv g8f6 f2f3
< info multipv 3 depth 2 seldepth 4 time 63 score cp 47 nodes 108 nps 1714 hashfull 0 pv b8c6 e2e3
and return to ‘normal’ output after:
> setoption name MultiPV value 1
Stop command:
> stop
after ‘stop’ during the search the engine should as soon as possible play the best move.
> quit
after ‘quit’ the engine should quit the program as soon as possible.
Resigning drawoffer and drawclaim:
Is done by the GUI.
Shredder and Fritz have a feature for automatic drawoffer. If several moves with the score 0.00 are played the GUI may offer or accept a draw. This can also happen if the Engine use 0.00 score in the opening book!
Ek bilgi:
http://wbec-ridderkerk.nl/html/linkpage.htm
http://www.superchessengine.com/
Ayrıcana, wiki'de arayabilirsiniz.
UYO,
IECC 2246, MAPEJK 2300, DESC 2213
Best regards, iyi günler, mfSG, HT