Some notes about openings!

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

Moderator: Ras

Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

One thing more regarding opening books,

Who said that my opening lines are drawish ?? ))

See what is going here please:
http://www.sedatcanbaz.com/chess/?page_id=522

As we see... this time the draw percentage is 26.3 %

Don't forget to check Blacks winning percentage too ;)
Do you know why Blacks have high winning percentage ?? ))

Games : 12500 (finished)

White Wins : 4942 (39.5 %)
Black Wins : 4268 (34.1 %)
Draws : 3290 (26.3 %)
Unfinished : 0

White Perf. : 52.7 %
Black Perf. : 47.3 %

ECO A = 883 Games ( 7.1 %)
ECO B = 5639 Games (45.1 %)
ECO C = 2081 Games (16.6 %)
ECO D = 3262 Games (26.1 %)
ECO E = 635 Games ( 5.1 %)

To be honest,
I work very hard over the strongest opening lines !! not many people can imagine...

That's why my used openings have highest draw percentage by the strongest chess engines

And it does not mean that I am using draw lines....
Just those draws are appearing because I am using as far possible the strongest lines for both sides

Imagine if you was a player (I mean as chess engine),
Which opening lines would you prefer ?)

In other words,
My used opening lines are highly optimized for the Top mp chess engines
That's why the draw percentage is higher with top chess engines...
But as we see, with weaker chess engines, the situation is different...

A little note (about Perfect 16 book on Playchess server),
http://www.sedatcanbaz.com/chess/?page_id=473

In 2009, as far as I remember,
My Perfect 16's overall winning percentage was around:
Whites around 75 %
Blacks around 65 %


So....all it depends on the used conditions




Best,
Sedat
Zenmastur
Posts: 919
Joined: Sat May 31, 2014 8:28 am

Re: Some notes about openings!

Post by Zenmastur »

Sedat Canbaz wrote:Hello Friends,

...Note that I've changed my mind...and for the future,
I don't plan to create anymore engine opening books by GMs games!
Because GMs games winning percentage are not same as Top chess engines !
In this way...I believe the book's openings are easier to optimize !!
.
Sedat,

With all due respect to your book making abilities I think you should reconsider your decision. I think its a mistake not to include human games!

The reason is, computers contribute very little if anything to opening theory. The reason they don't contribute more is they simply regurgitate openings from their books. Until they're out of book they don't calculate and unlike humans they don't do any preparatory analysis before playing in a tournament. So if you use only computer games your books will fall behind current opening theory. You need some source of new play or novelties to keep the book in sync with current praxis. I don't think computer play will provide this in sufficient quantity to stay current.

On a slightly different tack, I've done an analysis of positions that occurred in a 7+-million game data base in an attempt to estimate the possible ELO gains that can be made by positional learning. ( i.e. positions not considered part of an opening) My conclusion was that little to nothing can be gained by this method. I found that positions in the middle game don't repeat often enough for there to be any benefit from this method.

The endgame and openings repeat position often enough to make this worthwhile. EGTB's do a poor job of handling the end game positions. The problem is that they don't have 12, 11, 10, 9, or 8 man table bases. So there is considerable room for improvement that could be filled by positional learning in the endgame. Although this would appear to require a new an innovative approach on how to collect and/or generate and then effectively use incomplete information about a particular endgame.

Openings are a completely different matter. Data gathered from the game databases show some interesting statistic. Before I started gathering data I checked every game for legality. I also removed all duplicate games. This included games between the same players in which the game was in whole a partial repeat of another game by the same players with the same outcome (usually a draw) or in some cases a different outcome. There were also a large number of games that were shortened, had moves altered, had the outcome changed or reversed, had the players names reversed, had incorrect dates, one players name missing etc, I tried to remove all of these games. I also attempted to remove all computer games since they add little or nothing to the openings. It's possible that some duplicates still slipped through by having the players name changed (misspelled etc) in such a fashion that the computer didn't recognize that the game was played by the same players. I also removed any game less than 40 plies long. I considered removing any game less than 60 plies long but the down side was a large amount of useful data would be lost vice the benefit of removing a few more GM draws and games that contained early blunders. Some of the draws are important, and most of the blunder aren't repeated so will have little effect on the statistics. So I decided that a 40 ply limit, while not perfect, was good enough. These efforts when combined, removed a very large number of games from the data sets. i.e. millions of games

