Thats!
My engine Soberango never uses opening book and seems this is the reason sometimes crash if the settings obligate the engine to use it.
I look for it in http://hgm.nubati.net/CECP.html where are the xBoard commands and couldn´t find about it.
Well, I found this but or I do not understand it or is not what I looking for:
"bk
[advanced] Invites the engine to send a number of text lines starting with a Space or Tab character to the GUI, terminated by an empty line, for display as a table to the user. Intended for book or tablebase moves the engine has available in the current position."
Any hint?
Thanks!
How to use openings books?
Moderators: hgm, Rebel, chrisw
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
-
- Posts: 12540
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: How to use books?
If your engine can start a game from a future position, it should work with a book.
Can you run games starting from something like this:
[Event "1. hxg6!!"]
[Site "?"]
[Date "2010.10.28"]
[Round "?"]
[White "Euxinus Pontus no.13, Bxg6"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "7q/b1p5/1p1Npkb1/pPP2ppP/P1P5/3B2P1/5P1R/K3R3 w - - 0 1"]
[PlyCount "43"]
[EventDate "2010.??.??"]
*
Can you run games starting from something like this:
[Event "1. hxg6!!"]
[Site "?"]
[Date "2010.10.28"]
[Round "?"]
[White "Euxinus Pontus no.13, Bxg6"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "7q/b1p5/1p1Npkb1/pPP2ppP/P1P5/3B2P1/5P1R/K3R3 w - - 0 1"]
[PlyCount "43"]
[EventDate "2010.??.??"]
*
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: How to use books?
Thanks Dann!
No, just from the begining!
But is able to read a FEN, what do the subroutine I did to comunicate Soberango with the GUI is this:
Where:
-DiceGUI is the command sent by the GUI.
-Reseteo clean the board and restore all variables.
-CargaFEN() read the FEN and set the apropiate variables.
Sorry, not sure if my question is correct:
After wich command instead of "new" must the engine read the FEN?
No, just from the begining!
But is able to read a FEN, what do the subroutine I did to comunicate Soberango with the GUI is this:
Code: Select all
If DiceGUI="new" Then
Reseteo
FEN="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
CargaFEN(FEN)
EndIf
-DiceGUI is the command sent by the GUI.
-Reseteo clean the board and restore all variables.
-CargaFEN() read the FEN and set the apropiate variables.
Sorry, not sure if my question is correct:
After wich command instead of "new" must the engine read the FEN?
Last edited by Luis Babboni on Mon Jul 25, 2016 11:07 pm, edited 1 time in total.
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: How to use openings books?
When using a GUI book the engine gets the bookbmoves sent to it by the GUI in 'force' mode. I.e. irrespective of whether the engine is going to play black or whiteit will be sent a 'force' command to make it play neither side, and then a number of moves will be sent to it as long as the game stays in book. Once you run out of book, and it is the engine's turn, it will receive a 'go' command to set it thinking.
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: How to use openings books?
That means is not the engine who choice between differents options the book have? Is the GUI who selected the path by the book?hgm wrote:When using a GUI book the engine gets the bookbmoves sent to it by the GUI in 'force' mode. I.e. irrespective of whether the engine is going to play black or whiteit will be sent a 'force' command to make it play neither side, and then a number of moves will be sent to it as long as the game stays in book. Once you run out of book, and it is the engine's turn, it will receive a 'go' command to set it thinking.
-
- Posts: 27795
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: How to use openings books?
Indeed. That is how a GUI book works. The GUI selects an opening line from the book, and feeds it to the engines before setting them playing.
If you want the engine be in control of what book moves it selects, it should handle a book itself. This would be something the GUI is notinvolved in, and knows nothing about. The engine is free to decide what method it uses to find a move, when its turn comes up. It can use search and evaluation,or it could just read the move from a file.
If you want the engine be in control of what book moves it selects, it should handle a book itself. This would be something the GUI is notinvolved in, and knows nothing about. The engine is free to decide what method it uses to find a move, when its turn comes up. It can use search and evaluation,or it could just read the move from a file.
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: How to use openings books?
That´s how I guessed all engines works, but today Soberango was start tested to be add to CCRL 40/4 Rank and crashes because is not able to start a game after some moves made by Arena GUI using its openings bookhgm wrote: ...
If you want the engine be in control of what book moves it selects, it should handle a book itself. This would be something the GUI is notinvolved in, and knows nothing about. The engine is free to decide what method it uses to find a move, when its turn comes up. It can use search and evaluation,or it could just read the move from a file.
That´s why I start thinking in add the ability to use openings book that I was planed for future after quiescence search, hashtables and tablebases and mostly after improving the evaluation cause actually just count material and then has no sense the choice of one or other move in opening if no implies material difference.
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: How to use openings books?
After the GUI ends to read the opening book, it will send to the engine a FEN with the position reached or the engine must actualize its variables after each move made by the GUI from its book while in force mode?
Last edited by Luis Babboni on Tue Jul 26, 2016 12:05 am, edited 1 time in total.
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: How to use openings books?
If your engine is uci and supports the uci commandLuis Babboni wrote:
That´s how I guessed all engines works, but today Soberango was start tested to be add to CCRL 40/4 Rank and crashes because is not able to start a game after some moves made by Arena GUI using its openings book
position startpos moves e2e4 e7e5
it should work.
Daniel José - http://www.andscacs.com
-
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: How to use openings books?
Thanks Daniel!cdani wrote:If your engine is uci and supports the uci commandLuis Babboni wrote:
That´s how I guessed all engines works, but today Soberango was start tested to be add to CCRL 40/4 Rank and crashes because is not able to start a game after some moves made by Arena GUI using its openings book
position startpos moves e2e4 e7e5
it should work.
Soberango uses xBoard*
But anyway I´m not understand your suggestion.
You mean that read GUI information gives to the engine while move using its book and transform it to this to set the apropiate position in the engine board?
*: when I say that uses xBoard, is not that I take the pseudocode showed in http://hgm.nubati.net/CECP.html and use it to write a complete xboard interfase in FreeBasic. The communication Soberango have with GUI is just using the minimum commands I saw I need to run it and all other are simply ignored.