Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old February 19th 09, 04:30 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Nov 2006
Posts: 4
Default Current world's smallest chess program

Hi, I've recently published my personal web site
at http://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:

o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.

Enjoy it!

Regards,
Oscar Toledo G.
  #2   Report Post  
Old February 19th 09, 06:21 PM posted to rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: May 2006
Posts: 179
Default Current world's smallest chess program

On Thu, 19 Feb 2009 08:30:07 -0800 (PST), wrote:

Hi, I've recently published my personal web site
at
http://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:

o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.

Enjoy it!

Regards,
Oscar Toledo G.


Gotta love those obfuscated C programs that look more like line noise
than source code, and perform such complex feats with so little code.

I've always wondered if one of the participants in those 1K coding
contests could make a fully capable Winboard engine with a 1 kilobyte
..com file.
  #3   Report Post  
Old February 19th 09, 07:01 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Feb 2009
Posts: 1
Default Current world's smallest chess program

wrote:
Hi, I've recently published my personal web site
at
http://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:

o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.


main(){return puts("(Resigns)"),0;}

(Assumes a pre-C99 implementation. ;-)

--

  #4   Report Post  
Old February 19th 09, 08:05 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Feb 2009
Posts: 1
Default Current world's smallest chess program

Hi, I've recently published my personal web site
at http://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:


Are these chess programs compatible with the new USCF chess rules
(look over in misc.legal for Sam Sloan's postings) where "Knight's
lawyer sues Queen" is a legal move but it may take weeks to accomplish
because of problems getting proper process service.

o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.


That you can get them that small is amazing.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.

  #5   Report Post  
Old February 19th 09, 08:44 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Nov 2006
Posts: 5
Default Current world's smallest chess program

On Feb 19, 2:01 pm, Eric Sosman wrote:
wrote:
Hi, I've recently published my personal web site
athttp://nanochess.110mb.com/


It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:


o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.


The three are the current world's smallest chess
programs, of course, until someone does it better.


I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.


main(){return puts("(Resigns)"),0;}

(Assumes a pre-C99 implementation. ;-)


This can only play white, as playing black it has
no way of knowing if white's first move was legal.
(you could add a table of the 20 legal first moves,
or something similar to allow it to play black).
Thw question of what qualifies as the "world's smallest
chess program" clearly depends on the definition
of "chess program".

- William Hughes


  #6   Report Post  
Old February 19th 09, 10:27 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Feb 2007
Posts: 10
Default Current world's smallest chess program

On Feb 19, 8:30*am, wrote:
Hi, I've recently published my personal web site
athttp://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:

* o Toledo Nanochess, a chess program in C that
* * occupies only 1274 non-blank characters, still
* * being smaller, it beats Micromax v1.6.
* o Toledo Picochess, a chess program in C that
* * fits in 1K of source, but cannot play empassant,
* * castling or promotion to minor pieces.
* o Toledo Javascript Chess, same as Toledo Nanochess
* * but in Javascript, 2258 bytes.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.


After running your program through the preprocessor, we get this:


char *l = "ustvrtsuqqqqqqqqyyyyyyyy}{|~z|{}"
" + BAW~abcddcba .pknbrq PKNBRQ\n?A6J57IKJT576,+-48HLSU";
B, i, y, u, b, I[120], G;
main(f, w, c, h, e, S, s)
{
int t,
o,
L,
E,
d,
O = f,
N = -1e9,
p,
*g,
n,
*m = I,
H,
A,
q = 100,
r,
x = 10,
z = 15,
C,
a = y ? -x : x;
if (*I) {
y ^= 8;
d = !s || 1e5 main(21, 0, 0, 0, 0, 1, 0);
H = G;
do {
;
if (o = I[p = O]) {
q
= o & z ^ y;
if (q 7) {
A = q-- & 2 ? 8 : 4;
C = o - 9 & z ? q["& .$ "] : 42;
do {
r = I[p += C[l] - 64];
if (!w | p == w && q |
A 2 | !r) {
g = q | p + a - e ? 0 : I + e;
if (!r & (q | A 3 || g) | (r + 1 & z ^
y) 9) {
m = 0;
if (!(r - 2 & 7))
return y ^= 8, G = O, 1e6 - 1e3 *
h;
n = o & z;
t = q | p 28 & p 91 ? n + 1 : (n
+= 2, 7 ^ y);
while (n - t) {
p[i] = n, E = O[i] = m ? *g = *m,
*m = 0 : g ? *g = 0 :
0;
L = (1 - q ? l[p / x + 5] - l[O /
x + 5] + l[p % x + 6] - l[O % x + 6] + o / 16 * 8 : !!m * 9) + (!q ? l
[p % x + 6] - 98 + !(I[p - 1] ^ n) + !(I[p + 1] ^ n) + l[n & 7] * 9 -
387 + !!g * 99 + (1 == A && (E = p)) : 0) + (r ? l[r & 7] * 9 - 288 -
h - q : 0)
+ !(I[p - a] & z ^ y ^ 9);
L -= s h || s == h & (L z & 1
s | !d) ? main(H, s h | !d ? 0 : p, L, h + 1, E, N, s) : 0;
if (!(
B - O | i - n | h | p - b |
S | L -1e5))
return u = E;
O[i] = o;
p[i] = r;
m ? *m = *g, *g = 0 : g ? *g = 9 ^
y : 0;
if (L N) {
N = L;
G = O;
if (!h & S && s)
i = n, B = O, b = p;
if (h && c - L S)
return y ^= 8, L;
}
q == 1 & A 6 & !m && (g = I + p,
m = p O ? g - 3 : g + 2, o - y + *m 32 & !r & !I[p += p - O] & !m
[p O ? 1 : -1] & !!s & d & L -1e5) ? 0 : n++;
}
}
}
}
while (!r & q 2 || (p = O, q | A 2 | (o & 16
&& !r) && ++C && --A));
}
}
} while (++O 98 ? O = 20 : f - O);
return y ^= 8, N + 1e9 ? N -998100 + 1e3 * h & d ? 0 : N :
0;
}
while (B++ 120)
*m++ = B % x ? B / x % x 2 | B % x 2 ? z : B / x & 4 ? 0 :
*l++ & 31 : 7;
while (p = 19) {
while (++p q)
putchar(l[p[i] | 16]);
if (x - (B = getchar() % 16)) {
i = I[B += q - getchar() % 16 * x] & z;
b = getchar() % 16;
b += q - getchar() % 16 * x;
while (x - (p = getchar() % 16))
i = p ^ 8 ^ y;
} else
p = main(21, 0, 0, 0, u, 1, 5);
main(21, 0, 0, 0, u, 0, 1);
}
}

It isn't a legal C program, despite the fact that some compilers will
compile and execute the code.
  #7   Report Post  
Old February 19th 09, 10:32 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Nov 2008
Posts: 16
Default Current world's smallest chess program

wrote:
Hi, I've recently published my personal web site
at
http://nanochess.110mb.com/

It contains my four winning entries from the IOCCC,
and three previously-unreleased chess programs:

o Toledo Nanochess, a chess program in C that
occupies only 1274 non-blank characters, still
being smaller, it beats Micromax v1.6.
o Toledo Picochess, a chess program in C that
fits in 1K of source, but cannot play empassant,
castling or promotion to minor pieces.
o Toledo Javascript Chess, same as Toledo Nanochess
but in Javascript, 2258 bytes.

The three are the current world's smallest chess
programs, of course, until someone does it better.

I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.

Enjoy it!

Regards,
Oscar Toledo G.


main() {
printf("I resign");
}
  #8   Report Post  
Old February 19th 09, 11:07 PM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Feb 2009
Posts: 1
Default Current world's smallest chess program

William Hughes wrote:
Eric Sosman wrote:
wrote:
I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.


* * * * main(){return puts("(Resigns)"),0;}

(Assumes a pre-C99 implementation. *;-)


This can only play white, as playing black it has
no way of knowing if white's first move was legal.
(you could add a table of the 20 legal first moves,
or something similar to allow it to play black).
Thw question of what qualifies as the "world's smallest
chess program" clearly depends on the definition
of "chess program".


Indeed. The judging from the code cited elsethread, the
program does not 'play' chess itself, rather it allows
two humans to play chess, restricted to legal moves.
[Although I doubt it handles draw by tripple repitition.]

By that measure, Eric's program is not a Chess program
because it assumes that a game of Chess is simply the
act of White resigning. :-)