Of the 617,791 games in which both players had a verified FIDE rating of 2400 or above, there were 53,112,182 moves played and a total of 37,809,293 unique positions reached.
Of the 37,809,293 positions only 3,516,016 were seen more than once. Only 125,629 were repeated 10 times or more. Seeing a position 10 times in 617,791 games means that
"on average" you would expect to see such a position, roughly speaking, at least twice in 100,000 games.

The number of positions that occurred varied depending on how many plies are considered. Below is a table that shows the depth in plies and the number of positions that were repeated at least 10 times in 617,791 games.

All depths 125,629 100.0% difference 162
60 plies 125,467 99.9% difference 45
50 plies 125,422 99.8% difference 439
40 plies 124,983 99.5% difference 4,841
30 plies 120,142 95.6% difference 31,869
20 plies 88,273 70.3% difference 69,180
10 plies 19,093 15.2% difference 19,093

As can be seen considerably more than half of the positions occur in the first 10 moves (20-plies). Very few repeat positions occur past 40 plies. I actually wanted to do this analysis on much larger data sets, but I was using crafty to extract the data from very large pgn files. I tried doing one with 13+ million games but crafty died about 10 minutes into it. When it did this it would corrupt all the previously written .bin files it had worked on. When I got down to 5,000,000+ games in was still choking but not dying. So if you are working with large book files with crafty its good to exit after making each book so that if the program dies it won't corrupt previous work. With smaller files it would generate the info I wanted but had other problems. It seems that the it can't handle more than 100 sort files. If it creates more than this it won't delete any of them when done and generally the book files is corrupted. It reads large input files ok but can't write a file as large as 2gb. Many of the book files that were much smaller than this limit were also corrupted during creation.

In the end I found that if I kept the number of sort files to 100 or less it seem to work ok as long as the output file was relatively small. The largest game file I was able to do had 4.8+ million games in it. But I'm not going to post any of that data here because it seems to have some anomalies in it. I did one set with 3,181,705 games in it and the output seems to be ok. Here is the data from that set:

All depths 545,645 100.0% difference 2,732
60 Plies 542,913 99.5% difference 88
50 Plies 542,825 99.5% difference 1,589
40 Plies 541,236 99.2% difference 19,830
30 Plies 521,406 95.6% difference 144,150
20 Plies 377,256 69.1% difference 308,323
10 Plies 68,993 12.6% difference 68,993

A few things changed with this set of games that deserve noting. The number of the games increased by a factor of 5.15 and the quality of the play dropped such that the minimum ELO is now only 2,000. One thing that didn't change is the number of times a position had to be repeated to be included. It stayed at 10 even though the number of games grew by more than a factor of five. This is the primary reason for the inflated numbers. Its not the result of allowing lower rated players into the mix as some might assume. If we increase the number of times a position has to appear to be included in the final output to 51 then the frequency of occurrence between the smaller set and the larger set will be approximately equal. This yields these numbers for 3,181,705 games with each included position occurring 51 times:

All depths 101,603 100.0% difference 106
60 Plies 101,497 99.9% difference 0
50 Plies 101,497 99.9% difference 29
40 Plies 101,468 99.9% difference 1,399
30 Plies 100,069 98.5% difference 16,200
20 Plies 83,869 82.5% difference 59,751
10 Plies 24,118 23.7% difference 24,118

The first thing I noted was an approximate reduction of position by ~20% as compared to the first set of data. Apparently the lower rated players are spreading their play across more lines of play than higher rated player. This causes a decrease in the number of positions that reach the minimum threshold to be include in the data, thus the lower number of positions included. The second thing I noted was that the lower rated players are not following the lines as deeply as the higher rated players causing an increase percentage of included positions in the sub-30 ply range.

