Slashdot Mirror


Computer Chess Created In 487 Bytes, Breaks 32-Year-Old Record

An anonymous reader writes: The record for smallest computer implementation of chess on any platform was held by 1K ZX Chess, which saw a release back in 1983 for the Sinclair ZX81. It uses just 672 bytes of memory, and includes most chess rules as well as a computer component to play against. The 32-year-old record has been beaten this week by the demoscene group Red Sector Inc. They have implemented a fully-playable version of chess called BootChess in just 487 bytes (readme file including source code).

204 comments

  1. Incredible! by DigitAl56K · · Score: 5, Funny

    Next you'll be telling me you can create operating systems in less than 15GB!

    1. Re:Incredible! by Anonymous Coward · · Score: 1

      That's not possible! Hard drives these days are 1tb at least! No one uses dial-up anymore either!!! Get with the times!!!

      Yours truly,
      Innovation-starved corporations

    2. Re:Incredible! by Dutch+Gun · · Score: 5, Insightful

      I've noticed that they take a fairly liberal definition of "chess", as they simply discard certain rules, such as en passant pawn capture or castling moves, which are pretty important chess moves. It's a bit hard to argue that this is really "chess" if they just decide to leave out inconvenient rules ("chess lite?"). I probably wouldn't complain about other ommissions such as the 3-repetition rule, but castling?

      Even so, a very cool accomplishment in micro-optimization techniques.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    3. Re:Incredible! by Anonymous Coward · · Score: 2, Informative

      Depends on what you consider an operating system. Alpine Linux uses 130 MB (http://alpinelinux.org/about), including an usable graphical interface (Xfce).

      A really minimal system, like a virtual machine running a site, can be reduced to far less than that. For instance, Mirage OS (http://www.openmirage.org).

      Windows, OSX, and some Linux distros are not designed to be tweaked like that.

    4. Re:Incredible! by fuzzyfuzzyfungus · · Score: 1

      Next you'll be telling me you can create operating systems in less than 15GB!

      Indeed they can. Unfortunately they decided to let the people responsible for ACPI actually follow through on that, and then decided that it would make a good bootloader.

    5. Re:Incredible! by Tablizer · · Score: 5, Funny

      Next you'll be telling me you can create operating systems in less than 15GB!

      If you complain, we'll re-write it in Java and make it 30GB

    6. Re:Incredible! by LordLimecat · · Score: 1

      Innovation-starved corporations

      Cynicism to the rescue!

      Now dont mind me, Ill go back to using my 14nm process CPUs, 99% accurate voice recognition phone, holographic 3d goggles, and affordable SSD computer.

    7. Re:Incredible! by Anonymous Coward · · Score: 5, Interesting

      I've noticed that they take a fairly liberal definition of "chess", as they simply discard certain rules, such as en passant pawn capture or castling moves, which are pretty important chess moves. It's a bit hard to argue that this is really "chess" if they just decide to leave out inconvenient rules ("chess lite?"). I probably wouldn't complain about other ommissions such as the 3-repetition rule, but castling?

      Hmmm ... Read your history of chess - Modern Chess is a variant called "Mad Queen" - there are more variants of chess than there are of Poker, and just because we have become used to an agreed-upon standard does not invalidate other styles ...

    8. Re:Incredible! by Anonymous Coward · · Score: 1

      But they're not chess. They're similar, but not chess. I don't even get why you're saying this at all, let alone beginning with a condescending "do your research".

    9. Re:Incredible! by Anonymous Coward · · Score: 2, Informative

      Don't forget MenuetOS and its opensource derivative KolibriOS. They fit on a single floppy.

    10. Re:Incredible! by hcs_$reboot · · Score: 4, Informative

      To be fair, the ZX81 had only 1k of RAM. So they had to cut through the chess rules. Nowadays they could of course implement the whole game including all rules. But would that be interesting provided that it couldn't compare to that 1983 program?

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    11. Re: Incredible! by Anonymous Coward · · Score: 0

      Nooooooooooo!!!!!!!!

    12. Re:Incredible! by Anonymous Coward · · Score: 0

      Great, let's just redefine "chess program" to mean "any program that anyone on earth could consider a game."
      There, now we have all possible chess variants covered you annoying pedant.

    13. Re:Incredible! by Dutch+Gun · · Score: 1, Insightful

      I suppose that's legit, if they're purposely reproducing the limitations of that original program, in which case there's a baseline to measure against with similar rule sets. Do you happen to know if that's the case - that the chess rules actually match? I read the articles linked but didn't see that specifically mentioned.

      I still have an issues with the claim of "world's smallest chess program on any platform", though, because it's not a complete chess program as nearly anyone would define it.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    14. Re:Incredible! by Anonymous Coward · · Score: 0

      What language are you speaking, because it certainly isn't The Queen's English, therefore it's not English at all.

    15. Re:Incredible! by Anonymous Coward · · Score: 0

      How do you know that the Queen herself isn't on Slashdot?

    16. Re:Incredible! by Anonymous Coward · · Score: 5, Insightful

      Modern Chess is not now a variant called Mad Queen. It is a standardized game referred to as Chess and understood world-wide.

      Modern chess may have originated in a game that at one time was referred to as "Mad Queen".

    17. Re:Incredible! by mrbester · · Score: 1

      The program didn't have to fit in 1k as plenty of games were sold stating that the 16k RAMPACK was needed.

      I wonder if the effort to squeeze it into 1k was reflected in profit...

      --
      "Wait. Something's happening. It's opening up! My God, it's full of apricots!"
    18. Re:Incredible! by mrbester · · Score: 2

      DOS and GEM on the same floppy, with room to spare.

      --
      "Wait. Something's happening. It's opening up! My God, it's full of apricots!"
    19. Re:Incredible! by GlowingCat · · Score: 1

      32 bit Menuet is open source. 64bit Menuet freely available.

    20. Re:Incredible! by mwvdlee · · Score: 1

      It has a visual representation of the board, which is more than would be required to qualify as a complete chess program.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    21. Re:Incredible! by Anonymous Coward · · Score: 3, Interesting

      14nm process CPUs

      To process the bloat.

      99% accurate voice recognition phone

      You must speak very slowly, and with a Cupertino-approved accent.

      holographic 3d goggles

      Oh goodie, another piece of VR headgear that will be hyped for 3 years, bought for 2, then die.

      affordable SSD

      I had an affordable SSD in 1992 for my Psion Series 3a.

    22. Re:Incredible! by aled · · Score: 4, Informative

      there was a 4KB Java games contest some years http://en.m.wikipedia.org/wiki...

      one of the winning entries was a chess game. May be interesting to check.

      --

      "I think this line is mostly filler"
    23. Re:Incredible! by Anonymous Coward · · Score: 1

      I'd rather be an annoying pedant than a sarcastic douchebag such as you.

    24. Re:Incredible! by Anonymous Coward · · Score: 1

      What you call modern chess is formally Queen's Chess, which Mad Queen is just another name for. It's understood that if someone refers to Chess they probably mean Queen's Chess since that's the most commonly played variant these days. There are other variations still played in parts of the world.

    25. Re:Incredible! by Anonymous Coward · · Score: 1

      We are not amused.

    26. Re:Incredible! by Anonymous Coward · · Score: 1

      One prefers to lurk.

    27. Re:Incredible! by Half-pint+HAL · · Score: 1

      Because nobody has been bitten by a corgi on slashdot.

      Although I'm starting to wonder if Prince Phillip is here, given the amount of casual racism arising in AC posts at the moment.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    28. Re:Incredible! by hairyfeet · · Score: 1

      You make a funny but as somebody who lived through the days of sub 5k "Operating Systems" give me a "bloated" OS with great memory management, support for 64bit, plug and play, SXS compatibility, and all the things that cause the so called "resource hogging" of a modern OS!

      --
      ACs don't waste your time replying, your posts are never seen by me.
    29. Re:Incredible! by Assmasher · · Score: 1

      30GB

      - Boy are YOU an optimist...

      --
      Loading...
    30. Re:Incredible! by Chess_the_cat · · Score: 1

      Oh yeah. I play this variant of chess called "One Pawn On One Square." The opening position is a white pawn on a white square. I coded a version of it in 2 bytes. Guess I broke the record for "Smallest Chess Program."

      --
      Support the First Amendment. Read at -1
    31. Re:Incredible! by Anonymous Coward · · Score: 0

      # xbps-install emacs

      Name         Action    Version           New version            Download size
      emacs-common install   -                 24.4_1                 33MB
      emacs        install   -                 24.4_1                 2449KB

      Size to download:               36MB
      Size required on disk:         133MB

      Apparently you CAN put an OS in 133MB.

    32. Re:Incredible! by aled · · Score: 3, Informative

      here is the link to aichess4k site http://ulf.ofahrt.de/aichess4k...

      "aichess4k implements all chess rules and tops it off
      with an ai that casual players find difficult to beat."

      and a graphical board from the screenshots

      --

      "I think this line is mostly filler"
    33. Re:Incredible! by hairyfeet · · Score: 2

      Wouldn't Atari Video Chess be even smaller? I really can't see the 2600 cart beating the ZX81 in terms of storage.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    34. Re:Incredible! by mrchaotica · · Score: 2, Insightful

      You've got to be kidding. A visual representation of the board is insufficient to distinguish it from Checkers!

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    35. Re:Incredible! by OakDragon · · Score: 3, Funny

      They would have included a disclaimer, but that would have pushed up the byte count.

    36. Re:Incredible! by PhotoJim · · Score: 1

      Atari 2600 cartridges are 4 kB maximum. It's certainly possible the game only used a fraction of that, but highly unlikely.

      The 2600 did only have 128 bytes of RAM, but none of this would be needed for the program itself, which would be accessed directly from cartridge ROM by the CPU. On the ZX, the code would have to fit within the 1kB and the remaining RAM would be available for its execution.

    37. Re:Incredible! by Minupla · · Score: 4, Informative

      Looking at the comment threads, yes, it appears to be a 'faithful' implementation of the original code's rules, or rather a superset, since it includes the pawn promotion rule and the original did not.

      Min

      --
      On the whole, I find that I prefer Slashdot posts to twitter ones because I don't get limited to 140 chars before
    38. Re:Incredible! by operagost · · Score: 2

      But... but... these kids will never learn the joy of fiddling with jumpers, or rearranging their config.sys!

      --

      Gamingmuseum.com: Give your 3D accelerator a rest.
    39. Re: Incredible! by Lije+Baley · · Score: 1

      Rolling on my lawn laughing...

      --
      Strange things are afoot at the Circle-K.
    40. Re:Incredible! by gl4ss · · Score: 1

      or.. you know.. some old ass whatever distro..
      or win95.. fits nicely.

      or dos with win 3.11, fits even nicer...

      --
      world was created 5 seconds before this post as it is.
    41. Re:Incredible! by lgw · · Score: 1

      A really minimal system, like a virtual machine running a site, can be reduced to far less than that. For instance, Mirage OS (http://www.openmirage.org).

      We've seen a web server running on a Commodore 64. Wasn't that a 12 kB OS? It's been a while, but IIRC the OS was in memory from D000 to FFFF.

      I've worked on mainframes where the "recovery OS" fit on one tape block - a hard 32 kB constraint (used for disaster recovery - it would load a program that also had to fit in 32 kB which would restore a system from backups). The normal OS wasn't much bigger. Most device drivers weren't memory resident, for example, and shared 4 kB by swapping in and out, which could lead to some mighty odd behavior by today's standards.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    42. Re:Incredible! by Chris+Mattern · · Score: 1

      Modern Chess is not now a variant called Mad Queen. It is a standardized game referred to as Chess and understood world-wide.

      Unless you're in China, where it's understood to be something different. Or Japan. Or Korea. Or...

    43. Re:Incredible! by reanjr · · Score: 2

      I've tried many cheap versions of electronic chess, and most of them have no support for en passant (a couple don't have support for castling either). Not only that, but playing against other players, most people who play chess for recreation don't seem to know about an passant, anyway. So, let's call it's chess 2.0. Streamlined for the modern audience.

    44. Re:Incredible! by 50000BTU_barbecue · · Score: 1

      "Atari 2600 cartridges are 4 kB maximum."

      Not really, once they figured out some simple logic circuits they could bank switch more ROM than that, and probably address RAM chips too.

      http://www.schells.com/ccbackg...

      --
      Mostly random stuff.
    45. Re:Incredible! by Anonymous Coward · · Score: 0

      pfft, dont tell me where I am and am not!

    46. Re:Incredible! by mwvdlee · · Score: 0

      8x8 = chess
      10x10 = checkers

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    47. Re:Incredible! by Anonymous Coward · · Score: 0

      To be fair, the ZX81 had only 1k of RAM. So they had to cut through the chess rules. Nowadays they could of course implement the whole game including all rules. But would that be interesting provided that it couldn't compare to that 1983 program?

      I recall a time when designing and implementing memory-efficient applications was a requirement. Today it is a lost art among the majority of software developers leaving a minuscule minority of programmers capable of designing and implementing an application or even a utility written in assembly language.

    48. Re:Incredible! by Anonymous Coward · · Score: 0

      you don't play much checkers do you?

    49. Re:Incredible! by Anonymous Coward · · Score: 0

      Well, no. Chess is chess ( in Japanese), shogi is shogi ( in Japanese). They are different games and have different names. We might call shogi "Japanese chess", and perhaps some Japanese say the equivalent of "Western shogi" to mean chess, but that's just a description, not the name.

    50. Re:Incredible! by Anonymous Coward · · Score: 0

      The Japanese characters were silently removed from my comment above so it seems nonsensical. The first parenthesis should contain the katakana for "chesu", and the second the kanji for "shougi".

    51. Re:Incredible! by tepples · · Score: 1

      Mapper chips were invented for Video Chess but weren't actually used in the final release, which was squeezed into 4096 bytes. (source)

    52. Re:Incredible! by Anonymous Coward · · Score: 0

      You can easily tell a chess board from a checkers board, they are rotated 90 degrees from each other when playing.

    53. Re:Incredible! by Moridineas · · Score: 1

      I don't understand the point of your post at all? Yes, other nations have games that are similar to Chess (and that are genetically related to Chess--think 4th cousins twice removed) but that are not Chess and are not even called Chess!

      Chess != Shogi != Shatranj != etc...

    54. Re:Incredible! by Anonymous Coward · · Score: 0

      > It is a standardized game referred to as Chess and understood world-wide.

      So because some organization (FIDE) published rules for it -- it now owns that word?
      So if I play a game where I say your pawn can only be promoted to a piece that has been lost (i.e. you can't have two queens), that I am no longer playing Chess?

      Seriously, get your head out of your ass. "Chess" doesn't have some formal definition set in stone for all people of all nations for the eternity of time.

    55. Re:Incredible! by obarel · · Score: 2

      I think the point is that you don't win a 100m race by running 90m and then arguing about the exact definition of a metre.

      It's an incredible feat to squeeze any variant of chess into 487 bytes, but if you're going to compare apples to apples and maintain a record, the games should follow the same rules.

    56. Re:Incredible! by gstoddart · · Score: 2

      What? That doesn't sound right ... because I'm pretty sure I've seen a board which comes with both chess and checkers pieces.

      I'm not buying that at all -- they're both 8x8.

      You're just making shit up.

      --
      Lost at C:>. Found at C.
    57. Re: Incredible! by Anonymous Coward · · Score: 0

      Yeah, but I remember one technique was to do away with all error handling and assume that the user would behave.

    58. Re:Incredible! by painandgreed · · Score: 1

      Modern Chess is not now a variant called Mad Queen. It is a standardized game referred to as Chess and understood world-wide.

      Ya! Just like football!

      Did you see that ludicrous display last night?

    59. Re:Incredible! by Darinbob · · Score: 1

      Today though "bytes of RAM" is vague. A lot of chips have very tiny RAM but a (relative) lot of Flash. Ie, the Microchip PIC has instruction lengths of 14 to 18 bits, so these don't even fit into common notions of bytes.
      Then again the instruction set you work with is incredibly important as well. Faster is not necessarily smaller here. Also if there's ROM you can leverage that (the program in question most definitely uses the BIOS for a normal 16-bit 8086, the Sinclair also had ROM).

    60. Re: Incredible! by Kazoo+the+Clown · · Score: 1

      133M OS? Bloated. My first decent coding job was working on a 4-user OS that ran in 8K. Supported text terminal based business apps written in a tight tokenized language by swapping segments of them in 256 byte chunks from floppy (with a small cache) and the DB stored on floppies as well. And I can tell you we didn't waste bytes on using either null as a string terminator OR a length byte, 7-bit characters with the high bit being the terminator saved us all kinds of space (made supporting international character sets a pain, but we did that too for many of them). When we finally got around to porting the environment to Linux, it scaled REALLY well. The dang thing could run 1000 users from a PC based server (this was in the early '90s with sub-gigabyte memory). This was when the GUI-heavy competition was struggling to support 20 users.

    61. Re: Incredible! by Kazoo+the+Clown · · Score: 2

      Obligatory Dilbert reference:

      wally: "When I started programming, we didn't have any of these sissy "icons" and "windows". All we had were zeros and ones — and sometimes we didn't even have ones. I once wrote a database using only zeros."
      dilbert: "You had zeros? We had to use the letter "O"."

    62. Re:Incredible! by unixisc · · Score: 1

      I've noticed that they take a fairly liberal definition of "chess", as they simply discard certain rules, such as en passant pawn capture or castling moves, which are pretty important chess moves. It's a bit hard to argue that this is really "chess" if they just decide to leave out inconvenient rules ("chess lite?"). I probably wouldn't complain about other ommissions such as the 3-repetition rule, but castling?

      Even so, a very cool accomplishment in micro-optimization techniques.

      How many queens does it allow pawns to become? Or can pawns only become queens & nothing else?

    63. Re:Incredible! by jrumney · · Score: 1

      Alpine Linux uses 130 MB

      The first version of Slackware I tried ran on two floppies - one for the kernel, and one for the userspace. This didn't include a graphical interface though - you needed to download the CD image for that.

    64. Re:Incredible! by AthanasiusKircher · · Score: 1

      Not only that, but playing against other players, most people who play chess for recreation don't seem to know about an passant, anyway. So, let's call it's chess 2.0. Streamlined for the modern audience.

      Uh, I know you're joking here, but it's ironic given that en passant was actually originally introduced to the game as part of an attempt to "streamline" chess and make it faster paced and less tedious. Pawns were allowed to advance two spaces on their first move instead of just one (which gets the game going faster), and en passant was the obvious countermove necessary to prevent those pawns from getting an undue advantage (and more likely to get to the other side where they will be promoted and delay the game more).

    65. Re:Incredible! by LordLimecat · · Score: 1

      You must speak very slowly, and with a Cupertino-approved accent.

      Cant speak for IOS, but Android's voice recognition is fantastic even when in noisy environments like a car, over bluetooth, with radio on.

      I had an affordable SSD in 1992 for my Psion Series 3a.

      Ignoring the fact that the Psion Series 3a came out in 1993, the SSD in your Psion was ~10,000 times smaller than commonly available HDDs at the time, and would have been comparable to the flash in my TI-83. Performance wise it would have been generally worse than an equivalent HDD. Its a pretty dumb comparison all around; these days the difference in size between SSDs and HDDs is ~1/10, rather than 1/1000, and the SSDs outperform the HDDs in every single benchmark, sometimes by factors of 100 or more.

      To process the bloat.

      Not even sure what that means. Im sure the scientific research that goes on where I work does absolutely nothing with the cheaply available multicore CPUs; certainly the fact that a handful of nodes in our datacenter can consolidate hundreds of VMs during off-peak hours is worth something, though.

      Im not sure if you're ignorant, cynical, or pining for some good old days that never really existed; but it kind of sounds like all 3.

    66. Re:Incredible! by angel'o'sphere · · Score: 1

      The games you link are not 'Chess', they are very different games and have nothing to do with chess at all.
      They only have the name in them in the english/american translation ...
      If you would read the links you post, you had seen 'Chineese chess' is called Xiangqi, the korean is called Janggi (and is derived from the chinese version and the jap. is called Shogi.
      Only Shogi has similar pieces and movements to our western chess. Both are probably derived from a common indian origin.
      I guess our anonymous parent meant with 'variants' variants if the modern chess, derived from india as it got established in the islamic and christian world. It makes no sense imho to add Chinese or other asian variants that only have in common rectangular/square playing fields and moving pieces of different values/capabilities.
      Otherwise Checkers is a variant of Chess, too.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    67. Re:Incredible! by gzuckier · · Score: 1

      Modern Chess is not now a variant called Mad Queen. It is a standardized game referred to as Chess and understood world-wide.

      Modern chess may have originated in a game that at one time was referred to as "Mad Queen".

      Bruce Jenner?

      --
      Star Trek transporters are just 3d printers.
    68. Re:Incredible! by Anonymous Coward · · Score: 0

      Actually, they are more Chess than Western Chess since they were around first.

      And yes, "Western Chess" is the proper name for what you white people think of as "Chess".

    69. Re:Incredible! by TranquilVoid · · Score: 1

      I still have an issues with the claim of "world's smallest chess program on any platform"

      This gives me an idea, create my own operating system, ChessOS, then write a 1-bit implementation, breaking the record. It will have a raytraced GUI too.

    70. Re:Incredible! by demonrob · · Score: 1

      Sir Prince Phillip please.

    71. Re:Incredible! by xlsior · · Score: 1

      What? That doesn't sound right ... because I'm pretty sure I've seen a board which comes with both chess and checkers pieces.

      I'm not buying that at all -- they're both 8x8.

      You're just making shit up.

      There are different versions -- American Checkers is 8x8, the most popular international version is 10x10, and Canadian Checkers is 12x12 apparently: http://en.wikipedia.org/wiki/D...

      There's double-sided chessboards to account for this: 8x8 for chess on one side, and 10x10 for checkers on the other side.

  2. "Fully-playable" by scottbomb · · Score: 3, Interesting

    or "play-worthy" ?

    There's a difference.

    1. Re:"Fully-playable" by Anonymous Coward · · Score: 0

      Ya think? You're a smart one!

    2. Re:"Fully-playable" by Anonymous Coward · · Score: 0

      And you're a smart ass! ohh, right in the balls!

    3. Re:"Fully-playable" by Anonymous Coward · · Score: 0

      Playable.

    4. Re:"Fully-playable" by PatientZero · · Score: 1

      The "play-worthy" version uses 64-bit bytes.

      --
      Freedom to fear. Freedom from thought. Freedom to kill.
      I guess the War on Terror really is about freedom!
    5. Re:"Fully-playable" by Aighearach · · Score: 0

      Well, it isn't actually playable either, as it implements a different game with some small rules overlap.

      Any patzer at the local chess club can tell it isn't even "chess."

  3. "includes most chess rules" by Anonymous Coward · · Score: 1

    That doesn't sound like real chess.

    1. Re:"includes most chess rules" by Anonymous Coward · · Score: 5, Funny

      They have altered the rules. Pray they do not alter it further.

    2. Re:"includes most chess rules" by Anonymous Coward · · Score: 0

      Well, it is the kind of chess I can play, you insensitive clod.

  4. Bytes COULD be HUGE by Anonymous Coward · · Score: 0

    Mark it as number of bits. Assuming everything else is in order. And that the effort isn't all down the crapper by tomorrow. Reminds me of a person who did the best assembler ever, he so claimed. He died before anyone else got to use it. Back then, powerful assemblers were sought after like whatever comes before willows. Compilers, especially for micros, where not good at all. Ah, but no one here gets that. I will re-enter the man-cave.

  5. Red Sector? by Anonymous Coward · · Score: 0

    Jesus, I remember getting cracked games from them in, like, 1991. Are they beating their previous record?

  6. Not real chess by byteherder · · Score: 0

    Reading from the source code

    No under promotion
    No en passant pawn capture
    No castling

    This may be a game but it is not chess.

    1. Re:Not real chess by iluvcapra · · Score: 1

      Crow:~ iluvcapra$ pbpaste | wc
          1059 8005 57450

      487 bytes of of source, 57k of commentary.

      --
      Don't blame me, I voted for Baltar.
    2. Re:Not real chess by Vintermann · · Score: 1

      It's chess more or less as it was played 100+ years ago. It's not FIDE chess, that's true.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    3. Re:Not real chess by Rockoon · · Score: 1

      It's chess more or less as it was played 100+ years ago

      No it isn't....

      Why even open your mouth?

      --
      "His name was James Damore."
    4. Re:Not real chess by byteherder · · Score: 1

      The game we currently know as chess has been standardized for 400 years....even before FIDE came along.

    5. Re:Not real chess by Chess_the_cat · · Score: 2

      You're right if by 100+ you mean 100+(600). Castling was introduced in the 1300s. En Passant in the 1400s.

      --
      Support the First Amendment. Read at -1
    6. Re:Not real chess by Anonymous Coward · · Score: 0

      They makes the GPs statement about as accurate as the incomplete rules.

  7. Apple Integer BASIC Chess by beaverdownunder · · Score: 4, Interesting

    0 GOSUB 10000
    1 INPUT "DO YOU WANT INSTRUCTIONS (Y OR N)?",A$: IF A$#"Y" AND A$#"N" THEN 1: IF A$="Y" THEN GOSUB 30000
    2 REF=5: CALL -936
    3 INPUT "COMPUTER TO PLAY WHITE(0) OR BLACK(1)",WHO
    4 IST=0
    5 DIM WC(99),BC(99)
    6 DIM V(6),P(26),C(3)
    7 DIM KING(16)
    8 DIM A(70)
    10 DIM M(120),W(120),B(120),I(6)
    11 DIM G(100)
    12 FOR X=1 TO 120:M(X)=0: NEXT X
    14 FOR X=1 TO 99:W(X)=0:B(X)=0: NEXT X
    15 FOR X=2 TO 9:X1=10*X:X2=X1+1:M(X1)=7:M(X2)=7: NEXT X
    16 DIM STR$(10),FILE$(8),RANK$(8)
    17 FILE$(1)="A":FILE$(2)="B":FILE$(3)="C":FILE$(4)="D":FILE$(5)="E":FILE$(6)="F":FILE$(7)="G":FILE$(8)="H"
    18 RANK$="12345678"
    20 FOR K=1 TO 21:K2=K+99:M(K)=7:M(K2)=7: NEXT K
    22 FOR K=32 TO 39:K2=K+50:M(K)=1:M(K2)=-1: NEXT K
    23 M(22)=4:M(23)=2:M(24)=3:M(25)=5:M(26)=6:M(27)=3:M(28)=2:M(29)=4
    25 FOR K=22 TO 29:K2=K+70:M(K2)=-M(K): NEXT K
    30 I(1)=12:I(2)=15:I(3)=10:I(4)=1:I(5)=6:I(6)=6
    35 V(1)=1:V(2)=3:V(3)=3:V(4)=5:V(5)=9:V(6)=10
    40 P(1)=-1:P(2)=1:P(3)=10:P(4)=-10:P(5)=0:P(6)=1:P(7)=-1
    45 P(8)=10:P(9)=-10:P(10)=-9:P(11)=-11:P(12)=9:P(13)=11:P(14)=0
    50 P(15)=8:P(16)=-8:P(17)=12:P(18)=-12:P(19)=19:P(20)=-19
    55 P(21)=21:P(22)=-21:P(23)=0:P(24)=10:P(25)=20:P(26)=0
    60 C(1)=8:C(2)=0:C(3)=3
    80 IF WHO=1 THEN 90
    85 M(25)=6:M(26)=5:M(95)=-6:M(96)=-5
    90 GOSUB 5000
    93 FOR II=1 TO 120:W(II)=0:B(II)=0: NEXT II
    95 IF WHO=1 THEN 100:T2=0: GOTO 1000
    100 REM MAKE MOVE
    101 GOSUB 4000
    105 Z9=0
    110 GOSUB 4200
    115 GOSUB 5000: IF WHO=0 THEN 1000
    116 M9=M9+1: IF M9>REF THEN 120
    117 IF T2>4 THEN 120: IF IST=1 THEN GOTO 120
    118 F2=9-F2:T2=9-T2: GOSUB 4200: GOSUB 5000: GOTO 100
    120 REM FILL CONTROL ARRAYS
    122 N8=0:IST=1
    125 FOR X1=22 TO 99:WC(X1)=0:BC(X1)=0: IF M(X1)=6 THEN BKING=X1: IF M(X1)=-6 THEN WKING=X1: NEXT X1
    130 FOR X=22 TO 99: IF M(X)<1 THEN 170: IF M(X)=7 THEN 170: GOSUB 8000: IF N9=0 THEN 170
    150 FOR X1=1 TO N9:TO=G(X1)-G(X1)/100*100: IF M(TO)>0 THEN 168
    164 N8=N8+1:A(N8)=G(X1)
    168 BC(TO)=BC(TO)+1
    169 NEXT X1
    170 NEXT X
    172 FOR X=22 TO 99: IF M(X)>-1 THEN 180: GOSUB 8000
    173 IF N9=0 THEN 180
    174 FOR X1=1 TO N9:TO=G(X1)-G(X1)/100*100:WC(TO)=WC(TO)+1
    176 NEXT X1
    180 NEXT X
    181 GOTO 3000: REM CASTLE LOGIC
    182 REM FILL KING CONTROL ARRAY
    184 KING(1)=BKING+1:KING(2)=BKING-1:KING(3)=BKING+10:KING(4)=BKING-10
    185 KING(5)=BKING+11:KING(6)=BKING-11:KING(7)=BKING+9:KING(8)=BKING-9
    186 KING(9)=WKING+1:KING(10)=WKING-1:KING(11)=WKING+10:KING(12)=WKING-10
    187 KING(13)=WKING+11:KING(14)=WKING-11:KING(15)=WKING+9:KING(16)=WKING-9
    190 V9=-10000:I9=0: FOR X4=1 TO N8:N4=0:F4=A(X4)/100
    210 T4=A(X4)-F4*100:F5=M(F4):T5=M(T4)
    212 REM FIND MOVES OFPIECE IN PRESENT POSTION.
    214 X=F4: GOSUB 8000
    225 M(T4)=M(F4):M(F4)=0
    235 GOSUB 9000: IF N4<=V9 THEN 255
    245 V9=N4:F9=F4:T9=T4
    255 M(F4)=F5:M(T4)=T5:
    256 Z9=Z9+1: IF Z9>20 THEN Z9=1: TAB 26: VTAB Z9: PRINT F4;" : ";T4;" V= ";N4
    259 NEXT X4
    270 F1=F9:T1=T9:M(T1)=M(F1):M(F1)=0:F6=F1-F1/10*10-1:F7=10-F1/10:T6=T1-T1/10*10-1:T7=10-T1/10
    280 IF WHO=1 AND F1=22 THEN QROOK=1
    281 IF WHO=1 AND F1=29 THEN KROOK=1
    282 IF M(T1)=6 THEN MKING=1
    283 IF WHO=0 AND F1=22 THEN QROOK=1
    284 IF WHO=0 AND F1=29 THEN KROOK=1
    310 PRINT "FROM ";F6;F7

    1. Re:Apple Integer BASIC Chess by Anonymous Coward · · Score: 0

      30020 PRINT " '00'); AND ON THE QUEEN'S SIDE,": PRINT " 'OOO'.": PRINT " 3) THE COMPUTER DOES NOT CHECK FOR"
      30022 PRINT " ILLEGAL MOVES AND THEY MAY CAUSE": PRINT " CAUSE STRANGE THINGS TO HAPPEN."

      If the computer won't enforce the rules of the game, why bother using it? Might as well use a real chessboard, that doesn't enforce the rules either, but it also doesn't require electricity.

    2. Re:Apple Integer BASIC Chess by Tablizer · · Score: 2

      "illegal moves...may cause...strange things to happen"

      Quantum chess, my favorite! Oh wait, that's the prenup fineprint

    3. Re: Apple Integer BASIC Chess by beav007 · · Score: 3, Funny

      #!/usr/bin/python import chess # I'm Cave Johnson. We're done here.

    4. Re:Apple Integer BASIC Chess by Anonymous Coward · · Score: 0

      It also serves as an opponent, you dullard.

    5. Re:Apple Integer BASIC Chess by Flammon · · Score: 1

      Here I am, chilling at Starbucks, listening to some jazzy music and all of sudden I see this abomination of code. Thanks for ruining my morning.

    6. Re:Apple Integer BASIC Chess by Darinbob · · Score: 1

      I'd go for a Forth version of Chess to really get small code (assume the Forth interpreter is in ROM which isn't cheating since these tiny demo programs use ROM and BIOS as well).

  8. He was right! by Tablizer · · Score: 4, Funny

    Toldja, 640 bytes otta be enough for anyone. -Gill Bates

    1. Re:He was right! by CrowdedBrainzzzsand9 · · Score: 1

      I did it in under 20 bytes, two ways:
      version 1.1: I support all moves except: opening move.
      version 1.2:
            Print "I resign."
                                         

    2. Re:He was right! by LordWabbit2 · · Score: 1

      It was 640kb, I know because I learned to code on one. An 8088, actually still have it, still worked the last time I switched it on. Was looking for some files on it, transferring the data to another PC was a real pain in the ass, ended up using a serial cable.

      --
      There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
  9. Best short programs by Cafe+Alpha · · Score: 3, Interesting

    It would be cool to see which programming languages could have the best short chess programs.

    I'd nominate Haskell, scheme and prolog to try it in.

    1. Re:Best short programs by Cafe+Alpha · · Score: 1

      Also lua which is actually pretty close to self in power. Or smalltalk.

    2. Re:Best short programs by Yaztromo · · Score: 1

      It would be cool to see which programming languages could have the best short chess programs.

      I'd nominate Haskell, scheme and prolog to try it in.

      To make things fair, I think you'd have to define the valid set of languages as general purpose languages. I could see coming up with a chess-specific language that would be super-efficient in that the language would already have known chess properties as built-in elements.

      Yaz

    3. Re:Best short programs by Anonymous Coward · · Score: 2, Informative

      It would be cool to see which programming languages could have the best short chess programs.

      I'd nominate Haskell, scheme and prolog to try it in.

      The game discussed here is written in x86 asm. The source code is certainly having more bytes than 487b, but the compiled result is just 487b. If you would write it in any of the languages you mentioned, the compiled result would be bigger.

    4. Re:Best short programs by Cafe+Alpha · · Score: 1

      Well I said "best" short programs. I suspect that that tiny program isn't "good", ie plays a crumby game.

      Prolog is very good at encoding rules very succinctly and does depth first searches automatically (it's a bit harder to get more advanced search strategies, but it can be done.) Scheme has continuations so one could probably encode more kinds of search more succinctly than even prolog. Haskell has normal order lazy evaluation, so it's succinct to separate search strategies from state generation, though it might be hard to keep it from memoizing too much and running out of memory (I don't really have experience in Haskell).

    5. Re:Best short programs by tibit · · Score: 1

      Probably if they allowed themselves to use the full 512 bytes, it could enforce all the rules. Alas, I wonder what would come out with APL :)

      --
      A successful API design takes a mixture of software design and pedagogy.
    6. Re:Best short programs by omtinez · · Score: 1

      Ah darn it! There goes my brilliant plan of beating this record...

    7. Re:Best short programs by Cafe+Alpha · · Score: 1

      I'm more interested in optimizing how complete and high quality the result is, in a surprisingly short program than in meeting some context metric for program size.

      My actual interest is the intuition that there are shockingly powerful methods hidden in more expressive programming languages with more exotic features.

    8. Re:Best short programs by Cafe+Alpha · · Score: 1

      Well I think part of what makes a higher level language is the potential for writing powerful special purpose languages in it easily.
      Scheme and prolog both have macros and both have the ability to compile code at run time as well. Prolog also has the ability to define new operators. And it's awfully good at parsing, building and walking trees.

    9. Re:Best short programs by aralin · · Score: 1

      If you think in terms of as much stuff done in as little characters as possible, there is no competition for PERL.

      I think this particular competition though is counting bytes of machine code. I thought I was pretty good myself with reducing a printer driver into 136 bytes, but Chess in 500 that is really something.

      --
      If programs would be read like poetry, most programmers would be Vogons.
    10. Re:Best short programs by ockegheim · · Score: 1

      Zipped Scheme would be pretty small, once the right parentheses are compressed.

      --
      I’m old enough to remember 16K of memory being described as “whopping”
    11. Re:Best short programs by ockegheim · · Score: 1

      Back in the day I learned Lua by programming 254-byte (I think) macros. As far as I know, the one-letter globals didn’t do any harm and it was good fun. Once I worked out how to write add-ons of unlimited size, my programming skills and code legibility improved greatly.

      --
      I’m old enough to remember 16K of memory being described as “whopping”
    12. Re:Best short programs by TapeCutter · · Score: 2

      You're missing the point, it's the size of the binary image on disk that is remarkable, not the size of the source text. Short source text can easily be achieved by putting "chess.exe" in a cmd file.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
    13. Re:Best short programs by Anonymous Coward · · Score: 0

      How about a full general purpose language with a dedicated chess-specific subset?

    14. Re:Best short programs by gnupun · · Score: 1

      If you want small, forth is probably the best... better than assembly. Java uses it to convert source to forth-like intermediate language (jvm) opcodes.

    15. Re:Best short programs by mrchaotica · · Score: 1

      What you're saying doesn't matter. The point is that the measured result has to include the runtime environment. Because of that, even "Hello World" in Prolog, Scheme, or Haskell is probably* going to be bigger than 487 bytes.

      (* I haven't actually looked up the runtime size of those languages.)

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    16. Re:Best short programs by cheater512 · · Score: 1

      Perl would win hands down no contest.

      I've never figured out how this one works:
      http://www.99-bottles-of-beer....
      (not that I've tried too hard - its just a work of art)

    17. Re:Best short programs by braindrainbahrain · · Score: 1

      Could anyone do it in one line of APL?

    18. Re:Best short programs by Darinbob · · Score: 1

      How about Forth, which can usually result in smaller code than 8086.

    19. Re:Best short programs by Darinbob · · Score: 1

      The chess program in question uses the BIOS of a Bochs emulator, which is not included in the size calculations.

    20. Re:Best short programs by Cafe+Alpha · · Score: 1

      "Back in the day I learned Lua by programming 254-byte (I think) macros."

      I know it's late to ask what you meant, but lua doesn't have macros.

    21. Re:Best short programs by ockegheim · · Score: 1

      Oops, that wasn’t very clear. I meant macros for World of Warcraft. You could bind macros to a key, such as
      /cast "Flash Heal"

      One macro command was /script which would execute Lua code. Macros were limited to 254 characters, so the Lua code was limited to 248 characters (/script + a space took 8 characters). You could do a surprising amount with this.

      --
      I’m old enough to remember 16K of memory being described as “whopping”
  10. Missing chess rules by Sigma+7 · · Score: 2

    From the readme:

    -you don't get under-promotion ;
        -you don't get "en passant" pawn capture ;
        -you don't get castling (queen or king side) ;

    Underpromotion may be understandable, maybe en-passant since it doesn't come up that oftean, but castling makes a ton of games unplayable.

    Also, purists consider anything that implements these three rules to be a better record than something that omits three rules.

    1. Re:Missing chess rules by Anonymous Coward · · Score: 0

      > Also, purists consider anything that implements these three rules to be a better record than something that omits three rules.

      Where? I'd be interested to see what the record is for something which implements all the rules.

    2. Re:Missing chess rules by Anonymous Coward · · Score: 0

      Purists in which domain? This is a challenge to make the smallest chess program. The record was held by ZX81 1K Chess, which did not implement promotion at all, nor en passant, nor castling, and had no AI. (All this is in TFS, BTW). That is the standard to beat, not some theoretical chess purist standard, and the new game is smaller, has promotion, and has rudimentary AI, so they blow the standard away and keep the purists that matter very happy.

      If you want a chess program that implements all the FIDE rules of chess, there are plenty available. Go bother someone else with your pedantry, like someone who is actually claiming to implement all the FIDE rules of chess.

    3. Re:Missing chess rules by Anonymous Coward · · Score: 0

      Underpromotion may be understandable, but it's still a key element of the game. Promoting to a knight instead of a queen (or bishop or rook, which are just queen subsets) can surprise an opponent. I've won that way (although I doubt a master would miss that trick).

  11. I question the ZX-81 claim by frovingslosh · · Score: 1

    I never before heard a claim that the ZX-81 held a record, and I don't believe that it did. Back in the 70's (1975 or 1976) I received a copy of a chess program from Fairchild for their F8 computer prototype board, It fit in 1K of 8 bit memory (sorry, I don't remember how many bytes were left over, if any). I don't remember if it could under-promote, but I'm pretty sure that it could castle and allowed en-peasant moves. This was a novel and interesting microcomputer (the CPU didn't even have a program counter - but the memory management chip did!) and it certainly wasn't popular with hobbyists (although it was used in the Fairchild Channel F video game that came to market before the Atari 2600), but they did sell some $100 prototype boards and I bought one, mainly because I was so impressed by the 1K chess program.

    --
    I'm an American. I love this country and the freedoms that we used to have.
  12. Dodgy record by countach · · Score: 1

    Surely the record depends on the expressiveness of the instruction set of the chip you are programming for. With a suitably advanced chip I could implement chess in 1 byte. It would be an instruction that looks like this:

    JMP CHESS.

    and an instruction that implements chess.

    1. Re:Dodgy record by Anonymous Coward · · Score: 0

      Extremely Complex Instruction Set Computer?

    2. Re:Dodgy record by PhilHibbs · · Score: 1

      That's what mathematicians refer to as "trivial", which is one of the most derogatory terms in mathematics.

    3. Re:Dodgy record by coinreturn · · Score: 1

      Surely the record depends on the expressiveness of the instruction set of the chip you are programming for. With a suitably advanced chip I could implement chess in 1 byte. It would be an instruction that looks like this:

      JMP CHESS.

      and an instruction that implements chess.

      One whole byte! You slacker. You could implement this as one bit - have it be the only instruction.

    4. Re:Dodgy record by Anonymous Coward · · Score: 0

      that would be a 2 byte instruction.

    5. Re:Dodgy record by Half-pint+HAL · · Score: 1

      Which is exactly his point. Even 16-bit x86 processors have more general-purpose register space than z80, so there should be fewer memory calls required. x86 has a more sophisticated instruction set (z80 has no multiplication instruction), so program the exact same algorithm in the two assemblers and you will get a smaller program in x86 than in z80.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
  13. Best short programs by Anonymous Coward · · Score: 0

    What do you mean by short? Small executable size? Small LoC count? (or chars, or any way to measure the source code?) Can you use libraries? Make a chess library and #import playchess.py ?

  14. Buggy and incomplete by WARM3CH · · Score: 0

    What's the point of setting a record if the program is not working correctly? This chess program does not implement full chess rules. For example, it does not understand castling, moves the king into check (illegal move), does not test to various draws (e.g. stalemate, 50 moves rule), does not understand en-passant, etc.

    To be clear, I am not complaining that this is not a good chess program; what I say is that this is NOT a chess program!

    1. Re:Buggy and incomplete by Vintermann · · Score: 1

      This is par for the course for chess programs of that generation, though. I remember an old DOS chess program that would allow "castling" by just switching the king and rook, regardless of whether there were pieces between them. One Win 3.11 chess program I remember, was ridiculously easy to break if you used the take back a move function. Some sort of internal data structure wasn't properly cleaned if you did that, so the computer would start making illegal moves, randomly putting pieces on the board, etc.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    2. Re:Buggy and incomplete by TrollstonButterbeans · · Score: 2

      Buggy? Incomplete?

      Perhaps they intend to work in the games industry.

      --
      Priest: "Universe from nothing, no laws of physics, sped up time"+ huge discrepancies. Creationism? No. Big Bang Theory
  15. pygame chess is the ultimate by Anonymous Coward · · Score: 1

    I implemented a chess game in pygame and python, didnt have all the rules either and i stopped developing it because it used all of my 4 Gb of memory to run in. Probably the most bloated game of chess ever invented, do I get a prize too.

    1. Re:pygame chess is the ultimate by Cafe+Alpha · · Score: 1

      Ouch.

      You're reminding me how HARD chess is.

      Chess isn't a game that I should be messing with, I'll never know what makes a good strategy in it.

    2. Re:pygame chess is the ultimate by Anonymous Coward · · Score: 0

      You think chess is hard, try Go. The reasons why one loses at chess are at least comprehensible. You do stupid moves, you trade pieces at a disadvantage, you give up control of the center, some crap like that. Go is insanely, ludicrously more complex, yet only has one type of piece and like four rules. You can happen upon a good chess strategy by accident, but the only thing one can do as an unstudied go player is lose without understanding why.

    3. Re:pygame chess is the ultimate by ChunderDownunder · · Score: 1

      So today's /. project is to implement Go in the Go language?

    4. Re:pygame chess is the ultimate by mrchaotica · · Score: 1

      I'm sure it's already been done, but impossible to find with a search engine.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  16. Easily breakable by hcs_$reboot · · Score: 1

    Just build a CPU that includes Chess rules, and voilà. The assembly code would be merely a call to the CPU chess, or maybe a loop. A few bytes at most.

    --
    Slashdot, fix the reply notifications... You won't get away with it...
    1. Re:Easily breakable by Cafe+Alpha · · Score: 1

      Specialized chess hardware has been very high profile.

      Deep Blue used specialize circuitry :(
      Before that there was Hi Tech

    2. Re:Easily breakable by Anonymous Coward · · Score: 0

      Well, we have processors that do only 256-bits hashing, and there is quite a big market for them. So why not a chess processor? Could be fun and very fast.

  17. some rules *nearly* never come up by Anonymous Coward · · Score: 1

    There are many rules that only come up in a very small number of games. For example, the fifty-move rule which states that the game ends in a draw if you play 50 moves without any pawns moved or any captures made (or 100 moves in certain special board states). I can see why such a rule needs to exist... but at the same time I'm willing to call this proof of concept as chess even if it doesn't fully implement that.

    1. Re:some rules *nearly* never come up by fisted · · Score: 3, Interesting

      the fifty-move rule which states that the game may end in a draw if you play 50 moves without any pawns moved or any captures made

      FTFY. It doesn't end automagically, a player has to invoke that rule explicitly.

      (or 100 moves in certain special board states).

      I've never heard about that, but the wikipedia article you linked says that this rule was in effect from 1952-1992. It's not anymore

      I'm willing to call this proof of concept as chess even if it doesn't fully implement that.

      We don't need no proof of concept for chess, it's kind of an old thing. The point here is to fit the stuff in <512 bytes, which they say they couldn't do without leaving away en passant, castling, etc. So I don't really see how this is proving any concept.

      That being said, It's pretty impressive to implement what they did in this little amount of storage. It's just not chess. Now get off my lawn.

    2. Re:some rules *nearly* never come up by Aighearach · · Score: 2

      It would be a lot more impressive if they went to 2k and had it actually working. I can understand the motivation to play code golf, but every code golf I've played requires a fully correct answer to earn the right to count the bytes.

    3. Re:some rules *nearly* never come up by schneidafunk · · Score: 2

      Actually, it does end automatically. I've seen it happen playing chess online. In an OTB (over-the-board) game, I am convinced a draw would be agreed upon well beforehand unless one player was going for a time win.

      Regardless, your selective quote left out the end: "In the 20th century it was discovered that some positions of certain endgames can only be won in more than fifty moves (without a capture or a pawn move). The rule was changed to include certain exceptions in which one hundred moves were allowed with particular material combinations. However, more and more exceptions were discovered and in 1992 FIDE abolished all such exceptions and reinstated the strict fifty-move rule."

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    4. Re:some rules *nearly* never come up by fisted · · Score: 1

      Actually, it does end automatically. I've seen it happen playing chess online.

      What kind of argument is that? I've seen it in an online chess game, so this defines the rules?
      I for one have seen an online football (not handegg) game which was played using 5 rather than 11 players per team. Guess how much that says about the official football rules..

      Since you seem unable to do your research even when given a direct link, here's an inline quote of what I linked in the post you replied to:

      9.3

      The game is drawn, upon a correct claim by the player having the move, if:
      a. he writes his move on his scoresheet and declares to the arbiter his intention to make this move, which shall result in the last 50 moves having been made by each player without the movement of any pawn and without any capture, or

      b. the last 50 consecutive moves have been made by each playerwithout the movement of any pawn and without any capture.

      Emphasis mine. Get it?

      In an OTB (over-the-board) game, I am convinced a draw would be agreed upon well beforehand unless one player was going for a time win.

      No. You either mutually agree on a draw, which you can do at any time, without the requirement for the 50-move or 3-repetitions rule, or, like in this case, you may claim the draw, your opponent can not object to it. No agreement required.

      Regardless, your selective quote ...

      Wait what? Where did I even quote anything?

      ... left out the end:

      I don't really see how I can leave out the end without having quoted anything, but since you seem to lack any reading comprehension, here's a bit to practice on:

      Compare:

      this rule was in effect from 1952-1992

      With:

      in 1992 FIDE abolished all such exceptions and reinstated the strict fifty-move rule

      Emphasis mine again, just to give you a little assistance.

    5. Re:some rules *nearly* never come up by gmiller123456 · · Score: 1

      FTFY. It doesn't end automagically, a player has to invoke that rule explicitly.

      Actually, no rules are imposed automatically, it's up to the players to enforce them. It's only when both players agree to egregiously refuse to follow the rules that a TD can intervene. The fact that a lot of software automatically enforces things like valid moves is just a convenience to the TD and players. In a rated over the board game, anytime a player wants to make a claim they are supposed to pause the clock and go get a TD, which is hard or even impossible where there is no real TD.

    6. Re:some rules *nearly* never come up by schneidafunk · · Score: 1

      Sorry I didn't have time to research before, because you know this thing called work. But here it is for you, I spent the time to look at the FIDE handbook instead of wikipedia. At 50 moves you can claim a draw, which is automatically implemented online at every chess website I've played on, but it's actually at 75 moves it legally ends as a draw whether or not you claim it in OTB tournaments. So we were both wrong.

      Enjoy:

      http://www.fide.com/fide/handb...

      Section 9.6

      'any consecutive series of 75 moves have been completed by each player without the movement of any pawn and without any capture. If the last move resulted in checkmate, that shall take precedence.'

      Go fist yourself.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    7. Re:some rules *nearly* never come up by fisted · · Score: 1

      Sorry I didn't have time to research before, because you know this thing called work.

      You ... work? *gasp*. How uncommon.

      But here it is for you, I spent the time to look at the FIDE handbook instead of wikipedia. At 50 moves you can claim a draw, which is automatically implemented online at every chess website I've played on

      I know only two online chess services, one of which I've written myself, the other being FICS (freechess.org), which AFAIK is the largest free such service out there. Neither of the two systems automatically invokes the draw.

      , but it's actually at 75 moves it legally ends as a draw whether or not you claim it in OTB tournaments. So we were both wrong.

      Enjoy:

      http://www.fide.com/fide/handb...

      Section 9.6

      'any consecutive series of 75 moves have been completed by each player without the movement of any pawn and without any capture. If the last move resulted in checkmate, that shall take precedence.'

      So, what exactly does OTB mean? Genuine question, because so far I assumed it means playing in meatspace using a physical chess board+pieces, which can't be the case if your statement is to be trusted because it somehow seems to not cover tournament games for which the rule you quote does not apply. (Although you're a] using the phrase "OTB tournament" and b] seem to use it to distinguish from online games).
      What is the difference between an OTB game, and a tournament game? The clock (and only the clock?) Because then it would make sense to introduce a rule which limits overall gameplay.

      Go fist yourself.

      Thanks for making obvious that you've realized how dumb most of your statemens in the preceding answer were.

    8. Re:some rules *nearly* never come up by schneidafunk · · Score: 1

      I play chess online every day and have never used that site. Ever heard of chess.com or chessfriends.com? OTB stands for over the board, yes in meatspace. What do you mean it does not apply to tournament games? I was distinguishing between OTB games and online games, because in online games the draws are automatic, which is the case on both of the sites mentioned above. From what I can tell from that horrid website is it's a chess server, without a web interface. So did you actually program the chess rules? Do you have a 'claim draw' option or does it automatically draw (genuine question). I'm very tempted to waste time to play on that server and find out for myself. I have also made a chess website, but it does not have the ability to play other people. It's for analyzing your own games and creating chess puzzles. So congrats on doing that website if you are in fact Alexander Maryanovsky, because I know how hard it is. But your site is terribly out of date and you may want to update not just the UI but also the rules since that handbook I'm quoting is the official handbook that professional chess players use.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    9. Re:some rules *nearly* never come up by schneidafunk · · Score: 1

      Ah interesting, I found a setting that will make it automatically accept a draw, so there is that option on some websites.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
  18. really? by gl4ss · · Score: 1

    purists of what?

    what you can be sure though is that red sector has a better theme than the others.. https://www.youtube.com/watch?...

    --
    world was created 5 seconds before this post as it is.
  19. "which saw a release" by Anonymous Coward · · Score: 0

    I think you mean "which was released", computer programs can't 'see' anything...

  20. The group that brought us Great Giana Sisters by mooterSkooter · · Score: 1

    Does anyone else remember the hacked version of Great Giana Sisters from Red Sector. I assume it's the same people.

    Anyway, completely awesome achievement...It would probably take me ages to write something similiar in a high-level language. Amazing.

  21. "en-peasant" - LOL... by Anonymous Coward · · Score: 0

    I don't think that means what you think it means...

    1. Re:"en-peasant" - LOL... by userw014 · · Score: 1

      Perhaps they mean "en-pheasant"

  22. I want a showdown! by ockegheim · · Score: 3, Interesting

    BootChess vs1K ZX Chess

    Probably a bit like watching snails race, but snail-races can get interesting.

    --
    I’m old enough to remember 16K of memory being described as “whopping”
  23. Kudos by Anonymous Coward · · Score: 0

    The guy who wrote the game in 487 bytes is truly a master of coding and deserves all the respect. And the amount of work that has gone into the game and the readme.txt must be quite awesome. I bet the people who complain the small omissions in chess rules could not code themselves out of wet paperback.

    1. Re:Kudos by Anonymous Coward · · Score: 0

      could not code themselves out of wet paperback.

      Are you deliberately misquoting the phrase "wet paper bag"?

  24. Its even more impressive... by Viol8 · · Score: 4, Interesting

    ... when you consider the ZX81 chess was written in Z80 assembler whereas this is in x86 asm and although both have variable sized instructions the x86 will on average be larger.

    1. Re:Its even more impressive... by Anonymous Coward · · Score: 0

      ... when you consider the ZX81 chess was written in Z80 assembler whereas this is in x86 asm and although both have variable sized instructions the x86 will on average be larger.

      What sort of onboard computer facilities is the x86 version able to use? I assume the ZX81 version would made used calls to various pre-defined routines in the 8K OS/BASIC ROM (safe to say it would have been absolutely impossible to do in 1KB without that), so it isn't "cheating" for the x86 version to do the same... but it does make it hard to compare if the x86 BIOS or other firmware is far more sophisticated and includes routines that the ZX81 version would have had to implement itself (i.e. within the already constrained space).

    2. Re:Its even more impressive... by Anonymous Coward · · Score: 0

      False.
      The provided source utilizes the 16-bit instructions present from the original Intel 8080 processor that are still maintained backward compatible today. The Z80 was mostly compatible with this instruction set, though it did have a few additional instructions. In the 70s-80s, many programmers would write assembler for the Intel 8080 and find that execution (after assembly) on the Z80 comparable and sometimes faster. This solution is probably binary compatible with a Z80 processor.

    3. Re:Its even more impressive... by Viol8 · · Score: 1

      "The provided source utilizes the 16-bit instructions present from the original Intel 8080 processor that are still maintained backward compatible today."

      And probably a number that weren't.

      "This solution is probably binary compatible with a Z80 processor."

      Even at a glance I can see the movsx instructrion which won't be supported by the Z80. I'm sure there are others.

    4. Re:Its even more impressive... by neilo_1701D · · Score: 1

      ... when you consider the ZX81 chess was written in Z80 assembler whereas this is in x86 asm and although both have variable sized instructions the x86 will on average be larger.

      What sort of onboard computer facilities is the x86 version able to use? I assume the ZX81 version would made used calls to various pre-defined routines in the 8K OS/BASIC ROM (safe to say it would have been absolutely impossible to do in 1KB without that), so it isn't "cheating" for the x86 version to do the same... but it does make it hard to compare if the x86 BIOS or other firmware is far more sophisticated and includes routines that the ZX81 version would have had to implement itself (i.e. within the already constrained space).

      Have a look at the ASM for the ZX-81 code. Keep in mind that ROM calls are in the 0..8192 range, and there was no documentation of the system like there is of a modern BIOS today (yes, I'm aware of Ian Logan's Understanding your ZX81 ROM; that book was an introduction to writing assembly on a ZX81, not a ROM dump). From looking at the ZX81 asm (having to stretch my brain to remember Z-80 syntax), it looks to me that the code is completely self-contained. It picks up the display file address (who remembers 2A 0C 40?) from the system variables, but that's ok; all software had to do that. But the rest of the code only calls internal routines.

      A ZX-81 ROM does less than you probably think it does.

    5. Re:Its even more impressive... by neilo_1701D · · Score: 2

      ... when you consider the ZX81 chess was written in Z80 assembler whereas this is in x86 asm and although both have variable sized instructions the x86 will on average be larger.

      Why do you say that?

      My understanding (and if I'm wrong feel free to correct) is that the Z-80 is a bastard clone of an 8080. So, byte-for-byte there should be no difference between the two (if you keep the x86 in real mode). BIOS calls and the need to implement the boot sector code add some guff to the x86, of course, which makes RSI's achievement that much more impressive.

    6. Re:Its even more impressive... by Half-pint+HAL · · Score: 1

      Only if you do a one-for-one mapping of instructions. The x86 can take advantage of more sophisticated opcodes (eg MULT) to cut down on the number of instructions and its general purpose registers to reduce Load and Store calls (with the associated address bytes). I'd expect x86 to be shorter, if programmed correctly....

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    7. Re:Its even more impressive... by Megol · · Score: 1

      Nope, x86 isn't 8080 compatible - the instruction set is encoded in a different way. X86 can't execute Z80 code either.

    8. Re:Its even more impressive... by Megol · · Score: 1

      False.
      Do a comparison of the 8080 and 8086 instruction formats to be enlightened. The 8086 isn't binary compatible with the 8080.

    9. Re:Its even more impressive... by Megol · · Score: 1

      Any assembly language programmer would disassemble the ROM anyway to learn tricks and locate useful routines. Programming microcomputers at that time was much more hands on than nowadays.

  25. Oh do shut up by Viol8 · · Score: 4, Insightful

    Why can't people like you just appreciate the technical accomplishment instead of nit picking.

    Tell you what - why not go away and try and write any type of chess program then get back to us?

    As someone who has written a chess program which even after some code optimisation still came out at ~3000 lines of C, I can tell you this is damn impressive.

    1. Re:Oh do shut up by schneidafunk · · Score: 1, Interesting

      Counter point - It's not chess if it doesn't implement all the chess rules. What it is, is impressive for being half done.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    2. Re:Oh do shut up by angel'o'sphere · · Score: 1

      Counter point: the record is in so far valid as the Z80 predecessor implemented even less rules (I believe the promotion of a pawn was omitted).

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Oh do shut up by schneidafunk · · Score: 1

      I was unaware of that. If the competition is not implementing the full chess rules, then I'm a bit confused on how they call it chess. Is it that hard to add castling and pawn promotion? More likely they wouldn't own the record if they implemented those additional features.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    4. Re:Oh do shut up by angel'o'sphere · · Score: 1

      Well, if you read the thread, the original record is decades old and was on a ZX81 (I believe) ... at least it was a Z80 hime computer with only 1k of memory.
      As the computer only had a very limited AI (if you want to call it that) the game was no real challenge anyway, for some one who had experience.
      Well, 30 years ago, I knew the chess rules 'somewhat' and played quite good. However I never knew that 'rochade' or 'castelation' is a kings move. So I always tried to move the tower first and then the king, obviously every chess program I tried when I was young switched to the other player after I moved my tower.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    5. Re:Oh do shut up by schneidafunk · · Score: 1

      Looking back at the comments, someone posted about the 1k limit after I posted my comment. That makes complete sense if they didn't have the space to implement all the rules.

      The reason that castling is done with the king is because the king cannot legally move two squares, whereas the rook can. So that way it gives players the option of moving the rook without castling.

      --
      Some people die at 25 and aren't buried until 75. -Benjamin Franklin
    6. Re:Oh do shut up by johnrpenner · · Score: 1

      and counterpoint — is it a real chess engine if it doesnt implement MiniMax??

  26. What about Modern Perl? by Anonymous Coward · · Score: 0

    Would that be called "Mad Larry"?

    Uh, oh. Back to work.

  27. Missing rules by Chess_the_cat · · Score: 1

    I'd rather see them take out the graphics and add the missing rules instead.

    --
    Support the First Amendment. Read at -1
    1. Re:Missing rules by PhotoJim · · Score: 1

      We await the results of your effort.

  28. BS: It all depends on processor instruction set by Anonymous Coward · · Score: 0

    Does the processor have a hardware multiply? Does it have indexing? ... Does it have chess built in?

    Given the right processor I can write a full featured chess that can beat grand masters, in 1 bit.

    If the first bit of new process is on, the hardware instruction set implements a complete "play chess" inside the processor. If it is off, then the other bits of the process form a complete machine language implementation like x86 for instance.

  29. It only makes sense by Anonymous Coward · · Score: 0

    It only makes sense that eventually that record would be broken just as this will be. Why? As more processor instructions become available fewer are needed.

  30. Fitting quote by Anonymous Coward · · Score: 0

    Genie: Phenomenal cosmic powers! [shrinks down inside the lamp].
    Genie: Itty bitty living space!

  31. Tic Tac Toe by axelabs · · Score: 0

    I'd like to see their implementation of Tic Tac Toe. Lets have it in the standard 3x3 matrix. Go...

    1. Re:Tic Tac Toe by McFly777 · · Score: 1

      I'd like to see their implementation of Tic Tac Toe. Lets have it in the standard 3x3 matrix. Go...

      "A strange game. The only winning move is not to play." --Joshua/WOPR

      So I guess the Tic Tac Toe game implementation would simply be

      RTS

      --

      McFly777
      - - -
      "What do people mean when they say the computer went down on them?" -Marilyn Pittman
  32. Comments by bradgoodman · · Score: 1

    Why do the comments in the file make me think that I am reading the rants on a bottle of Dr. Bronner's Soap???

  33. About the same as a chessboard by tepples · · Score: 2

    My source states that a checkerboard has 64 squares, like a chessboard.

  34. I can do it in 14 bytes by Andy_R · · Score: 1

    Here's a chess playing program in 14 bytes, written in BBC Basic.

    1 P."I Resign"

    --
    A pizza of radius z and thickness a has a volume of pi z z a
  35. Re:Incredible Cheater! by I'm+not+god+any+more · · Score: 1

    I've noticed that they take a fairly liberal definition of "chess", as they simply discard certain rules, such as en passant pawn capture or castling moves, which are pretty important chess moves. It's a bit hard to argue that this is really "chess" if they just decide to leave out inconvenient rules ("chess lite?"). I probably wouldn't complain about other ommissions such as the 3-repetition rule, but castling?

    Even so, a very cool accomplishment in micro-optimization techniques.

    The game is also a cheat by performing illegal moves. This is not something that counts as a chess program. Queen takes pawn, K moves next to queen - that's a fail.
    abcdefgh9
    r.b.kr..8
    ppq...pp7
    ..n.....6
    ..b.....5
    ........4
    ......PP3
    PPPPK..R2
    R.BQ....1
    c7g3????

    results in:
    abcdefgh9
    r.b.kr..8
    pp....pp7
    ..n.....6
    ..b.....5
    ........4
    .....KqP3
    PPPP...R2
    R.BQ....1
    ????????

  36. The Real Question.... by painandgreed · · Score: 1

    Great, let's just redefine "chess program" to mean "any program that anyone on earth could consider a game." There, now we have all possible chess variants covered you annoying pedant.

    Well, the real question is if this program was replicating the same rules as the one that was previously accepted and supposedly beat?

    1. Re:The Real Question.... by jdschulteis · · Score: 2

      Well, the real question is if this program was replicating the same rules as the one that was previously accepted and supposedly beat?

      Like the previous record holder, this program implements neither en passant nor castling.

      Unlike the previous record holder, this program implements queening, so it is both smaller and has an additional feature.

  37. no underpromotion no en passant NO CASTLING, by Peyrol · · Score: 1

    You say your program plays chess But it's just chessette. I've been to France So let's just dance.

  38. Oh do shut up by Peyrol · · Score: 1

    Yes, it is indeed terrible how people such as myself have to ruin everything. The nit picky truth is such a pain in the fundament. And we were all having such fun too. Obviously I have never written a chess program myself, because if I had, I would surely stand in mute awe at this impressive achievement. And it is impressive; testing out hundreds of versions of code to find the one with the smallest footprint. I would never have the patience to do that. I just agree with Sigma 7 that the record for a program that plays real chess would be of greater interest to me. I don't mind losing 3-time repetition or the 50-move rule. Apparently the vast majority don't mind several other rules trimmed away as well. To each their own.

  39. not bad, but... by jimm.pratt · · Score: 1

    It's pretty clear that the developer put more interest in making a small chess program that in making a good chess program. Not a bad effort, though!

  40. Congratulations but... by Anonymous Coward · · Score: 0

    Great achievement. Congratulations.

    But the comparison with 1K ZX81 Chess is ludicrous because:

    1.) Original 1K ZX81 Chess wasn't even optimized for code size. It was simply optimized to fit as much logic as possible within 1K (including code size, data area, execution stack and even display video memory) since that's all the memory the original ZX81 had available for everything. For instance, the original had extra code to make display video memory smaller than usual.

    2.) It makes no sense to compare programs using different instruction sets. The 80x86 assembly (used in new implementation) is a lot more powerful than Z80 assembly (used in original 1K ZX81 Chess). 80x86 has more registers (thus reducing the need to store intermediate results in memory) and it can perform complex operations (even "multiply" in a single instruction"), etc. So it's no surprise that a 80x86 version would be smaller.

    3.) The claim about "32 year-old record" is bulls**t. This new implementation is almost 200 bytes shorter than original 1K ZX81 Chess, but guess what? Here's an optimized version of original 1K ZX81 Chess from last year, in Z80 assembly, that was also almost 200 bytes shorter:

    http://www.sinclairzxworld.com/viewtopic.php?f=4&t=1476

    1. Re:Congratulations but... by Anonymous Coward · · Score: 0

      Actually creating a smaller program by removing some of the original functionality isn't exactly surprising, is it?

      http://www.dailytech.com/Worlds+Smallest+Chess+Code+is+a+Cheating+Novice+But+Still+Kind+of+Lovable/article37115.htm

  41. 2015 by Anonymous Coward · · Score: 0

    awesome - it's the year 2015 and some headline a bygone tech site brings up memories of TRSI.

  42. Toledo Atomchess by Anonymous Coward · · Score: 0

    Another one in 481 bytes that seems to play better and doesn't make illegal movements Toledo Atomchess http://nanochess.org/chess6.html

  43. ZX81 vs BootChess by johnrpenner · · Score: 1

    it is an impressive feat to contain a chess programme in such a small size (although it doesnt implement MiniMax).

    although smaller — it would be interesting to see the result of a game of ZX81 1K Chess vs BootChess — which engine would win??

    2cents
    j

  44. So what? by Anonymous Coward · · Score: 0

    I can do it in under _ten_ bytes if I'm allowed to arbitrarily ignore whatever rules of Chess I want to.