FIDE & Google Efficient Chess AI Challenge

Discussion of chess software programming and technical issues.

Moderators: hgm, chrisw, Rebel

User avatar
mclane
Posts: 18826
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: FIDE & Google Efficient Chess AI Challenge

Post by mclane »

What a pity then.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
User avatar
towforce
Posts: 12027
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK
Full name: Graham Laight

Re: FIDE & Google Efficient Chess AI Challenge

Post by towforce »

To achieve the stated aims of the competition, how about...

1. Relax the source code size restriction (obviously there has to be an upper limit - so maybe 10 Mb)

2. Specify the source code language to be one that most languages can be transpiled to (I have JavaScript in mind because it is a universal scripting language)

3. Time limit will be 0.1 seconds per move (plus lag time)

4. The following model type disallowed: neural networks

5. The following programming techniques disallowed: recursion and looping

6. Given that the restrictions in (5) make legal move generation difficult, the API will have a singe parameter, which will be a position. The return value will be an evaluation of that position. The calling program will request an evaluation for each position that can be reached in one move from the current position. If more than one move-position has the same top evaluation, random selection will be used by the calling program to choose the move from the ones which have the top evaluation.
Want to attract exceptional people? Be exceptional.
JohnWoe
Posts: 518
Joined: Sat Mar 02, 2013 11:31 pm

Re: FIDE & Google Efficient Chess AI Challenge

Post by JohnWoe »

Seems like a really boring task. 65000 characters.
You don't even have to program own move generator.
But use some boring python library.
Maybe I will submit some ChatGPT engine monstrosity.
Or can you submit a 64KiB C++ exe?
Uri Blass
Posts: 10610
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: FIDE & Google Efficient Chess AI Challenge

Post by Uri Blass »

hgm wrote: Sat Nov 23, 2024 10:51 am
mclane wrote: Sat Nov 23, 2024 9:31 am Looks very interesting.
In 64 kb you can do a lot.
At least kittinger, spracklens, schroeder, rathsmann, kaplan and martin bryant , frans morsch and others COULD do.
Well, as said above, it seems the limits are so generous that even Stockfish HCE could enter, after feeding the source to an uglifyer and compressing it. So it is really no contest.
I wonder how much memory does Stockfish HCE use for the data structure.

If I understand correctly no more than 5Mbytes can be used including hash tables so the question is what is the size of hash tables that stockfish HCE can use.
Uri Blass
Posts: 10610
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: FIDE & Google Efficient Chess AI Challenge

Post by Uri Blass »

JohnWoe wrote: Sat Nov 23, 2024 12:19 pm Seems like a really boring task. 65000 characters.
You don't even have to program own move generator.
But use some boring python library.
Maybe I will submit some ChatGPT engine monstrosity.
Or can you submit a 64KiB C++ exe?
The question is if there is no advantage to have own move generator because it may be faster than the python library.
Uri Blass
Posts: 10610
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: FIDE & Google Efficient Chess AI Challenge

Post by Uri Blass »

abulmo2 wrote: Sat Nov 23, 2024 1:38 am
towforce wrote: Thu Nov 21, 2024 5:25 pm
abulmo2 wrote: Thu Nov 21, 2024 2:59 pmI just gave a quick look. As I understand, the chess "agent" should be written in python. Efficient and python sounds like an oxymoron to me.
Are you sure about this? I cannot find any rules that say the agent must be written in Python. All I have seen is the the standard Kaggle Docker container includes some Python libraries: these would not actually be usable: if you attempted to import them, you'd break the 5 Mb memory limit - link.
For what I understand other languages are allowed but they need to be interfaced with a python file to communicate with the "kaggle environment". Many things are unclear to me. They use lawyers jargon everywhere and just give some (poorly written) code examples on how to proceed. I guess the usual UCI or xboard protocols are useless here.
As I understand the 64kb limit is the size of the compressed source code (with the docker configuration files), not the executable. You have to use Docker to compile your code & execute it. Of course limiting the size of source code is an invitation to write obfuscated code without comments, without indentation, and with unreadable short names every where. That way I guess stokfish with hand crafted evaluation can easily fit the limitation.
The 5Mb limits does not count python size & "the kaggle environment". They are above them...
The rules are not very smart either. For example using a 10s + 0.1s simple delay per move is something unseen on computer chess.
Terrible !
I see no problem with the time control.
people use 10+0.1 time control to test engines.
Uri Blass
Posts: 10610
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: FIDE & Google Efficient Chess AI Challenge

