TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Chess game in 487 bytes – new record

177 pointsby jamesbrownuhhover 10 years ago

17 comments

baneover 10 years ago
I keep saying it, but the demoscene is probably the 3rd great software movement (after commercial software and open source&#x2F;free).<p>It&#x27;s a weird kind of 3rd way, it&#x27;s not open source, it&#x27;s free as in beer, there&#x27;s tons of help&#x2F;guides&#x2F;talks available, but source is rarely made available due to the competitive nature of the scene. Demogroups (or members of groups) frequently end up in the commercial world and it&#x27;s been C64-&gt;Amiga-&gt;DOS-&gt;Windows for the most part, almost completely skipping Linux, OS X and other x-nix derived platforms (though there are plenty of exceptions). It&#x27;s unusually prolific, there are literally tens of thousand of pieces of software and at least a half million pieces of music produced by the scene...and it&#x27;s almost entirely purposeless with scant few connections to the commercial world.<p>The result is frequently stunning technology <i>and</i> art (and sometimes technology that&#x27;s so elegant it&#x27;s basically art on its own), splinter scenes and a constant showcase of real-time techniques that continue to push what even grizzled computing veterans think is possible.<p>And oh yeah, it&#x27;s mostly populated by people young enough to have not even graduated college.
not_kurt_godelover 10 years ago
It&#x27;s not chess if it doesn&#x27;t allow castle. From the comments (<a href="http://www.pouet.net/prod.php?which=64962#c715279" rel="nofollow">http:&#x2F;&#x2F;www.pouet.net&#x2F;prod.php?which=64962#c715279</a>):<p>&gt; Well... It is clear to me that you put more interest in making a small chess program that in making a good chess program. That&#x27;s understandable even if the result is a program very easy to beat but... you cannot say that BootChess is a complete chess program because it does not allow to castle (didn&#x27;t tried promotions, underpromotions, en passant pawn captures, stalemate... but I bet that are not supported, are they?) and, worst, it does not care about avoid to place a King in check. Every chess player knows that it is illegal (the movement CANNOT be made) to place your king on a square controlled by your rival pieces. If you allow it, then this is not chess.
评论 #8956285 未加载
评论 #8956181 未加载
评论 #8958979 未加载
评论 #8958980 未加载
rwmjover 10 years ago
I&#x27;m glad they mentioned 1K chess for the ZX81 [1] which I remember typing in from a magazine listing, and then playing against quite a lot (it was better than a 10 year old me). Neither program is capable of castling.<p>[1] <a href="http://users.ox.ac.uk/~uzdm0006/scans/1kchess/" rel="nofollow">http:&#x2F;&#x2F;users.ox.ac.uk&#x2F;~uzdm0006&#x2F;scans&#x2F;1kchess&#x2F;</a>
评论 #8955270 未加载
Impossibleover 10 years ago
In the readme file (BootChess.txt) He quotes a great HN comment thread (<a href="https://news.ycombinator.com/item?id=7940938" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7940938</a>) from (<a href="https://news.ycombinator.com/item?id=7940212" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7940212</a>), a 128 byte raycaster written by the same author. The title of that section is &quot;Proving know-how remains valued&quot;. This post has already generated some similar gems like this one (<a href="https://news.ycombinator.com/item?id=8954853" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8954853</a>).
评论 #8955348 未加载
fcambusover 10 years ago
Nice to see this appear on HN!<p>For info the author also released an impressive serie of very tiny intros ranging from 64 to 256 bytes which can be found on his personal site : <a href="http://olivier.poudade.free.fr" rel="nofollow">http:&#x2F;&#x2F;olivier.poudade.free.fr</a>
ehambergover 10 years ago
The README file is really interesting: <a href="http://lpaste.net/119343" rel="nofollow">http:&#x2F;&#x2F;lpaste.net&#x2F;119343</a>
评论 #8955747 未加载
评论 #8956043 未加载
morcheebaover 10 years ago
Source code: <a href="http://olivier.poudade.free.fr/src/BootChess.asm" rel="nofollow">http:&#x2F;&#x2F;olivier.poudade.free.fr&#x2F;src&#x2F;BootChess.asm</a>
ctdonathover 10 years ago
For interesting contrast: Toledo Nanochess <a href="http://www.nanochess.org/chess3.html" rel="nofollow">http:&#x2F;&#x2F;www.nanochess.org&#x2F;chess3.html</a> is the smallest C implementation of a full &amp; decent chess program.
fuzzywalrusover 10 years ago
Couldn&#x27;t get the OS X binary to mount and I&#x27;ll have to fire up a VM to try a different binary.<p>However there is a nice txt file, Bootchess.txt that has some interesting excerpts. I was curious if it has an AI, to which it does:<p>&quot; Usually the heart of any midly advanced computer chess games includes a MinMax function (or its unique call merging sister function NegaMax) called recursively evaluating both sides&#x27; possible moves and trying to minimize loss whilst maximizing captures : each evaluation pair rundown is called a &quot;ply&quot; in chess jargon. It can take Kasparov some 27 moves to battle a 3-ply and the champion programs competing with grandmasters usually have at least 5-ply. In the case of BootChess there is alas not enough space (512 bytes binary program size and 640 bytes RAM execution environment) for such level of sophistication. It uses a variant : while maximizing captures it tries to minimize the taxi&#x2F;Manhattan distance to the opponent&#x27;s black king rank. This weaker ai element combination will be named &quot;TaxiMax&quot; for the occasion and can be viewed as a half-ply plus.&quot;
tluyben2over 10 years ago
Very nice to see that the RSi guys (who I have been a fan of since the begin 90s; especially the Amiga stuff was very impressive, both in skill but also art) still take challenges like this one. Disadvantage here is that whenever I click a Pouet.net link, I can pretty much say farewell to my productive day...
darkmightyover 10 years ago
With such a small number of bytes wouldn&#x27;t it be viable to run some sort of optimization to minimize the code even further?
aaron695over 10 years ago
Does it run on a ZX81? If not I&#x27;d guess it might be using short cuts not available on the original machine.<p>Easy way to get them smaller and be legitimate chess (This seems to be missing half the rules) would be let white move, then resign. You might have to allow white to resign &#x2F; offer a draw as a move as well.
fsiefkenover 10 years ago
That would include 1) rules for the movement 6 chess pieces 2) board definition and initial setup 3) end conditions 4) exceptions. A tweets lenght worth of each, neat.
评论 #8956954 未加载
rinjipalover 10 years ago
Oh ! and this one is a PC boot sector. Sexy
jpwagnerover 10 years ago
reminds me of the runner-up in the first js1k competition (even better): <a href="http://js1k.com/2010-first/demo/750" rel="nofollow">http:&#x2F;&#x2F;js1k.com&#x2F;2010-first&#x2F;demo&#x2F;750</a>
tempodoxover 10 years ago
WTF??? What is that page?
RIMRover 10 years ago
Yeah, well this guy can launch a GUI in zero bytes! Beat that!<p><a href="http://www.pouet.net/prod.php?which=18860" rel="nofollow">http:&#x2F;&#x2F;www.pouet.net&#x2F;prod.php?which=18860</a>