New Cerebellum Library

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Vinvin
Posts: 4461
Joined: Thu Mar 09, 2006 8:40 am
Full name: Vincent Lejeune

Re: New Cerebellum Library

Post by Vinvin » Sun Dec 29, 2019 9:40 am

Ovyron wrote:
Sat Dec 28, 2019 11:15 pm
Yeah, I don't get why books would have weights other than 100% of the best move and 0% for the rest. I've never seen a position where two moves are playable, there's always one that is best and you should always play it.
You solved chess ! Congratulation to you ! :lol: :lol:
More seriously, as you don't know if an opening move is winning or drawing or losing the best thing to do is to select one move randomly from several book moves.

For example, I heard last month that the Berlin defense of the Spanish has been busted by top GMs with the help of Stockfish and LC0. But a couple of months ago the Berlin was considered as a good defense.

User avatar
Master Om
Posts: 350
Joined: Wed Nov 24, 2010 9:57 am
Location: INDIA

Re: New Cerebellum Library

Post by Master Om » Sun Dec 29, 2019 11:40 am

Vinvin wrote:
Sun Dec 29, 2019 9:40 am
Ovyron wrote:
Sat Dec 28, 2019 11:15 pm
Yeah, I don't get why books would have weights other than 100% of the best move and 0% for the rest. I've never seen a position where two moves are playable, there's always one that is best and you should always play it.
You solved chess ! Congratulation to you ! :lol: :lol:
More seriously, as you don't know if an opening move is winning or drawing or losing the best thing to do is to select one move randomly from several book moves.

For example, I heard last month that the Berlin defense of the Spanish has been busted by top GMs with the help of Stockfish and LC0. But a couple of months ago the Berlin was considered as a good defense.
:shock: :shock: :shock: :shock: :shock:

Where do u hear those ?
Always Expect the Unexpected

User avatar
Ovyron
Posts: 3448
Joined: Tue Jul 03, 2007 2:30 am

Re: New Cerebellum Library

Post by Ovyron » Mon Dec 30, 2019 2:08 am

Ozymandias wrote:
Sun Dec 29, 2019 8:54 am
Ovyron wrote:
Sun Dec 29, 2019 1:39 am
It's a nuisance for BIN books, I download one to try it, it plays a game against someone, that someone misplays the opening but the book has missing a killer move, I add it to the book. We play another game, opponent plays same line, I get excited because of the killer move, but my BIN book deviates earlier and I don't get to play it. It was because some earlier position has a 50/50 bifurcation. I have to check every line it plays so that I can specialize in a line that it plays 100% of the time.
Engines that support the format often have a setting to achieve what you want. In Komodo, it's called “Best Book Line”; with it, anything over 50% becomes 100%.
All the books I've used had "Best Book Line" as default, I specifically mentioned 50/50 bifurcations because when moves are tied BIN books still play randomly.

User avatar
Ovyron
Posts: 3448
Joined: Tue Jul 03, 2007 2:30 am

Re: New Cerebellum Library

Post by Ovyron » Mon Dec 30, 2019 2:16 am

Vinvin wrote:
Sun Dec 29, 2019 9:40 am
More seriously, as you don't know if an opening move is winning or drawing or losing the best thing to do is to select one move randomly from several book moves.
In practice this is false. Imagine there's a series of moves that beat Stockfish depth 22, another that defeat Stockfish Depth 27, and another that defeats Stockfish depth 32. Well, correspondence chess opponents can be surprisingly weak and the moves of the third kind are enough to defeat them, so you really want to find a stronger move, because the ones that only defeated Stockfish Depth 31 might not be enough to win.

This is a great way to rank moves, because on the flip side, Stockfish Depth 24 is strong enough to find a draw against lots of variations. It doesn't matter if a move has score 0.80 or 1.20 if Stockfish at Depth 24 is strong enough to equalize against them, so if another 0.60 one produces an attack that it can't handle it should be ranked before them.

What I call "evaluation fudging", you take what you learn from the outcomes of the lines and fudge the scores of leaf positions accordingly. If after all this you still have moves tied and have to flip a coin, you have a great problem.

jdart
Posts: 3880
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: New Cerebellum Library

Post by jdart » Mon Dec 30, 2019 2:43 am

FYI there were a couple of previous discussions on book move selection logic, see:

viewtopic.php?f=7&t=67744

and

viewtopic.php?f=2&t=71297

This is actually something that has some mathematical foundation. The optimal strategy is neither to select the best move always, nor to select randomly, but to balance "exploitation" of known good moves and "exploration" of possibly better ones.

--Jon

User avatar
Ovyron
Posts: 3448
Joined: Tue Jul 03, 2007 2:30 am

Re: New Cerebellum Library

Post by Ovyron » Mon Dec 30, 2019 5:28 am

