Black and white chess open library research

xiaoxiao2021-03-06  38

As we all know, it is very important in black and white chess. The following is the open library data structure I envision. For the sake of simplicity, it is designed as a linked list without using a tree structure. Align is added to the byte alignment, there is no practical meaning.

TYPEDEF STRUCT BOOK_MOVE_TAG {char x; // walk method char y; char _align0; char _align1; long score; // score, according to database data generation (directly accumulating the result score caused by this way), if a way is in the database No, the value is negative (-Inf) long count; // This time the time will appear in the database} BOOK_MOVE;

Typedef struct booudx_tag {unsigned char Board [// current situation, each point is expressed in 2BITS, 00-White, 01-Black, 10-Blank, 11-Na CHAR SIDE; // Current Situation Who will play char _align0; char _align1; char _ALIGN2; long move_count; // The feasible walking method of the Side side under the current situation BOOK_MOVE * ml; // walk method, dynamically allocate memory. Struct Bookex_tag * next;} boxX;

After these two basic structures, you can analyze a large number of chess games to generate an open library. The analysis method is roughly like this. The game format I got is a series of ways. First of all, I have to get every situation in this competition according to these ways (usually 60 sites, there are less than 60, and actually open the library, there is no need to record 60 sites, as long as the top 40 is enough, There is also a lot of significance, and it is actually hardly used) and the final score. Then add these sites to the open library. For the situation where there is nothing in the library, fill in the value of all fields, pay attention to the field of ML is another array, how many of the ways are there, and then this time (score is The final score, the number of times is equal to 1) Write the first item, the remaining items are set to invalid (step (-1, -1), and the negative endless, the number of times 0). For the situation already in the library, first position the node of the library, then find the same effective way to walk in ml, if you find, the score of the corresponding walking in the library and the score of this Plus, and add count, if not found, will take the first invalid walking method to this step. So repeated until all chess games are analyzed.

Then traverse the entire linked list, sorted in the ML array, the highest ranks in the first bit, and the more score / count should be used. This is very simple when used, as long as the corresponding situation is taken, the ML [0] is taken.

Analysis of the chess game is a very time-time, I analyzed 3,590 chess games for about 30 minutes, and the finally generated open library file is 14m, including about 100,000 sites. But I still don't know if this method is feasible and valid.

This open library has a very useful feature, which is to analyze the game that has just ended, there is a purpose of self-study. Of course, this is also an idea, I have not tried the effect. But I want to open the premise of learning from learning is that the valuation functions are very strong, otherwise the knowledge they have learned will not go. This article is only some of my ideas, how the effect is still not known. Please also give your guidance.

转载请注明原文地址:https://www.9cbs.com/read-78209.html

New Post(0)