# How much does adding an opening book to a relatively weak chess program affect its strength?

Jonathan Schaeffer in One Jump Ahead (via the Chess Programming Wiki):

To solve the opening problems of his chess machine, Belle, Ken Thompson typed in opening lines from the Encyclopedia of Chess Openings (in five thick volumes). Religiously, he dedicated one hour a day for almost three years (!) to the tedious pursuit of entering lines of play from the books and having his Belle computer verify them. The result was an opening library of roughly three-hundred thousand moves. The results were immediate and obvious: Belle became a much stronger chess program, and Ken probably aged prematurely.

I read somewhere else that Belle eventually reached the equivalent of 2250 Elo (I assume that was in terms of USCF ratings), but I couldn't find any information about its rating gain due to the opening book.

So here's a more general question. Suppose we take a relatively weak chess engine that doesn't use an opening book and that has a known rating from a pool that includes humans (e.g. Lichess or chess.com). How much stronger would it be if we added an extensive opening book to it?

Let's assume the engine's original rating is anything between the equivalent of 1000 to 2000 FIDE. This is an arbitrary range. The idea is that if the engine is too weak, then the opening book would be just covering for the lack of any search/evaluation, and if it's too strong then the opening book would get less necessary. Of course I expect the answer to be different depending on the strength of the original engine.

• If we find enough opponents for my engine, we can give it a try. Commented Apr 14, 2021 at 18:17
• @koedem do you have a Lichess bot account for your engine? Commented Apr 15, 2021 at 4:38
• I have indeed. Not sure things like that should be posted here, but if people are actually interested we can arrange that. In Blitz / Rapid the bot is probably somewhat below FM level. One issue with such an experiment is that the bot is deterministic, so without a book it can actually be exploited if a human just keeps playing the same winning game. Commented Apr 15, 2021 at 7:15
• That's a bit too strong. Commented Apr 18, 2021 at 17:53
• Here is basically the same question in another forum. Other than that, in my opinion the only way to find out is getting two versions of the same engine (with and without an opening book. Or even better, instead of no opening book at all, a very limited one in order to prevent tons of repeated games) and with the help of cutechess do the proper testing. Commented Apr 18, 2021 at 19:12

I have written a relatively weak chess engine (source code here). After playing it manually against "Play Computer" at chess.com I estimate its strength at 1500 to 1700 Elo points.

I added a learning opening book to it (around 150 openings entered by hand and currently around 18000 moves learned). It now sometimes wins against "Play Computer" with 2300 Elo points.

Without opening book, its chances are low to reach a good position in the middle game. With opening book it reaches neutral to good position quite frequently. From there it has a chance to win because it plays stronger if there are less pieces on the board.

I think that confirms the comment from Oscar Smith above.

Stockfish gains about 50 elo from the Cerebellum opening book ("Brainfish" is just Stockfish equipped with Cerebellum).

I don't know if the effect of opening books varies depending on engine strength, however.

• Stockfish is way stronger than 2000 FIDE, though. But thanks for the answer, at least it provides a lower bound of sorts. Commented Apr 16, 2021 at 12:24
• My guess is that a well constructed opening book could be worth 200 elo to an engine in the 1000 elo range. For traditional (AB) engines, openings are very difficult since so much opening theory is about long term benefits that are hard to hand-code. A good opening book will get you up a pawn or so against inaccurate players, which should help a bunch. Commented Apr 25, 2021 at 4:51