The raw numbers are pretty small. Even so I don't think these numbers properly represent the problem size. A better metric would be the number of terminal position. I don't have exact numbers for each set but the smaller set seems to have about 6,000 and the larger set seems to have about 26,000 terminal positions. These numbers are small enough that they are subject to extensive computer analysis. The size of the problem is probably over estimated by these numbers since these ARE NOT (emphasis added) a bunch of unrelated positions. Many of these position are very closely related and should be analyzed as a group. I don't believe that "normal computer analysis" is sufficient to evaluate these positions. By "normal computer analysis" I mean taking a position, feeding it into a chess engine, and then waiting X seconds to get an evaluation. This type of evaluation is completely unreliable and next to worthless for these types of positions in my opinion. One reason I don't believe normal analysis is suitable for this task is that it is based only on tactics. I'm sure that some of the positions will be found to be untenable because the computer will find tactics that change the evaluation of the position. But, I also expect this to be the exception and not the rule.

It surprises me that no one has identified the terminal positions or undertaken their systematic evaluation by way of deep line-of-play analysis.

Regards,

Forrest
Only 2 defining forces have ever offered to die for you.....Jesus Christ and the American Soldier. One died for your soul, the other for your freedom.
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

Hello Forrest,

Thanks...and good points...!

About current issue,
Note that Perfect 2015's lines are based mainly on Perfect 2014t book
That means mostly of the lines are belonging to GMs openings !)

But this is also true that,
P2015 book includes many strong engine openings....


And here is just one example:

1) P2012 book is based on GMs games,
As we see... (8.Qd3) no games are recorded by Top GMs:

.
Image


2) P2015 book is based on Top engine games,
As we see... (8.Qd3) many games are recorded by Top Engines:

.
Image


In other words,
Perfect 2015 book includes mainly GMs openings + chess engine openings too !


Btw,once more I'd like to point out:
Mostly of the neutral books/lines are based on GMs games, for example there are many openings,
Where GMs of 2500-2850 Elo perform good, but unfortunately exactly on the same opening positions,
This time the Top Engines fall in a big disadvantage and that affect a lot the Engines Elo strength
Note also that the current Top Chess Engines are at least 500 Elo stronger than the Top Grandmasters
*That’s why nowadays many Grandmasters use the strongest Chess Engines for their analysis


For more details:
http://www.sedatcanbaz.com/chess/?page_id=127



Best,
Sedat
Zenmastur
Posts: 919
Joined: Sat May 31, 2014 8:28 am

Re: Some notes about openings!

Post by Zenmastur »

Sedat Canbaz wrote:Hello Forrest,

Thanks...and good points...!

About current issue,
Note that Perfect 2015's lines are based mainly on Perfect 2014t book
That means mostly of the lines are belonging to GMs openings !)

But this is also true that,
P2015 book includes many strong engine openings....


And here is just one example:

1) P2012 book is based on GMs games,
As we see... (8.Qd3) no games are recorded by Top GMs:

.
Image


2) P2015 book is based on Top engine games,
As we see... (8.Qd3) many games are recorded by Top Engines:

.
Image


In other words,
Perfect 2015 book includes mainly GMs openings + chess engine openings too !


Btw,once more I'd like to point out:
Mostly of the neutral books/lines are based on GMs games, for example there are many openings,
Where GMs of 2500-2850 Elo perform good, but unfortunately exactly on the same opening positions,
This time the Top Engines fall in a big disadvantage and that affect a lot the Engines Elo strength
Note also that the current Top Chess Engines are at least 500 Elo stronger than the Top Grandmasters
*That’s why nowadays many Grandmasters use the strongest Chess Engines for their analysis


For more details:
http://www.sedatcanbaz.com/chess/?page_id=127



Best,
Sedat
I didn't have any problems finding games in my data base with 8.Qd3. A few were even from top GM's. Nothing recent, but so what?

