Blogs

writing an opening analyzer part 2

PeterArt
| 2

Hi guys..

Well i am making quietly some big process in my programming.
To write a small prog that can do some stats on game archives.
I like to get answered what are my good openings how often did i play them etc.
I know SCID but its just a little bit beyond  what SCID can do for me.
But i am wondering maybe someone can help me out here on this chess topic.

I have solved already a few things, so yes i'm on track:

  • Extracting pure games from variations on pgn game formats.
  • If one plays by the book, i can already recognize it with my code !!
  • If one plays an opening and it transposes for example going from caro kann to Scandinavian; the code will be able to detect that. I am mentally noting my code for that right now, as the problem is already solved in my mind, it only needs to be translated and rewritten in python, when i have the time for it. (and as i'm new to python my coding that is the slow developing part > but i choose python as it will become freeware and to learn python at the same time, its kinda cool language compared to VB.net C.net C# F# etc

However i see i think a new chess opening issue and i am not sure how to deal with it. Maybe someone from here can enlighten me on this part :

what if someone reaches a certain position with extra moves?
Just to show a simplified sample :

The very first white moves could be.
.

1.d4 XX   2.e4 XX  .
.
Or they might be played like.
.( transposed )
1.e4 XX   2.d4 XX  .
.
But is this the same or not ?
As it costs extra moves is still that
opening or are we off the main line ?
1.d3 XX   2.e4 XX   3.d4 XX  .

.

 

 

 

 

 

 

Now as i'm making up the math and methods to deal with these programming problems for recognizing chess openings; i like to know if the 3th sample is above according to official chess opening 'rules', i couldnt find some reading materials on rules for this*

  • i mean some backgrounds of how opening classification works. And yes i can find classifications like in Wikipedia, or other online chess opening classifications but i couldn't find the thought  behind it in relation to this problem situation

If the 3th sample is of the main line; then i could more easily code this statistic program; if however the 3th one is officially still called the same main line; then well i have to rewrite a lot as basically then i need to rewrite different logic for bord representation and maybe switch it all to an alternate chess board notation not like PGN but something completely new; Like FEN notations maybe.
I know this is a coding problem, i know i can solve it given enough time.

But if it is off the main line, then well its a lot less work to code my prog.

Personally i think its off the mainline because its just 'bad' play (loosing momentum)  but i'm not entirely sure on this.

Well maybe someone can enlighten me here on this subject.
I'd like to know the "official" rules on this.

Note  "I would like it to be or prefer it to work as" is not what i ask here.