Post by Uri Blass »

towforce wrote: Sat Nov 23, 2024 12:02 pm To achieve the stated aims of the competition, how about...

1. Relax the source code size restriction (obviously there has to be an upper limit - so maybe 10 Mb)

2. Specify the source code language to be one that most languages can be transpiled to (I have JavaScript in mind because it is a universal scripting language)

3. Time limit will be 0.1 seconds per move (plus lag time)

4. The following model type disallowed: neural networks

5. The following programming techniques disallowed: recursion and looping

6. Given that the restrictions in (5) make legal move generation difficult, the API will have a singe parameter, which will be a position. The return value will be an evaluation of that position. The calling program will request an evaluation for each position that can be reached in one move from the current position. If more than one move-position has the same top evaluation, random selection will be used by the calling program to choose the move from the ones which have the top evaluation.
I do not think that it is interesting to disallow recursion and looping.
I believe that even engines from 1980 used recursion and looping.

It may be interesting to have a competition of what you can achieve with very old hardware but for this you do not need to disallow recursion and looping.
JohnWoe
Posts: 518
Joined: Sat Mar 02, 2013 11:31 pm

Re: FIDE & Google Efficient Chess AI Challenge

Post by JohnWoe »

Uri Blass wrote: Sat Nov 23, 2024 12:42 pm
abulmo2 wrote: Sat Nov 23, 2024 1:38 am
towforce wrote: Thu Nov 21, 2024 5:25 pm
abulmo2 wrote: Thu Nov 21, 2024 2:59 pmI just gave a quick look. As I understand, the chess "agent" should be written in python. Efficient and python sounds like an oxymoron to me.
Are you sure about this? I cannot find any rules that say the agent must be written in Python. All I have seen is the the standard Kaggle Docker container includes some Python libraries: these would not actually be usable: if you attempted to import them, you'd break the 5 Mb memory limit - link.
For what I understand other languages are allowed but they need to be interfaced with a python file to communicate with the "kaggle environment". Many things are unclear to me. They use lawyers jargon everywhere and just give some (poorly written) code examples on how to proceed. I guess the usual UCI or xboard protocols are useless here.
As I understand the 64kb limit is the size of the compressed source code (with the docker configuration files), not the executable. You have to use Docker to compile your code & execute it. Of course limiting the size of source code is an invitation to write obfuscated code without comments, without indentation, and with unreadable short names every where. That way I guess stokfish with hand crafted evaluation can easily fit the limitation.
The 5Mb limits does not count python size & "the kaggle environment". They are above them...
The rules are not very smart either. For example using a 10s + 0.1s simple delay per move is something unseen on computer chess.
Terrible !
I see no problem with the time control.
people use 10+0.1 time control to test engines.
There's no python Stockfish. AFAIK. So it's a daunting task to rewrite.

I always use increment whether I play myself or engine testing. Cyclical time controls are pita to implement. Let's say you have 50 minutes for the first 30 moves. Then 25 minutes for the next 20 moves. Then 30s increment starting from move 60. And 1 hour for the remainder of the game...

My engines play 1minute + 1 second increment per move. That's super simple.
User avatar
hgm
Posts: 28216
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FIDE & Google Efficient Chess AI Challenge

Post by hgm »

towforce wrote: Sat Nov 23, 2024 12:02 pm 5. The following programming techniques disallowed: recursion and looping
That is completely non-sensical. Without recursion or looping a 64KB program would finish in a few micro-seconds, as every instruction could be excecuted at most once.
User avatar
hgm
Posts: 28216
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FIDE & Google Efficient Chess AI Challenge

Post by hgm »

Uri Blass wrote: Sat Nov 23, 2024 12:36 pm If I understand correctly no more than 5Mbytes can be used including hash tables so the question is what is the size of hash tables that stockfish HCE can use.
5MB should be large enough for a hash table. Standard Stockfish might not function optimally when hash size becomes tight, but it should be easy enough to change its replacement algorithm by a decent one.