It shouldn't come as a surprise that GM's don't adopt anti-thematic moves without a good reason. I saw nothing special about the games that contained this move. By "special" I mean something that would cause a large number of GM's to suddenly start playing this move vice more conventional or well studied moves.

So I have a question for you. What is the idea behind this move that makes you believe that it deserves special attention? Or, to put it another way, Why should any GM adopt this move?

Regards,

Forrest
Only 2 defining forces have ever offered to die for you.....Jesus Christ and the American Soldier. One died for your soul, the other for your freedom.
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

Zenmastur wrote:
So I have a question for you. What is the idea behind this move that makes you believe that it deserves special attention?
Regards,

Forrest
In my opinion,
This current move (Qd3) is very strong and it's quite well suits for top engine playing styles!
A little note: with 58% winning percentage by various top engines ;)

Note that,
The played move idea Qd3 does not belongs to me!
That's why I have no any idea about your question...

Note also that,
I am not a book move generator !
But I am a book author, that means: I am engine book move optimizer!
It's true also that I have created some engine opening ideas, but not Qd3

And since many years as far as possible,
I prefer to work over the strongest engine openings for both sides!


Hopes helps,
Sedat
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

Just my 2 cents more over this issue,
About why I preferred to create Perfect 2015 book by Top engine games

In other words,
We don't test GMs....We test Chess Engines!

Here is just one example, and if you are interested...
I can publish many many similar critical weak opening positions as this one
Note: Perfect 2015 book does not allow the below weak opening!

1) Games by Top GMs - Blacks with winning percentage 64 %
.
Image


2) Games by Top Engines -Blacks with winning percentage 25 %
.
Image
IanO
Posts: 499
Joined: Wed Mar 08, 2006 9:45 pm
Location: Portland, OR

Re: Some notes about openings!

Post by IanO »

PK wrote:I really miss tournaments that test engines with own books. While I'm far from a decent book maker, I probably know a thing or two about my engine just from looking at games. I know that it tends to mishandle French Defense, I put some effort in ensuring that after 1.c4 e5 it doesn't fall into too drawish lines etc.
I agree. I think the SSDF is the only list with own-books (due to incorporating dedicated chess computers). Open tournaments like WCCC and CCT do as well. The next best thing for private tournaments is to turn the book off altogether, like the current Stage 2 of TCEC 7.

I remember the days when the top programs boasted not just their strength but their finely tuned opening books and their authors. It is a large effort, but so is opening prep for any GM worth their salt. I was hoping there would be more advancement in automated book generation, like we had with Learning Lemming.
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

IanO wrote:
PK wrote:I really miss tournaments that test engines with own books. While I'm far from a decent book maker, I probably know a thing or two about my engine just from looking at games. I know that it tends to mishandle French Defense, I put some effort in ensuring that after 1.c4 e5 it doesn't fall into too drawish lines etc.
I agree. I think the SSDF is the only list with own-books (due to incorporating dedicated chess computers). Open tournaments like WCCC and CCT do as well. The next best thing for private tournaments is to turn the book off altogether, like the current Stage 2 of TCEC 7.

I remember the days when the top programs boasted not just their strength but their finely tuned opening books and their authors. It is a large effort, but so is opening prep for any GM worth their salt. I was hoping there would be more advancement in automated book generation, like we had with Learning Lemming.

I suggest you to check my played 3-type tournaments:
http://www.sedatcanbaz.com/chess/?page_id=133

1) With Neutral short book
2) Without Books
3) Own books


So...did you notice with own book standings: Hiarcs and Houdini rankings ?
Do you think that their ranks are in reality is right ? )

Own books are good idea but for Swiss, online competitions etc ...
But not ideal way for creating rating lists...

For example,
X Top Book Maker can create a very strong own book for X engine style,
which will have high possibility to be rated 50- 100 Elo or even more stronger...

I mean,
I can create a very strong book for Rybka, which will be rated at near Elo strength as Stockfish, just saying... ;)

Btw, a few notes about testing the engines without books,
1) Many engines will prefer to play similar/ same openings...
I mean such testing will be too boring after several games per player
2)Especially the quality of the games will be fall down, because almost all engines suffer (play not so strong lines) without books


