Discussion of anything and everything relating to chess playing software and machines.
Moderators: hgm, Dann Corbit, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
-
Uri Blass
- Posts: 8950
- Joined: Wed Mar 08, 2006 11:37 pm
- Location: Tel-Aviv Israel
Post
by Uri Blass » Sat Jan 31, 2015 5:10 am
Dann Corbit wrote:
Truly astounding.
Your description of your program raises the question,
"How small can a chess engine be made which can correctly process every fide rule, including draw detection, underpromotion, e.p. capture, etc.?"
I guess that it cannot be done in under 1024 bytes.
I doubt there is a chess engine that includes draw detection for every chess position based on rule 5.2b(you can ask for draw detection for all the cases that are not covered by 5.2b)
For example it needs to detect a draw in the following position
[D]4kb2/8/8/p1p1p1p1/PpP1P1P1/1P6/2B5/1K6 w - - 1 1
relevant rule
The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7.
-
mar
- Posts: 2326
- Joined: Fri Nov 26, 2010 1:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Post
by mar » Sat Jan 31, 2015 8:05 am
nanochess wrote:And here it is Toledo Atomchess

Fantastic!! And without clever tricks

Congratulations

It has indeed search I also like the randomization so it never plays the same game twice...
Now this is truly incredible and so much better than BootChess, don't you feel pity now for the guys who wrote it?
-
mar
- Posts: 2326
- Joined: Fri Nov 26, 2010 1:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Post
by mar » Sat Jan 31, 2015 8:16 am
I also found your 3d tanks entry for IOCCC

I've never seen anything better in 3.5k chars of C code.
-
hgm
- Posts: 25952
- Joined: Fri Mar 10, 2006 9:06 am
- Location: Amsterdam
- Full name: H G Muller
-
Contact:
Post
by hgm » Sat Jan 31, 2015 8:26 am
bob wrote:Here is the smallest program that plays legal chess according to FIDE rules:
int main() {
printf("I offer a draw, accept? ");
scanf("%s", answer);
if (!strcmp(answer, "yes"))
exit 0;
printf("I resign\n");
}

This has been discussed before, but resigning is not 'playing chess'. It is actually exactly the opposite, namely the way to express that you are not prepared to play chess (anymore).
So the program you give here can only be said to "not play chess, in a FIDE-compliant way". Complying with FIDE rules does not automatically imply you are 'playing chess'. The FIDE rules for example also require you to shake hands before a game. That doesn't mean that shaking hands is playing chess...
-
nanochess
- Posts: 64
- Joined: Thu Feb 19, 2009 4:34 pm
- Location: Mexico, Mexico
-
Contact:
Post
by nanochess » Sat Jan 31, 2015 3:29 pm
mar wrote:nanochess wrote:And here it is Toledo Atomchess

Fantastic!! And without clever tricks

Congratulations

It has indeed search I also like the randomization so it never plays the same game twice...
Now this is truly incredible and so much better than BootChess, don't you feel pity now for the guys who wrote it?
Thanks! and errr, no, they didn't made enough effort. I would never put out a program with a bug so clear as putting its own king in check.
-
nanochess
- Posts: 64
- Joined: Thu Feb 19, 2009 4:34 pm
- Location: Mexico, Mexico
-
Contact:
Post
by nanochess » Sat Jan 31, 2015 3:31 pm
mar wrote:I also found your 3d tanks entry for IOCCC

I've never seen anything better in 3.5k chars of C code.
I'm glad you liked it

Thanks!
The good old times

-
Jesse Gersenson
- Posts: 584
- Joined: Sat Aug 20, 2011 7:43 am
-
Contact:
Post
by Jesse Gersenson » Sun Feb 01, 2015 8:43 am
bob wrote:
Here is the smallest program that plays legal chess according to FIDE rules:
int main() {
printf("I offer a draw, accept? ");
scanf("%s", answer);
if (!strcmp(answer, "yes"))
exit 0;
printf("I resign\n");
}

That's funny Bob. But it's not legal to offer a draw before you've moved. So, you'd need to do something like, play 1.e4, then offer the draw.
Has anyone gotten BootChess to run in Linux? I installed DosBox and entering "dosbox" from ~/bootchess gives me a window showing the board but I can't enter moves.
-
Robert Pope
- Posts: 523
- Joined: Sat Mar 25, 2006 7:27 pm
Post
by Robert Pope » Tue Feb 03, 2015 5:59 pm
Then how about
FIDE rules don't actually require you to make any moves before your flag falls, do they?

-
hgm
- Posts: 25952
- Joined: Fri Mar 10, 2006 9:06 am
- Location: Amsterdam
- Full name: H G Muller
-
Contact:
Post
by hgm » Tue Feb 03, 2015 6:30 pm
Well, as mentioned before, watching a clock tick, resigning, not showing up at your game... None of that is playing Chess.
The empty program (zero characters) also complies with FIDE rules. Because FIDE rules do not compel anyone to play Chess. You can happily stay away from any Chess event, and FIDE will be perfectly happy.