133-line chess engine with annotated source
home.hccnet.nl
home.hccnet.nl
http://users.ox.ac.uk/~uzdm0006/scans/1kchess/
Micro-Chess, from 1976, which ran on a KIM-1 (6502) machine and used 1.1K of RAM.
http://users.telenet.be/kim1-6502/microchess/microchess.html
Toledo Javascript Chess Game
http://nanochess.110mb.com/chess4.html
+ TOLEDO JS1K orking demo: http://js1k.com/2010-first/demo/699
if(*c-10){K=c[0]-16*c[1]+C;L=c[2]-16*c[3]+C;}else /* parse entered move */
edit: can't see a way to escape asterisk characters, so this outputs slightly wrong (edit2: fixed)The correct way, though: add two spaces to the front. Then you get mono-spaced font, reproduced verbatim.
Kinda like this: **************A pity that people choose to sacrifice a lot of readability just to save a few characters in the source... it's not even justifiable in a interpreted language... in a language that you have to compile it's criminal
If you want to try to understand the chess code, the author provides an expanded version with comments that is more readable: http://home.hccnet.nl/h.g.muller/maximax.txt
In order to read the code, it is helpful to understand the basic algorithm (recursive negamax search). Here is a good explanation of minimax, negamax and alphabeta: http://www.hamedahmadi.com/gametree/
I've played at least a hundred games against it and lost every one. :P
Sir, you are a hacker.