In other words, I strongly believe in that,( for ideal way of testing):
-The short neutral strong openings are better....in case of if you wish determine X Engine Elo strength


Hopes helps...


Best,
Sedat
Uri Blass
Posts: 10962
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Some notes about openings!

Post by Uri Blass »

Sedat Canbaz wrote:
IanO wrote:
PK wrote:I really miss tournaments that test engines with own books. While I'm far from a decent book maker, I probably know a thing or two about my engine just from looking at games. I know that it tends to mishandle French Defense, I put some effort in ensuring that after 1.c4 e5 it doesn't fall into too drawish lines etc.
I agree. I think the SSDF is the only list with own-books (due to incorporating dedicated chess computers). Open tournaments like WCCC and CCT do as well. The next best thing for private tournaments is to turn the book off altogether, like the current Stage 2 of TCEC 7.

I remember the days when the top programs boasted not just their strength but their finely tuned opening books and their authors. It is a large effort, but so is opening prep for any GM worth their salt. I was hoping there would be more advancement in automated book generation, like we had with Learning Lemming.

I suggest you to check my played 3-type tournaments:
http://www.sedatcanbaz.com/chess/?page_id=133

1) With Neutral short book
2) Without Books
3) Own books


So...did you notice with own book standings: Hiarcs and Houdini rankings ?
Do you think that their ranks are in reality is right ? )

Own books are good idea but for Swiss, online competitions etc ...
But not ideal way for creating rating lists...

For example,
X Top Book Maker can create a very strong own book for X engine style,
which will have high possibility to be rated 50- 100 Elo or even more stronger...

I mean,
I can create a very strong book for Rybka, which will be rated at near Elo strength as Stockfish, just saying... ;)

Btw, a few notes about testing the engines without books,
1) Many engines will prefer to play similar/ same openings...
I mean such testing will be too boring after several games per player
2)Especially the quality of the games will be fall down, because almost all engines suffer (play not so strong lines) without books


In other words, I strongly believe in that,( for ideal way of testing):
-The short neutral strong openings are better....in case of if you wish determine X Engine Elo strength


Hopes helps...


Best,
Sedat
I think that it is better if every engine create its own book
and of course programmers need to develop some create book function and there can be a competition of different programmers for creating a better book.

There should be a function create book that get the following parameters

1)Engine that you create a book for it.
2)Time control(that you prepare the book for)
3)Computer time that you are allowed to use for creating the book.
4)Database that you are allowed to use for creating the book.

Suppose 3 different programmers develop their own function then later it is possible to have a competition between Komodo stockfish and houdini when you practically have 9 players with rating.

KomodoA(Komodo with function create book by programmer A)
KomodoB
KomodoC
StockfishA
StockfishB
StockfishC
HoudiniA
HoudiniB
HoudiniC

Possible time control may be 3 minutes per game when you allow 10 hours of computer time to generate every book(total time of 90 hours because you have 9 different books because komodoA and StockfishA are different books that you build for different engines even if you use the same algorithm to generate them)

Now we only need programmers to develop a create book function(I do not plan to do it).
Sedat Canbaz
Posts: 3018
Joined: Thu Mar 09, 2006 11:58 am
Location: Antalya/Turkey

Re: Some notes about openings!

Post by Sedat Canbaz »

Dear Uri,

I say again, the used method:
Testing the engines with larger and deeper book lines is not a good idea for creating rating lists!
Otherwise (in case of testing with own books)
We will see much more draws...and many games lost just simply due to weak lines...

To be honest,
Actually, when I was beginner in computer chess,
I was testing the engines only with own books...but later I decided it is a wrong testing...
Because many own books suffer due to they include many critical weak lines...
And after that....since 2002 year,
I decided to work over short neutral strong opening lines (Perfect books)

Btw, just one example,
See the below standing please, and as we see depending on book usage,
Stockfish performs differently..

I can publish you many many tournaments, where we can see completely different results....just let me know please

.
Image



Best,
Sedat