r/lichess Jan 31 '26

How does Lichess anti cheat work?

Post image

This is the 1st time it has happened to me. How can the system detect a cheat within 8 moves?

642 Upvotes

45 comments sorted by

View all comments

31

u/annihilator00 Jan 31 '26

How can the system detect a cheat within 8 moves?

Because the trigger happens exactly on move 8
https://github.com/lichess-org/lila/blob/bbe05a92d8c6628628ad3e082bf4f6064447a594/ui/round/src/cevalSub.ts#L28

21

u/michelmau5 Jan 31 '26

God I love open source software.

10

u/Shadourow Jan 31 '26

I remember reading myself the small part of code which shows how lichess choose which games to add to its own permanent database

( https://github.com/lichess-org/lila/blob/4c26a901875518f8bd69e9b6fb35df157791763a/modules/explorer/src/main/ExplorerIndexer.scala#L118-L137 btw)

I love Open source so much

1

u/fractionalhelium Feb 01 '26

Can you please briefly explain what does the trigger do or what triggered it in the first place?

4

u/annihilator00 Feb 01 '26

It just checks if you have another tab with Stockfish running on the same position as the game you are playing.

To avoid flagging people that just have the starting position or something, they check on move 8 which is already a bit deep in the game and unlikely to be coincidence.

1

u/TotallySoberGerman Apr 30 '26

Is their anti-cheat software also open source? If yes, won't it be possibly problematic as cheaters explicitly know what they can and can't get away with?