I had an idea for a possible future PicoChess feature that I think could be quite fun: AI-generated chess commentary.
The idea would not be to let an LLM analyse the chess position by itself. That would probably not be very useful anyway. Instead, PicoChess could provide the AI with reliable chess information that we already have calculated by our Tutor, for example:
the moves played so far
the current position
Stockfish evaluation before and after a move
the principal variation
perhaps information about blunders, missed opportunities, tactical shots or unusually strong moves
The AI would then mainly have one job: turn this information into a natural-language commentary.
For example:
“Ouch. That last move suddenly changed the evaluation from roughly equal to clearly better for Black. White seems to have overlooked the tactical idea on the kingside.”
Or, with a different commentary style:
“And there it is! White has just opened the door, rolled out the red carpet and politely invited the black rook in.” :-)
It could perhaps offer different personalities or styles, such as:
Coach – helpful and instructional
Commentator – like a live chess broadcast
Friendly opponent – relaxed and conversational
Humorous – slightly cheeky comments when something goes badly wrong
What makes this especially interesting now is that PicoChess can run not only on Raspberry Pi, but also on Windows, macOS and Linux.
That opens several possibilities (Ollama!?):
completely local LLMs for people who want to stay offline
small local models even on a Raspberry Pi 5 (eg. gemma3:4b)
larger and faster local models on modern PCs and Macs
free online AI services
optional paid services such as OpenAI or others, if a user enters their own API/account details in the settings
On a Raspberry Pi, real-time commentary after every move might still be too slow depending on the model. In that case, generating a nice post-game summary and analysis would already be very interesting.
On faster machines, however, I could imagine the AI commenting on important moments during the game and perhaps even complementing PicoTutor.
I think the nice thing about this approach is that the LLM would not need to be a chess expert. Stockfish would still provide the chess knowledge. The language model would simply act as the “voice” that explains what happened in an entertaining or educational way.
No idea how difficult this would be to integrate, and certainly not something that needs to happen tomorrow. :-) But with the recent PicoChess developments and the availability of increasingly capable local models, I thought it might be a fun idea to throw into the PicoChess family discussion.D
Dirk
--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/f1343e07-059e-4ddb-8843-a5d12374c722n%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
You’re holding your own nicely. After 12 moves the position is roughly equal, with PicoTutor’s evaluation at +0.11 in your favour (depth 20), so about a tenth of a pawn better for White. That’s a solid result against Lc0 at 2400+.
The game so far: You’re White in a Closed Spanish, the Anti-Marshall line with 8.a4 b4. The moves were 1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 O-O 8.a4 b4 9.d4 d6 10.h3 exd4 11.Nxd4 Nxd4 12.Qxd4 c5. The Watcher hasn’t flagged any of your moves as inaccuracies, so your play has been clean so far.
Where things stand: It’s your move. The engine’s last move, 12...c5, attacks your queen on d4, so you’ll need to decide where to put her. Your bishop on b3 is aiming nicely at f7. Black’s b4 pawn is a bit advanced, and with your pawn on a4 it could become a target later.
Would you like a hint for the queen move, or would you rather work it out yourself?
To view this discussion visit https://groups.google.com/d/msgid/picochess/b2f2c8d9-3004-4135-9259-70aa6b58fc70n%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/c5d4ac1f-a808-4646-8c45-7f962a7df423n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/c5d4ac1f-a808-4646-8c45-7f962a7df423n%40googlegroups.com.
uci, isready, setoption, ucinewgame, position, go, stop, quit, uciok, readyok, id, option, info, bestmove