I have implemented a simulation of Greenblatts MacHack program in python with the help of the one AI or another ;-)
The following text and pictures have been created with the help of Gemini as well ...
The MacHack VI Python Simulation
In the annals of computer chess history, few programs are as iconic—or as charmingly primitive—as MacHack, the brainchild of MIT’s Richard Greenblatt. Developed in 1967, this PDP-6 assembly-language marvel was one of the first chess engines to trade blows with human players in formal tournaments. Now, over half a century later, I’ve brought this digital grandparent of modern engines back to life using Python and the mighty python-chess library , wrapped in a modern UCI protocol shell. Let’s dive into this retro revival!
The Original MacHack: A 1960s Chess Revolutionary
MacHack wasn’t just a program—it was a statement. At a time when skeptics like philosopher Hubert Dreyfus argued computers could never truly master chess, Greenblatt’s creation proved them wrong. MacHack competed in human tournaments, even defeating a rated player in 1967 (take that, Dreyfus!). Its Elo rating? A modest ~1200-1400 —roughly club-player level. But for 1967, this was *artificial intelligence* in action.
How did it work?
- Restricted width search : MacHack used a brute-force approach, evaluating every possible move up to a fixed depth/time (typically 3-4 plies). No fancy pruning or neural networks here—just raw computation but there was already a selective element to the search.
- Heuristic evaluation : Its board evaluation was rudimentary, focusing on material balance, piece mobility, and basic pawn structure. No endgame tablebases or king safety metrics!
- Assembly-language grit : Written for the PDP-6, MacHack squeezed performance from every byte. Greenblatt later claimed it could search 10 positions per second —a snail’s pace by today’s standards, but revolutionary for the 60s.
Emulating MacHack in Python: Nostalgia Meets Modern Tooling
Recreating MacHack in 2024 required balancing historical accuracy with practicality. Here’s how it came together:
1. Python-Chess as the Backbone
The brilliant python-chess library handled move generation, legality checks, and board states—saving me from reinventing the PDP-6’s wheel. MacHack’s original evaluation logic was ported to Python, with tweaks to mirror its 1960s priorities (e.g., favoring central pawn advances and knight outposts).
2. The UCI Wrapper: Time-Travel Interface
To let MacHack play nice with modern GUIs like Arena, PicoChess , or Cute Chess , I wrapped it in the Universal Chess Interface (UCI) protocol. Now, this senior citizen engine can trash-talk Stockfish 16 (or at least lose gracefully) in a GUI of your choice.
3. Simulating “Retro” Limits
To mimic MacHack’s hardware constraints, I throttled search depth to 5 plies and added artificial delays. Spoiler: On a modern CPU, it still thinks *instantly*.
"But is it really the same?" you ask, your voice trembling. Friend, let me lay out the facts! This is not some pale imitation. This is a FRAME-BY-FRAME, HISTORICALLY-ACCURATE RECREATION!
Check the schematics!
And the best part? NO MILLION-DOLLAR MAINFRAME REQUIRED!
Why Bother? A Love Letter to Computational History
Modern engines like Stockfish or Leela Chess Zero are wonders of optimization and machine learning. But MacHack represents something purer: the joy of early computational problem-solving . Its code is a time capsule of 1960s AI philosophy—proof that even simple heuristics, paired with determination, can breathe life into a board game older than the printing press.
Fun quirks of the emulation :
- MacHack *hates* closed positions. Its evaluation struggles with locked pawn structures, often blundering in blocked middlegames.
- It adores knights. Expect dubious “knight tours” to the edge of the board.
- Time trouble? Not here. The original MacHack had no real-time clock management. But this emulation does..
Play Against History
Want to challenge MacHack yourself? Load it into PicoChess, set the engine level to “1967,” and prepare for a game that feels like teleporting to MIT’s AI Lab. You’ll witness:
- Blunders that make you cringe (but remember: this program is older than *the moon landing*).
- Surprising flashes of cleverness , like tactical forks discovered through brute-force search.
- Nostalgic satisfaction when it hangs its queen.
Greenblatt’s program paved the way for Deep Blue, AlphaZero, and beyond. By emulating it with Python, we pay homage to the pioneers who, in the words of Alan Turing, built “a thinking machine” long before it was cool.
The engine is implemented as python code (no executable) so you have to add it to PicoChess like the other script engines (Turing, Bernstein etc.)
If you don’t know how to do it wait and hope that Randy will eventually add the engine to his images…
Enjoy
Dirk
![]() | |
Am 09.07.2025 um 14:34 schrieb Johan Sjöblom <messi...@gmail.com>:
I have not googled or followed any links here yet, but I am curious to if the original PDF 6 macroassembler code is still readable? I am old enough and have done assembler programming in the early 80s...
--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/0df23ec7-70f5-4a90-8cbd-0f2352f9f40cn%40googlegroups.com.