- Winning rate prediction of the chess game result with GNN
Predicting the outcome of a chess game has a significant impact on research area of prediction. Statistical analysis still plays a prominent role and achieves a reasonable level of accuracy. However, one notable drawback is that ELO cannot capture the characteristics of an individual chess player due to its inability to represent the "non-transitive" relationship. For instance, if player A holds significant superiority over specific opponenets B while has lower ELO rate, ELO simply predict B is likely to win over A. This often becomes a major flaw when when predicting the game result between players.
Therefore, we propose a GATv2-based GNN model to utilize the structural information present in the dataset, such as the superiority between players, types of openings, and imbalances in win rates between black and white, in order to enhance the predictive capabilities.
Our brief solution is as below
- Construct the graph, players as nodes, game results as edges
- Node features denote the multi-dimensional representation of a user's ability
- Predict unseen game results with trained node features
# Download the dataset
./setup.sh
# Download the dependencies
pip install -r requirements.txt
python main.py --method gnn
python main.py --method gnn -t
python main.py --method elo
Model | Evaluation Result |
---|---|
GATv2 (node feature dim: 10, heads: 3, layers: 2) | 0.1624 |
GATv2 (node feature dim: 32, heads: 4, layers: 2) | 0.1625 |
GATv2 (node feature dim: 32, heads: 3, layers: 3) | 0.1616 |
GATv2 (node feature dim: 32, heads: 3, layers: 2, softmax) | 0.1612 |
GATv2 (node feature dim: 32, heads: 2, layers: 4) | 0.1595 |
ELO (Baseline) | 0.1461 |
- For now, node features are initialized randomly
- ELO value itself captures individual chess player's skill, which might be good initial point
- For now, we collapse every matches between players into 2 edge features (W-B, B-W)
- In Elo, however, it calculates the stat with respect to the order of the matches
- Introducing, the information about match order might help our model generalized better
- Our model converges on high training error
- Generalization error is relatively smaller than training erroor
- Boosting capacity of the model will work well for both encoder and decoder