

Writing A Very Tiny Chess Program
source link: https://www.tuicool.com/articles/hit/yYvUryA
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

When programming for modern platforms, the restraints are different to those of 30 years ago. Back in the dawn of the microcomputer age, storage and RAM were measured in kilobytes. It simply wasn’t possible to store large amounts of graphical data, and even code had to be pared back at times. [reeabgo] found out some of these limitations first hand, when coding a tiny chess program for the Sinclair ZX81 .
[reeabgo]’s project goes by the name ChesSkelet, and is truly tiny. Measuring in at just 377 bytes in its smallest version, the entire program takes up less space than this very article describing it. To achieve these feat requires certain sacrifices, of course. The tiniest edition contains no graphics whatsoever, representing the game state with simple characters and featuring no adornments whatsoever. The full-fat version comes in at 477 bytes and adds quite a lot of functionality. There’s a proper checkerboard, along with move legality checks and pawn promotion.
Unfortunately, advanced chess play isn’t quite possible – castling is not implemented, and the AI doesn’t yet handle check situations properly. Despite this, it’s a solid approximation of the real game, all packed into an impressively small space.
We see plenty of chess hacks around these parts – including the robotic variety .
Recommend
-
33
Almost 25 years after Kasparov vs. Deep Blue, another seminal man vs. machine matchup: Neither competitor has much to be proud...
-
7
I’m giving a talk tomorrow on writing a kernel in Rust. My experience of writing a kernel that it was like jumping in puddles: it’s a lot of fun, and there are a lot of mishaps:
-
14
Let's write a tiny chess engine in GoIn this article we will try to understand how chess engines work by porting the sunfish chess engine to Go. Sunfish is notable for its simplicit...
-
9
Tutorial: Writing a tiny Entity Component System in Rust March 18, 2021 The Entity Component System (or ECS) pattern is all the rage in the Rust game development co...
-
9
Play online chess with real chess board Program that enables you to play online chess using real chess board. Using computer vision it will detect the moves you make on chess board. After that, if it's your turn to move in the onlin...
-
34
Tutorial: Writing a Tiny Rust Game Engine for Web January 12, 2022 In this tutorial we'll use the
-
7
and One Very Tiny Homegrown Cabinet Follow Slashdot stories on Twitter
-
6
A very short introduction to the undeciphered Aegean writing systems The Phaistos Disc – see below
-
4
A Very, Very Tiny Grammar of GraphicsMIT CS Graduate student in EECS Software Design Group. Previously undergraduate member of @uwplse and @uwsampl.Publis...
-
11
Conference, DSP,
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK