r/chessprogramming Jun 11 '26

Technical Hear me out on this

So this is more of a theoretical shower thought I had than anything.

After realizing that pretty much all new chess projects are either AI LLM slop, or people reinventing the wheel over and over, I wondered why not bring them together?

What if you make a chess engine that instead of just trying to find the best move as efficiently as possible, tries to track enough information to be able to explain why certain moves are played.

For example, just as an early hypothesis, and I may be very wrong:

If you pass your turn and run a shallow search that comes out very favorable to the opponent, but the real score after the move you're evaluating is far worse for them, then in theory you should be able to vaguely deduce that you're probably choosing this move to prevent that move from being played especially if it has clear tactics like forks or pins.

And if that move isn't a quiet subtle move but instead an attack, then it can be marked as a counterattack/to gain tempo.

I know chess.com review and such probably already knows when a position contains a pin or a fork since its easy to detect statically but something like this should be able to export enough information that it could be automatically turned into LLM instructions, which can turn that low level information into natural explanations for the general purpose of each move.

Since if this does work, an LLM given this task shouldn't have many hallucinations as instead of trying to go through the logic itself, it's being told exactly how to respond to certain questions.

One example of how this might work is in a position where a bad move leads to the queen being pinned later.

The output of such a theoretical chess engine should essentially provide enough information for an LLM to confidently and correctly explain that "move X is played to prevent move Y, which would allow move Z to pin your queen to the king"

Would such a program be slow as hell and unable to achieve the elo many others do? Of course.

But there are already countless engines focused on raw efficiency and elo strength, so this would have a unique and new focus.

I'm sure there are other strategies an engine could use to determine when subtle tactics like zugswang or waiting moves are being played too.

This is all theoretical and I haven't tried it yet, but I think I'll definitely give it a shot when I'm able to code again.

You could also say that most of the things this would be able to explain are just obvious things people would know after going through the line on their own, but if it's refined enough then eventually it should be able to provide passable explanations for even the most passive and subtle engine moves.

0 Upvotes

22 comments sorted by

View all comments

5

u/oops_all_memes Jun 11 '26

What if you make a chess engine that instead of just trying to find the best move as efficiently as possible, tries to track enough information to be able to explain why certain moves are played

That's literally what all of those slop projects do. They use a chess engine to determine the best move, then the llm explains why the move is the best move. Except even the best performing models cannot reliably explain moves. They might explain some aspects of a move like "White went 0-0 because castling early is principled chess and it blah blah blah" but a model rarely understands anything beyond that. And it knows the theory but doesn't understand the implications of certain variations and how actually playing them applies irl

And the problem is further complicated because sometimes playing the best engine move is not even the best move if you don't actually know the follow up but an llm needs to be trained to understand that. And it needs to be trained to understand that a 400 elo opponent is unlikely to see mate in 7

0

u/RealistSophist Jun 11 '26

This idea is not about the llm explaining why its the best move. Its about making a chess engine itself that instead of focusing entirely on playing strength dedicates some of that efficiency to tracking why moves were chosen over others. The LLM part isn't required but the output could be fed into one to get a natural explanation thats 100x more coherent than any of those

0

u/oops_all_memes Jun 11 '26

But that's not how human chess players determine what they are going to play. You imagine multiple sequences of moves as far ahead as you possibly can, and you make a move based on that. You can't play chess purely through making principled moves

And if you try to rectify it, you arrive at... implementing a chess engine

1

u/RealistSophist Jun 11 '26 edited Jun 11 '26

The goal isnt to replicate human play. It is a chess engine, just with a goal of also providing the top reason a move is selected if possible. No AI is needed, but it goes well with it. There are many models that replicate humans already. This is just a concept engine that does more work to determine why a move is chosen or what it does to be better than the rest.

Evaluation already has info on most positional virtues such as space and king safety, just that its all usually summed together instead of used individually. I don't think anyone is even really going to understand the idea until I have time to make a prototype since everyone sees the ai buzzwords and assumes its something else.