r/ComputerChess • • Sep 25 '25

Move classifications algorithm

Hi, I'm a programmer and wanted to create my own chess game for practice. I'm currently working on the analysis part and I'm a bit stuck with the move rankings. I wanted to create something similar to chess.com (good move, best move, mistake, etc.), and most of them are based on Stockfish's evaluation. But a brilliant move is quite complicated for me. I did some research and discovered that it's usually about sacrifice, but this example from my own game contradicts that. I have no idea why this move is brilliant, even if a better move exists (Ne5). The Cp value after Bb4 drops from -0.82 to -0.35, and after Ne5 it only drops to -0.64. I don't see a better move, but Bb4 is certainly not the best. I also tried evaluating this position myself with Stockfish and it also indicates it's not the best move, but I see Bb4 with MultiPV set to 3. So why is this move brilliant at all? I think it might just be because I'm below 1000 ELO. I'm not the best chess player, so this only complicates things, but most of the time I can tell if a move is brilliant. But it's easier for a human to tell if a move is brilliant than for a computer, so what would be the best algorithm? Is there any way to base on the Stockfish engine? How can you guys determine, "yes, this move is very good," is there a pattern or something? Or does anyone know an open-source algorithm that allows for something like this? Could I also ask you to share the PGN files of the games you got brilliant to test my code? Thanks for all the replies.

1 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/AdditionalHealth1927 Sep 26 '25

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!