While I agree, I hold that this should be done at the human level. I.E. it needs a bookmaker that updates the book and that checks what happened after every game and makes the necessary changes for improvement (interestingly I have found that it's most efficient to ignore wins and just play more games), the decision of what move to make in any line is done while no game is happening, when the game is happening the decision has already been made and you want all of its moves played 100% of the time.

I've never seen a good automated bookmaker, that where the user just plays games and it modifies the weights and plays better the next games. The closest I've seen is the experience file of some engines like Eman, but that's only useful once out of book, and adding those moves to the book would be better anyway. CTG's implementation is poor and InfinityChess is worse an BIN's book learning keeps playing losing moves for a while. But maybe that's as good as book learning can be implemented, exploitation/exploration is a human skill.

Nay Lin Tun
Posts: 563
Joined: Mon Jan 16, 2012 5:34 am

Re: New Cerebellum Library

Post by Nay Lin Tun » Mon Dec 30, 2019 1:23 pm

Vinvin wrote:
Sun Dec 29, 2019 9:40 am
Ovyron wrote:
Sat Dec 28, 2019 11:15 pm
Yeah, I don't get why books would have weights other than 100% of the best move and 0% for the rest. I've never seen a position where two moves are playable, there's always one that is best and you should always play it.
You solved chess ! Congratulation to you ! :lol: :lol:
More seriously, as you don't know if an opening move is winning or drawing or losing the best thing to do is to select one move randomly from several book moves.

For example, I heard last month that the Berlin defense of the Spanish has been busted by top GMs with the help of Stockfish and LC0. But a couple of months ago the Berlin was considered as a good defense.
There are several variations of Berlin, some suboptimal variation would probably be busted.

But Berlin is Leela's top choice against 1.e4 (almost all fully trained series prefer Berlin, may be 10 out of 12), it is very unlikely to be busted the variation of Berlin that Leela choose.

Busting in chess require significant mistake/blunder from an opponent, as chess is an extremely drawish game with a big margin error for draw. What I mean is that in majority of positions, 15 men vs 16 men would still be a draw. I have seen many gambits in TCEC where one side had a material handicap for nothing but still end as draw among SF and Lc0 . (e.g Danish Gambit , Smith Morgan Gambit, King gambit)

User avatar
Ovyron
Posts: 3448
Joined: Tue Jul 03, 2007 2:30 am

Re: New Cerebellum Library

Post by Ovyron » Tue Dec 31, 2019 6:47 am

Nay Lin Tun wrote:
Mon Dec 30, 2019 1:23 pm
But Berlin is Leela's top choice against 1.e4 (almost all fully trained series prefer Berlin, may be 10 out of 12), it is very unlikely to be busted the variation of Berlin that Leela choose.
Right. But is the variation that can't be busted the best you can do? Around here the "unbustable" variation is the Marshall-Counter Attack, I've been able to use it to draw people in much faster hardware at blitz, and it's unique on that. It holds.

So I have a series of moves from black that basically guarantee a draw if white allows it, what use does it have? None, because by playing it also Black gives away any chance of winning. White can't win on the MCA, but black can't either, so if white wants to avoid it to try to beat black, so does black want to avoid it to attempt to beat white.

I don't know if Leela's Berlin is similar, but the thing is that even if it wasn't (if Leela holds the game without giving away black's winning chances), for a book eventually a novelty is going to be played, and then the engine (usually Stockfish) is going to be sent on the road and it'll have to play the positions and who knows if it'll understand them as well as Leela.

The job isn't to solve a position to a draw and go for it, it's to find the one that makes it the most difficult for the opponent to draw it.

User avatar
Ozymandias
Posts: 1157
Joined: Sun Oct 25, 2009 12:30 am

Re: New Cerebellum Library

Post by Ozymandias » Tue Dec 31, 2019 1:40 pm

Ovyron wrote:
Mon Dec 30, 2019 2:08 am
Ozymandias wrote:
Sun Dec 29, 2019 8:54 am
Ovyron wrote:
Sun Dec 29, 2019 1:39 am
It's a nuisance for BIN books, I download one to try it, it plays a game against someone, that someone misplays the opening but the book has missing a killer move, I add it to the book. We play another game, opponent plays same line, I get excited because of the killer move, but my BIN book deviates earlier and I don't get to play it. It was because some earlier position has a 50/50 bifurcation. I have to check every line it plays so that I can specialize in a line that it plays 100% of the time.
Engines that support the format often have a setting to achieve what you want. In Komodo, it's called “Best Book Line”; with it, anything over 50% becomes 100%.
All the books I've used had "Best Book Line" as default, I specifically mentioned 50/50 bifurcations because when moves are tied BIN books still play randomly.
Ties like 50/50, 33/33/33 or others, will obviously remain unaffected by this setting, because there's no better or worse move to choose. That's not specific of this book format, it affects ctg too and depends on the data/parameters chosen when building the book. At least with polyglot, you do have those parameters to play with, it's just a question of knowing what you're doing, although in this case, I suspect the book-makers have no problem with said ties.

User avatar
Deberger
Posts: 22
Joined: Sat Nov 02, 2019 5:42 pm
Full name: ɹǝƃɹǝqǝᗡ ǝɔnɹꓭ

Re: New Cerebellum Library

Post by Deberger » Sat Jan 04, 2020 9:59 am

EPD format seems more useful than pgn:

Code: Select all

rnbqkbnr/pppppppp/8/8/8/6P1/PPPPPP1P/RNBQKBNR b KQkq - book e5 100%;
rnbqkbnr/pppppppp/8/8/8/7N/PPPPPPPP/RNBQKB1R b KQkq - book d5 100%;
rnbqkbnr/pppppppp/8/8/8/7P/PPPPPPP1/RNBQKBNR b KQkq - book e6 100%;
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - book e4 67% d4 33%;
rnbqkbnr/pppppppp/8/8/8/N7/PPPPPPPP/R1BQKBNR b KQkq - book e5 100%;
rnbqkbnr/pppppppp/8/8/8/P7/1PPPPPPP/RNBQKBNR b KQkq - book c5 100%;
rnbqkbnr/pppppppp/8/8/P7/8/1PPPPPPP/RNBQKBNR b KQkq - book Nf6 100%;

Code: Select all

# 9581470                100%
#  283000  (2 * 141500)  67% + 33%
#     159                unreached
# -------
# 9864629                total
Cerebellum_Light_191106.epd.bz2 (download 80.6 MB)

Post Reply