Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Smallest Chess Program

Name: Anonymous 2018-03-19 8:30

C=799,K=8,X,Y;
char c[9],b[128]="VSUWTUSV";
D(k,x,n){
int i=0,j,t,p,u,r,y,m=-C,v;
do{;
if((u=b[i])&k){j=".H?LFICF"[p=r=u&7]-64;
while( r=p>2&r<0?-r:64-"01/@AP@ABPOQ@NR_a@"[++j]){
y=i;
do{
t=b[y+=r];
if((p==7|!x)&&j==8||!(r&7)-!t&p<3|t&k||y&136)break;
v=t&k?1:" !!#~#%)"[t&7]-32 ;
if( n&&v<64){b[i]=0,b[y]=u ;
if( p<3&&y+r+1&128)b[y]=(*c&c[4]?c[4]:55)-48|k,v+=9;v-=D(24-k,2,n-1);

if( x&1&v>-64&i==X&y==Y){;
if( j==8)b[y+(r>>2^1)]=0,b[y-r/2]=6|k;
return 0;}

b[i]=u,b[y]=t;};

if( v>m){m=v ;if( n>4)X=i,Y=y;}
t+=p<5 ;
if( x&1&&(y&112)+6*k==128&p<3)t--;
}
while(!t);}}
}
while(i=i+9&119);return m;}
main(){
X=8;
while( X--)b[X+112]=(b[X]-=64)-8,b[X+16]=18,b[X+96]=9;
while(1){
X=128;
while( X--)putchar(X&8&&(X-=7)?10:".?+nkbrq?*?NKBRQ"[b[X]&15]);
gets(c);
X=*c-16*c[1]+C,Y=c[2]-16*c[3]+C ;
if(!*c)D(K,0,5);
if(!D(K,1,1))K^=24;
}
}

Name: Anonymous 2018-03-19 8:47

I can't read this

Name: Anonymous 2018-03-19 8:53

Name: Anonymous 2018-03-19 12:43

Valid Perl code

Name: Anonymous 2018-03-19 13:11

Is this the prototype for frozenchess?

Name: Anonymous 2018-03-19 18:05

This is what happens when you run a picture of a turd through an OCR.

Name: Anonymous 2018-03-19 18:15

>>6
Is it because of the obfuscation?

Name: Anonymous 2018-03-20 7:32

>>7
obfuscate my anus

Name: Cudder !cXCudderUE 2018-03-20 11:10

Smallest? I don't think so.

http://www.pouet.net/prod.php?which=64962

Name: Anonymous 2018-03-20 12:25

>>9
That program doesn't comply with FIDE rules, which are standard in computer chess.

Name: Anonymous 2018-03-20 12:26

comply with my dubs!

Name: Anonymous 2018-03-20 14:51

>>10
So does the one in OP.

Name: Anonymous 2018-03-20 16:42

>>12
http://smmax.sourceforge.net/
Later on this version has been extended to allow playing with full FIDE rules, meaning including the management of en-passant, castling and under promotion. This new version is around 750 characters (35 lines of codes when pretty printed).

Don't change these.
Name: Email:
Entire Thread Thread List