GeminiChess, an LLM built engine

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

smatovic
Posts: 3330
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: GeminiChess, an LLM built engine

Post by smatovic »

Out of curiosity, did you program already a chess engine by yourself? Or is chess programming a "foreign territory" to you?

--
Srdja
glav
Posts: 72
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Re: GeminiChess, an LLM built engine

Post by glav »

smatovic wrote: Thu Sep 25, 2025 11:55 am Out of curiosity, did you program already a chess engine by yourself? Or is chess programming a "foreign territory" to you?

--
Srdja
I am passionate about chess and programming, but I never programmed an engine. I have done some unrelated work in C, though. These days I am mostly using R and python, but I found out that chatgpt can often do the work for me, especially the basic stuff.
Last edited by glav on Thu Sep 25, 2025 12:23 pm, edited 1 time in total.
glav
Posts: 72
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Re: GeminiChess, an LLM built engine

Post by glav »

I forgot to add the link to the new version:

Werewolf
Posts: 2031
Joined: Thu Sep 18, 2008 10:24 pm

Re: GeminiChess, an LLM built engine

Post by Werewolf »

glav wrote: Wed Sep 24, 2025 8:03 am
Werewolf wrote: Tue Sep 23, 2025 5:11 pm I did exactly this with ChatGPT 5 Pro - also in bitboard, written in C.
Nice. Would you have an executable of your program since I was unable to compile it?
Werewolf wrote: Tue Sep 23, 2025 5:11 pm Did debugging take you ages by any chance?
Not really. Although the model submitted several wrong answers (it had allucinations, produced non-compilable code or code that crashed or didn't pass the tests, a couple of times produced even header files with the '.hh' (!) extension, etc.), the driver script was merciless in rejecting these proposals and asking for new ones. It was not too stressful: once started the run, I never had any direct interaction with the LLM, though I was closely watching.
Can you PM me with your email? I'll send you the file directly. However, it is not 100% bug free yet.
glav
Posts: 72
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Re: GeminiChess, an LLM built engine

Post by glav »

Apparently, I wasn't the first one to use Gemini for building a chess playing program. Heiko Hotz had already developed one 5 months ago and, moreover, it was also more complete than mine, because it also had a GUI. Nice also the idea to let the program to explain his reasoning. All in all, a nice read. Srdja might wish to update his list.


https://github.com/heiko-hotz/gemini-ch ... t/thoughts
smatovic
Posts: 3330
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: GeminiChess, an LLM built engine

Post by smatovic »

glav wrote: Fri Sep 26, 2025 1:53 pm Apparently, I wasn't the first one to use Gemini for building a chess playing program. Heiko Hotz had already developed one 5 months ago and, moreover, it was also more complete than mine, because it also had a GUI. Nice also the idea to let the program to explain his reasoning. All in all, a nice read. Srdja might wish to update his list.

https://medium.com/google-cloud/build-a ... fc46af7329
https://github.com/heiko-hotz/gemini-ch ... t/thoughts
Thx for posting, but I see no chess engine in the given repository. As far as I got it, you play chess against LLMs with that app.

--
Srdja
glav
Posts: 72
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Re: GeminiChess, an LLM built engine

Post by glav »

smatovic wrote: Fri Sep 26, 2025 3:15 pm
glav wrote: Fri Sep 26, 2025 1:53 pm Apparently, I wasn't the first one to use Gemini for building a chess playing program. Heiko Hotz had already developed one 5 months ago and, moreover, it was also more complete than mine, because it also had a GUI. Nice also the idea to let the program to explain his reasoning. All in all, a nice read. Srdja might wish to update his list.

https://medium.com/google-cloud/build-a ... fc46af7329
https://github.com/heiko-hotz/gemini-ch ... t/thoughts
Thx for posting, but I see no chess engine in the given repository. As far as I got it, you play chess against LLMs with that app.

--
Srdja
Oops! You are right. Too bad: I was already dreaming of a tournament among LLM-built engines. :(
jdart
Posts: 4406
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: GeminiChess, an LLM built engine

Post by jdart »

My experience so far with AIs for coding (with Claude Code and Github Copilot) is that they are pretty good at implementing things, or restructuring, but quite poor at debugging. Claude seems to be better than Copilot: the latter generated code with some pretty elementary C++ coding errors. I haven't tried generating a complete program. One of my learnings from decades in computer chess is that testing is very important. It is amazing how broken a program can be and still play legal moves. Only a good set of tests can demonstrate that everything is functioning properly. I have both unit tests for program components and also of course use game match testing.
Werewolf
Posts: 2031
Joined: Thu Sep 18, 2008 10:24 pm

Re: GeminiChess, an LLM built engine

Post by Werewolf »

jdart wrote: Fri Sep 26, 2025 6:04 pm My experience so far with AIs for coding (with Claude Code and Github Copilot) is that they are pretty good at implementing things, or restructuring, but quite poor at debugging. Claude seems to be better than Copilot: the latter generated code with some pretty elementary C++ coding errors. I haven't tried generating a complete program. One of my learnings from decades in computer chess is that testing is very important. It is amazing how broken a program can be and still play legal moves. Only a good set of tests can demonstrate that everything is functioning properly. I have both unit tests for program components and also of course use game match testing.
ChatGPT 5 Pro is the best here. One trick you can try is playing them off against each other for de-bugging since they seem blind to their own mistakes but critical of other's code.