Skip to content

Published 23 October 202630 min

Inside The Way of the Exploding Fist: How the Computer Fights You

Press play to watch here. The video loads from YouTube only then.

How did a 48K Spectrum game decide how to fight you, and why can one short kick beat it so reliably?

From 59 drawings shared by both fighters, we follow a move through impact, distance, scoring and the opponent's prepared replies, then test the game's reputation for intelligence in 1,980 controlled bouts.

See one fighter drawn twice, a hit decided without pixel contact, simultaneous kicks cancelled by aiuchi, 10,000 lose to 9,800 in one build while the Spanish release gets it right, and six simple robots reveal why the short jab dominates the early ranks but collapses at seventh Dan.

Watch on YouTube

Sources

Every fact in the film is tied to a quotation from a source. These are the 24 published ones, most cited first.

  1. The Way of the Exploding Fist: the game's instructions (Spectrum Computing)spectrumcomputing.co.uk · cited 16 times
  2. The Way of the Exploding Fist (Spectrum Computing)spectrumcomputing.co.uk · cited 16 times
  3. The Way of the Exploding Fist (EUG #67) (Electron User Group)acornelectron.co.uk · cited 10 times
  4. The Way of the Exploding Fist: tips and pokes (The Tipshop)the-tipshop.co.uk · cited 6 times
  5. Way of the Exploding Fist, CRASH 21 review (crashonline.org.uk)crashonline.org.uk · cited 5 times
  6. Sinclair User 43: Spectrum Software Scene (sinclairuser.com)sinclairuser.com · cited 4 times
  7. The Way of the Exploding Fist (Melbourne House, 1985) (FRGCB (blog))frgcb.blogspot.com · cited 3 times
  8. The Way of the Exploding Fist, ZX Spectrum version ported to JavaScript (cookertron (GitHub))github.com · cited 3 times
  9. the_way_of_the_exploding_fist/docs/PROVENANCE.md at main · cookertron/the_way_of_the_exploding_fist (GitHub)github.com · cited 3 times
  10. Way of the Exploding Fistgamesexplained.com · cited 2 times
  11. Your Computer, August 1985 (Internet Archive)archive.org · cited 2 times
  12. The Way of the Exploding Fist: SkoolKit disassembly (Paul Maddern (GitHub))raw.githubusercontent.com · cited 2 times
Show all 24 sources
  1. Way of the Exploding Fist: mechanics (Commodore 64) (Games Explained)gamesexplained.com · cited 2 times
  2. ZX Spectrum graphic modes (Wikipedia)en.wikipedia.org · cited 2 times
  3. Tournament Rules and Regulations (Yale Karate)karate.sites.yale.edu · cited 2 times
  4. Z80 CPU User Manualzilog.com · cited 2 times
  5. Sinclair User 45 (sinclairuser.com)sinclairuser.com · cited 2 times
  6. pobtastic - Overview (GitHub)github.com · cited once
  7. The Way Of The Exploding Fist: Routinesskoolkit.arcadegeek.co.uk · cited once
  8. Commodore 64 games explainedgamesexplained.com · cited once
  9. Mask (computing) (Wikipedia)en.wikipedia.org · cited once
  10. ZX Spritesoldmachinery.blogspot.com · cited once
  11. The Way of the Exploding Fist (Spectrum Computing)spectrumcomputing.co.uk · cited once
  12. The Way of the Exploding Fist (Spectrum Computing)spectrumcomputing.co.uk · cited once

Our own research: 13 records of the experiments, measurements and readings we made for this film, cited 496 times.

Transcript

The narration as it is spoken in the film, chapter by chapter. Pick a time to play the film from there.

Read the full transcript

It Sees the Kick Coming

0:12Watch the shaded fighter. That's the computer at ninth Dan. The black fighter has barely begun a high kick, but before the kick leaves its first pose, the computer's high block is already up. Sinclair User thought it seemed to be thinking four moves ahead.

0:35Now give a robot player one instruction: use the short jab kick, and nothing else. Against the novice, that wins by two full points to none.

0:57Both opponents use the same system. One seems to see a kick before it happens. The other walks into the same kick again and again. Inside the 48K Spectrum, drawings, distance tables, prepared replies and deliberate hesitation create its apparent intelligence. They also create the weakness that one modest kick can exploit.

The Challenge: “BEAT THIS”

1:22The cassette inlay challenged the buyer with two words: “BEAT THIS”. The Spectrum release cost eight pounds and ninety-five pence. CRASH awarded it ninety-two per cent, while Sinclair User gave it five stars and called it one of the finest sports simulations it had seen. The opponent's apparent intelligence was part of the attraction, but so were fighters that seemed unusually large, fluid and physical.

2:03Gregg Barnett designed the game. He described making the computer play intelligently as its hardest problem. The surviving credits disagree over who did what on the Spectrum version.

2:25The Spectrum program has also been studied before. Paul Maddern used SkoolKit to turn the game's machine code back into annotated instructions and published the result. The developer known as cookertron rebuilt the game in a browser from the code written for the Spectrum's Z80 processor. A separate gamesexplained teardown examined the Commodore original. Our measurements build on that work, with simple robot players fighting controlled bouts.

One Fighter, Drawn Twice

3:03The game stores fifty-nine fighter drawings in 12,428 bytes. That is nearly enough memory for two complete Spectrum screen pictures. The last drawing ends just eight bytes before the work area where the program assembles the fighters over the scenery.

3:30Those drawings serve both fighters. A lookup table reverses each group of eight pixels when a fighter faces the other way. Two more tables preserve the outline but checkerboard the inside for the second fighter. It is the same fighter drawn differently.

3:56A common way to place a moving figure over scenery is to store a second silhouette, called a mask, that clears a fighter-shaped hole before the figure is drawn. Fist stores no fighter masks. Each row keeps only the bytes containing part of the body. The program derives the mask from those picture bytes as it draws, and clears one extra pixel around the edge. Patterned scenery therefore leaves a narrow border around the fighter.

4:34Each scene is built from small picture tiles used again and again. One map records where each tile goes. When the same tile repeats, the map stores one run instead of one entry for every copy. A separate map holds the colours. Across all three scenes, this tiled form uses little more than half the memory required to lay out the same scene areas directly.

5:08The joystick supplies up, down, left, right and fire. Two direction tables turn the eight directions, with and without fire, into move codes. Each code is a number naming the move to perform, selected according to which way the fighter faces. Forward therefore remains forward after the fighters change sides. The fighting system contains eleven attacks, including a jab punch and the separate short jab kick.

The Only Frame That Hurts

5:53An attack can score on only one stored drawing, its impact frame. The rest of the animation sells the movement. For the program, one frame decides whether the blow lands.

A Hit Without Pixel Contact

6:15A later retrospective called the collision detection pixel-perfect. Gregg Barnett, the designer, had written an editor to plot every impact one animation frame at a time. He said the resulting hits were always accurate. The Spectrum does not test the fighters' visible pixels. For every attack against every defender pose, the reach table supplies one number: its reach. That's the widest gap from which that attack can hit. On the impact frame, the program compares that reach with the actual gap. This sets the outer limit. A blow can also be too close, which becomes part of the scoring rule. One distance unit is two pixels. The computer's short jab kick can hit an outstretched mid-kick pose from ten units, but the short-jab-kick pose only from five. Your chosen attack changes how easy you are to hit.

7:26A special table value marks a pose that a particular attack cannot hit from any distance. That is how blocking works in the hit test. The low block carries this value against four attacks, including the short jab kick. The high block carries it against four others, including the high kick.

7:55The precision is real, but it was authored into tables before the fight rather than calculated from touching pixels during it.

The Judge Has a Ruler

8:05Once a blow is within reach, the scoring routine asks how far inside that reach the gap is. The reach is the outer edge. At that exact gap, or within a narrow margin of one to three distance units inside it, depending on the attack, the blow earns a full point. Closer still earns half a point until it passes a second limit. Depending on the attack, that limit lies between three and ten units inside the reach. Farther than the reach misses. Nearer than the second limit is too close. So a blow scores best near the limit of its reach, less well closer in, and not at all when it is too close.

8:59The game keeps two ledgers. Yin-yang symbols count karate points, in halves, and the first fighter to four halves wins. The numerical score values the move separately. A full short jab kick adds 200, while a flying kick or roundhouse adds 1, 000, but each advances the bout by one full karate point.

9:28The fight advances in updates, each one a pass through the fighting logic. If both fighters are hit on the same update, neither scores. Karate rules call simultaneous techniques of similar intensity aiuchi. The program enforces that principle by awarding points only when exactly one fighter is being hit. Watch two mid kicks land first on the same update, then with the second kick started one update later.

10:09One update turns a scoreless exchange into half a point.

When Ten Thousand Loses

10:14When a one-player clock expires, the judge compares karate points, then the numerical value of the scoring moves. If both are equal, the bout is fought again. Two-player mode is decided by score after four timed bouts. The original stores each score as three pairs of decimal digits and compares the highest pair first.

10:43Player one has ten thousand, which the game keeps in hundreds. That's zero zero, zero one, zero zero. Player two has nine thousand eight hundred. That's kept as zero zero, zero zero, ninety-eight. The first pair is equal, the second puts player one ahead, but the routine fails to stop. At the third pair, player one's zero zero loses to player two's ninety-eight, and the game wrongly gives player two the result.

11:21The same error can reject a new best score. On the Melbourne House build, a 10,000 to 9,800 match leaves 9,800 recorded. The 1985 Erbe release uses the same fighting system but repairs this comparison. It keeps 10,000. The later Dro Soft and Ricochet tapes retain the original mistake.

What the Computer Sees

11:58Now to the opponent. On every fight update, the computer reads the move its opponent is making. It doesn't inspect the picture. It reads the move code produced as soon as the joystick input was accepted, while the animation may still be showing its first pose. It isn't predicting the next four moves. It's seeing the current one very early. The decision begins with one of three situations. First, if your attack is in range, the computer may wait and then choose a prepared reply. It can use the block or dodge assigned to that attack, use its assigned counter-attack, or fall back to a short jab kick.

12:49Those replies are specific. On the block-and-dodge branch, high attacks can bring a high block, lower attacks a low block, and a sweep a jump. On the counter branch, a short jab kick can bring a flying kick, a mid kick can bring a forward sweep, and a forward sweep can bring a forward somersault.

13:20The opponent climbs eleven ranks. The novice is level zero. First Dan is level one, and the numbers continue together up to tenth Dan, level ten. Which replies are available depends on the rank's answer mask. Here, an answer mask is a number used like a row of on-off switches, limiting which reply branches the computer can choose.

13:53The second situation is when you're blocking. Then it attacks the open height. After a scripted player blocked low, every next attack from the computer was high. After a high block, every next attack was low or middle.

14:17The third situation is when there's no attack to answer and no block to exploit. Then it manages the gap. It looks up a move in a table arranged by distance and shifts the choice by a random amount, so the same gap does not always bring the same move. It can approach, settle at a useful range and attack from there. A robot that merely stood still won none of its thirty bouts against any rank.

14:54The random value comes from a counter inside the Z80 processor that changes constantly as the chip refreshes memory. Read at a varying moment, it serves as a dice roll. The result varies, but the repertoire is fixed. Once selected, the computer's move passes through the same fighter animation, timing and hit rules as the player's.

The Opponent That Forgets

15:19The clearest difficulty control is not greater knowledge. It is hesitation. The longest answer wait is fourteen fight updates for the novice, six at first Dan and two at second Dan. From third Dan onwards, this response delay disappears. Watch when the kick starts, and how many updates each opponent stands before its block rises.

15:56The novice is not failing to recognise the high kick. It has recognised the move and is being made to dither. At ninth Dan, the same answer can begin while the attacker is still displaying the kick's first pose. That looks like foresight because the computer reads the move code before a human viewer has seen much of its animation. Barnett later described building the opponent from variables for aggression, defensiveness, speed, blocking and counter-attacks. He also listed favourite moves, sequences and learning. He said he began with the best opponent and deteriorated those attributes to make the weaker ones. On the Spectrum, the learning part has a clear verdict. The opponent keeps no record of how you have played. Everything it writes goes into fixed working bytes, and those values are reset after every point and at the start of every bout. There is no growing history of your favourite move and no adaptation that punishes it later.

17:01It reacts. It varies. It does not learn the player.

The Sweep That Was Fixed

17:12In December 1985, Sinclair User printed Waheed Ahmed's advice to sweep the early Dan ranks because leg sweeps were “the most effective and cannot be blocked”. The wording is technically right. On the block-and-dodge branch, the computer jumps a sweep rather than blocking it. That jump was its first response to ten to eighteen per cent of sweeps against the first three opponents, and roughly a third or more at many later ranks.

17:50The answer mask limits the computer's dice roll. At fifth and seventh Dan, it cannot select the block-or-dodge branch. Against a forward sweep, their counter branch chooses a forward somersault. But zero remains possible after every rank's mask, and zero sends the computer to its fallback, a short jab kick. Barnett said the Commodore game's repeated-sweep weakness had been fixed on the Spectrum. The Spectrum code does give the forward sweep a prepared answer: a jump on the block-and-dodge branch, or a forward somersault on the counter branch. A sweep-only robot won no more than nine of thirty bouts at any rank, but that doesn't prove every repeated-sweep tactic fails. The robot often crossed behind its opponent and swept the wrong way, and many bouts ended in draws.

18:51So the period tip's literal point survives: the computer does not block the forward sweep.

The Kick That Protects You

18:58The more effective one-move tactic in our tests is less dramatic: the short jab kick. In 1990, Your Sinclair called an unspecified “kick-in-the-shins” the one-player game's downfall, saying repeated use could reach tenth Dan within minutes. The magazine did not identify which control move it meant. The robot tested the short jab kick explicitly.

19:30The comparison uses six simple robot players across thirty bouts at each of the eleven ranks. One stands still. The others repeat only the short jab kick, mid kick, high kick, flying kick or forward sweep. Each kicking robot walks forward and attacks when the gap reaches its chosen trigger distance. Those distance units are the same two-pixel steps used by the hit and scoring rules. The results show how the computer handles a repeated tactic, not how well a person plays. Standing still won nothing. The sweep rarely worked. The short jab kick, however, won at least twenty-eight of thirty bouts against each of the first five opponents, from the novice through fourth Dan.

20:30Its frame strip first suggests speed. The short jab kick reaches its impact frame on its second stored drawing, while the mid kick needs three. But an animation frame here is a drawing, not an update of the game logic. When both sequences are placed on the update timeline, they reach their impact frames on the same update. The short jab kick is not winning merely by scoring sooner.

21:06For a fair spacing test, both robots used the same trigger: twelve distance units. Against the novice through fourth Dan, about one kick in five scored for each. The striking difference was at the other end of the exchange. Across those five ranks, the computer landed twenty-nine scoring hits against the short-jab-kick robot and one hundred and seventy-eight against the mid-kick robot.

21:43While your fighter kicks, it holds one of that kick's poses, and the computer's blows are tested against that pose through the reach table. Most of the computer's scores against the mid-kick robot came from its own short jab kick, an attack it can choose ordinarily or use as its fallback reply. That attack can hit the outstretched mid-kick pose from ten distance units. To hit the player's short-jab-kick pose, it must be within five. Kick with the short jab kick, and that common computer attack has only half the reach. Against the mid-kick robot, the computer's short jab kick scored in one hundred of one hundred and thirty-two hit tests. Against the short-jab-kick robot, it scored in only two of one hundred and sixty-four. The rest were beyond its stored reach.

22:48The short jab kick also has useful targets. It repeatedly scored against a computer caught crouching or sweeping. The reach tables mark all those low drawings unhittable by the mid kick, and every mid kick aimed at them failed.

23:13Remember the computer's prepared counter to the short jab kick, the flying kick. Against the five easiest ranks, the computer chose that counter only twenty-one times in a hundred and fifty bouts. The counter almost never comes.

23:37The modest kick succeeds through a combination the system happens to favour. Its pose is difficult for the computer's own short jab kick to reach. It can hit low poses the mid kick cannot touch. Add the easier opponents' hesitation, and one repetitive move becomes remarkably difficult to punish.

The Seventh-Dan Trap

24:05Then comes seventh Dan. With the robot attacking at a trigger of twelve distance units, the robot won only one of thirty bouts.

24:23Seventh Dan has no answer wait. Against the short jab kick, it does not select a block or dodge. It normally chooses the prepared flying-kick counter, although the fallback remains possible. Fifth Dan answers this kick the same way, yet the robot won fourteen of thirty there. The major difference is another kind of hesitation. While walking in, fifth Dan can stop for a random number of updates. Seventh Dan never stops. Give fifth Dan that refusal to pause and the robot's wins fall from fourteen to six. Give fifth Dan's pause setting to seventh Dan and the robot's wins against it rise from one to twenty-five. No other single setting changed the result by more than five bouts.

25:24After each point, the fighters return to the same marks. With no pauses, seventh Dan repeats the same approach rhythm, so the same spacing tends to return. Fifth Dan's pauses shift where its strides fall and where the fighters meet. At trigger twelve, the robot commands its kick while the gap is twelve. During that update, the computer's scheduled stride closes three distance units, so the kick's first pose appears at nine. The computer sees the kick between strides and selects its counter without waiting. On the next update, the flying kick begins instead of another stride, still at nine. When the short jab reaches its impact frame, that take-off drawing can be hit only from eight units or closer. The robot misses by one.

26:23Now set the trigger to ten. At twelve, the robot keeps walking. The computer's next three-unit stride closes the gap to nine, and the robot presses its kick one update later. Its first pose again appears at nine, but this time the computer sees the kick on an update when another stride is due. It selects the counter at once and completes that two-unit stride during the same update, closing the gap to seven. The flying kick begins on the next update. Its take-off drawing is now inside the short jab's reach of eight.

27:08All fifty-seven kicks that met that take-off pose at the closer spacing scored. The new robot won twenty-seven of thirty bouts against seventh Dan. The change moves the weakness rather than removing it. At eighth Dan, the closer-trigger robot fell to one win in thirty, with about half its tested kicks meeting the low block, a pose the short jab kick cannot hit. The original trigger-twelve robot later recovered to sixteen wins at ninth Dan and eighteen at tenth.

27:48A December 1985 Sinclair User tip said that after tenth Dan, the computer becomes the same as first Dan. It never does. Beyond tenth Dan, each opponent randomly receives the settings of seventh, eighth, ninth or tenth Dan.

What Its Intelligence Really Was

28:14The computer was not thinking four moves ahead. It was reading the move already under way, measuring the gap and choosing from a compact set of authored replies. Each rank's settings decide whether it waits, whether it pauses on the way in, and which replies its answer mask allows. Depending on the rank, it can block the correct height, jump a sweep, counter the move or attack the opening you offered. That is also why the system can be broken. The opponent reacts but never remembers. The reach table gives the computer's own short jab only half as much reach against the player's short-jab pose as against the mid-kick pose. Yet the player's short jab can still score against crouches and sweeps the mid kick cannot touch. Pauses alter where the fighters meet. At seventh Dan, one stride changes the flying kick from an answer into a target.

29:28Within 48K, the achievement is not an opponent that learns like a person. It is the illusion created when sensible fixed replies meet timing, distance and just enough hesitation. The computer does not outthink you. It reads what you have started. The short jab wins because its reach values fit that small world unusually well. At seventh Dan, a single stride decides which fighter has the answer.

29:59If you enjoy taking old machines apart without taking the fun out of them, subscribe to Retro Computer TV. And if this one landed cleanly, you can like the film.

Credits

Every image, clip and piece of music in the film, with its licence and where it came from: the film's credits.

More on ZX Spectrum