---
# System prepended metadata

title: Move Pool

---

# Move Pool
Once the picking prediction and moving prediction were collected, a pool for every possible moves can be formed as shown below. The main task is about how to fetch out the correct answer in a smart way now.


![](https://i.imgur.com/C49AdAT.png)
## Classical Trim
Before the pooling starts, the very fisrt step is to trim the illegal moves inside the pool. This step can highly reduce the noise thus enhance the  prediction performance.

## Pooling method
There are various way to perform a pooling task, but we can divide them into two main categories : Classical and Non-Classical. The Classical pooling only focus on how to process pick and move prediction to find out the correct answer, however non-classical method seek a method that will involve training and model architecture.

Before the section start, the performance of pick and move prediction model are shown below. The dataset for experiment is  a chess player of RIO 2300 with 291 game data.
```
Pick Prediction : 
        Top 1 Accuracy : 54%
        Top 3 Accuracy : 80%
        Top 5 Accuracy : 91%
Move Prediction : 
        Top 1 Accuracy : 43%
        Top 3 Accuracy : 58%
        Top 5 Accuracy : 67%
```
### Rank :　Pick->Move
The very first method came into mind is a straightforward classical method that rank the moves in the pool by their pick prediction value. The prior scoring factor is the picking prediction value then the moving.


![](https://i.imgur.com/Qo4i3Z3.png)


* **performance**
Combined accuracy : 
```
Top 1 Accuracy : 37%
Top 3 Accuracy : 52%
Top 5 Accuracy : 58%
Unfound rate   : 39%
```
Although the performance isn't as well as we expected, we found that the top1 accuracy is upper bounded by move accuracy, and top 5 accuracy is upper bounded by pick accuarcy. There exist a fatal problem that the wrong combined result will generate a stupid move, which limit the application on real game. 
### Classical Approach
To fix the stupid-choice problem, a additional classical chess engine is applied on the candidate sequence. Taking advantage of the ability to evaluate the board, we resort the candidate sequence by evaluation score. Since we don't want the choice be too classical, the size of candidate sequence is fix at length 5.

In the experiment, I choose the famous chess engine stockfish. Stockfish is a chess engine that use a alpha beta search to evaluate and move. One can set the skill level of the engine by resetting the search depth.    
* **performance**
```
Top 1 Accuracy : 39%
Top 3 Accuracy : 54%
Top 5 Accuracy : 56%

shift rate     : 47%

Conditional probability under shifted case :
positive shift : 23%
negative shift : 19%
```
From value of the positive shift and negative shift, we can tell that the method only works on a specific condition which cause the performance only sligthy better than the first method.

Although this method might enhance the performance in game and avoid the stupid moves, it still can't enhance the imitation task performance.
### Non-Classical approach
The non-classical method focus on how to find out the feature of answer. For example, the relationship of pick prediction value and move prediction value. There are few method comes into mind and yet being implemented.
* Using another model to form the answer
* Assigning a feature of two value during training process (designing a new loss )