There is also issue of 'smallest'. Whilst the OP is
using character count as the measure, I'd use the count
of non white-space tokens after translation phase 3.

--
Peter
  #10   Report Post  
Old February 20th 09, 01:08 AM posted to comp.lang.c,rec.games.chess.computer
external usenet poster
 
First recorded activity by ChessBanter: Feb 2009
Posts: 1
Default Current world's smallest chess program

Peter Nilsson wrote:
William Hughes wrote:
Eric Sosman wrote:
wrote:
I'm interested in knowing about any other small
chess programs in C or Javascript, particularly if
them are smaller than mine.
main(){return puts("(Resigns)"),0;}

(Assumes a pre-C99 implementation. ;-)

This can only play white, as playing black it has
no way of knowing if white's first move was legal.
(you could add a table of the 20 legal first moves,
or something similar to allow it to play black).
Thw question of what qualifies as the "world's smallest
chess program" clearly depends on the definition
of "chess program".


Indeed. The judging from the code cited elsethread, the
program does not 'play' chess itself,


Actually, it does.
--
"Relax, kick back, and have a nice big frosty mug full of STFU."
-Animator/NANAE/9-3-07
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rec.games.chess.misc FAQ [2/4] [email protected] rec.games.chess.misc (Chess General) 0 March 22nd 06 05:35 AM
Chess Book Artificer rec.games.chess.misc (Chess General) 6 March 13th 06 12:46 AM
rec.games.chess.misc FAQ [2/4] [email protected] rec.games.chess.misc (Chess General) 0 March 7th 06 05:30 AM
rec.games.chess.misc FAQ [2/4] [email protected] rec.games.chess.misc (Chess General) 0 February 19th 06 05:44 AM
rec.games.chess.misc FAQ [2/4] [email protected] rec.games.chess.misc (Chess General) 0 October 19th 05 05:37 AM


All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017