CSSLab / maia-chess

Maia is a human-like neural network chess engine trained on millions of human games.
https://maiachess.com
GNU General Public License v3.0
958 stars 122 forks source link

Could this be used for cheat detection? #43

Closed asdfjkl closed 1 year ago

asdfjkl commented 2 years ago

With all that cheating debate going on....

I am wondering if Maia or a Maia-like approach could be used to provide additional input to a cheat detection system?

After all, you reported in your papers that with Maia you get much higher human move predictions (depending on rating class) than with say stockfish.

Suppose we take not only the position & rating, but also extra-information such the remaining time of the player into account. Could a network be trained in such a way that the, say top3 move predictions amount to an (80%/90%/almost 100%) move prediction for a given position?

Given a game, this would then provide at least guidance to those positions where a human player (a potential cheater) played moves that the network classifies as "non-human".

Instead of a predictor one could of course also try to create a distiguisher network that given a position and a move tries to predict with a certain amount of probability if that was an engine or computer move...

There might be other creative ways... This might be complete nonsense and not work in practice, but given that you trained Maia and have a much better intuition on what a trained network is capable of, I would like to hear your opinion...

reidmcy commented 2 years ago

Something like this is something we've internally talked about a lot, building cheat detection systems for chess, but we don't have any datasets to use for training so publishing a paper would be tricky. If you know of any datasets for chess cheating I'm all ears.

When I have tried adding extra information to the models the improvements in prediction accuracy have been minimal, but there are some newer model architectures that might do better than the Leela style ResNet I tested with.

There are two other papers by me that would be even better for detecting cheating: Individualized Maias and the Chess Behavioral Stylometry papers. These have been focused on medium skill players, not high level play but the methods should generalize. You can take a sample (larger or small respectively) of games and compare it to a set of other games to see if the player is making playing with unusual moves/style.

P.S. @asdfjkl I enjoyed your book

asdfjkl commented 2 years ago

thanks, I'll have a look into the papers you linked!

P.S. @asdfjkl I enjoyed your book

thx, that means a lot! I might quote you on that :-)

codeisnotfunjk commented 1 year ago

Something like this is something we've internally talked about a lot, building cheat detection systems for chess, but we don't have any datasets to use for training so publishing a paper would be tricky. If you know of any datasets for chess cheating I'm all ears.

I have identified a few databases that may be of use to you if you are looking for PGN/moves of Chess matches played between players with ELO ratings of 2000+.

  1. FICS Games: a free resource that offers a large selection of matches and allows you to sort by 2000-2199 ELO, 2200-2399 ELO, etc.- https://www.ficsgames.org/

  2. Chessbase: a paid service that provides access to millions of matches played by higher ELO players- https://database.chessbase.com/

  3. Lichess: another free option with over 8 million matches, including higher-elo games, sorted by month- https://database.lichess.org/

  4. Chesstempo: offers over 2 million searchable games and allows you to sort by min and max ELO in advanced settings- https://old.chesstempo.com/game-database.html

EDIT: Some other resources I discovered-

https://www.kaggle.com/datasets/datasnaek/chess https://www.kaggle.com/datasets/zq1200/world-chess-championships-1866-to-2021 https://www.kaggle.com/datasets/ronakbadhe/chess-evaluations https://www.chess.com/games https://www.chessabc.com/en/chessgames https://gameknot.com/chess-games-database.pl https://sourceforge.net/projects/codekiddy-chess/ http://www.chessgameslinks.lars-balzer.info/ https://www.openingmaster.com/chess-databases https://www.365chess.com/chess-games.php

EDIT 2: Someone actually already made a higher ELO version of maia. It's rating is around 2200.

https://lichess.org/@/humanian

reidmcy commented 1 year ago

I am familiar with most of those datasets, I don't think any of them contain information about cheat detection. We also can't easily combine games from different datasets since Elo is not consistent between communities.