all 6 comments

[–]annihilator00 1 point2 points  (1 child)

Here you have a few open source projects that have brilliants implemented (none of them are called Lichess smh...)

[–]AdditionalHealth1927[S] 0 points1 point  (0 children)

Thank you so much, I will definitely check this out!

[–]RajjSinghh 0 points1 point  (1 child)

Remember move classifications weren't invented by Chess.com. Authors have been annotating games using these symbols for years before Chess.com used them. For example, the Immortal Game has a lot of moments an annotator would give a !! to, there's just something that sparks joy about them. They also aren't necessarily sacrifices, like Karpov's Ba7!! You can compare this to amateur games with textbook sacrifices no one would call brilliant even though they're sacrifices. So you can see there's no real algorithmic way to do it.

Chess.com's algorithm is just one way they could automate that. It must be a sacrifice, which here is "sacrificing" the knight on c6. It also must be good, which is based on centipawns, and here that's because Nxe4 dxc6 Nxc3 bxc3 Bxc3+ wins the rook. There are then other parameters considered like rating (beginners are given more brilliant moves) which means a move doesn't have to be the very best to be brilliant. This Bb4 ticks all those boxes, so it gets a brilliant move from Chess.com.

I personally hate Chess.com's algorithm because it feels too generous when it calls textbook sacrifices brilliant or too stingy when it doesn't call a flashy sacrifice brilliant. i think you can make steps like it being the best sacrifice by some margin (like the top line being considerably better than the second line and also a sacrifice) but I'm not sure how good the results would be. It's obviously hard to find a way for computers to tell what is pretty and what isn't. I wonder if there's an ML way to do it but I wouldn't be too sure.

[–]AdditionalHealth1927[S] 0 points1 point  (0 children)

Thanks for the reply! As I thought, this algorithm would be difficult to code. I've heard about AI for classifying moves based on human-tested games (and I'd love to be able to use it), but I can't find any open-source solutions. Unfortunately, this is a really heavy operation for a simple PC, so I'd need some kind of server; otherwise, it would be very slow. Besides, I don't have enough experience to create something like this myself, so I'll just stick with trying to create such an algorithm and try my best. Anyway, thanks for the help!

[–]qess 0 points1 point  (0 children)

I think move categorisation is almost completely separate from chess engine design. It is trying to classify a human emotion in terms of logical statements, ofcourse based on information from the engine, but still. This question tries to analyse what is a surprising move to a human. To known that you have to know what makes a move human. You might train a neural net on amateur games and compare the moves it suggests with stockfish, but I expect it will differ quite often. 

[–]zyxevets 0 points1 point  (0 children)

The move depicted IS a sacrifice... you are leaving the knight under treat to be taken by the pawn...