Interpretability · Neurons · Torque · Balance · Muay Thai
Torque and neural visualisation of Muay Thai techniques

In short. The AI fighter’s brain is a small neural network: 465 numbers in, two layers of 512 neurons, 48 joint commands out, 50 times a second. I recorded everything inside it, and every joint’s torque, while it stood, took a 260 N shove from four directions, was knocked over by a 900 N one, and threw fourteen techniques. Then I drew the two side by side: the joints glow yellow with how hard their motor pushes, and a panel shows the neurons fire. Standing, no neuron is far from its resting level. A shove wakes 98–146 neurons within 0.16 s, and the fighter steps back into balance every time. The knockdown: the network’s own forecast of how things will go halves 40 ms after the push; the body hits the floor 1.94 s later. A press of a technique’s button lights 108–140 neurons on the very next tick, before the body has moved. Fingerprints: a cross and a rear hook share 28 of their 40 most responsive neurons, a jab and a left high kick share 2. Force: in almost every punch the busiest joints are the hips, not the arms; in the knees and kicks the feet take over.
Why look inside
Every other post judges the fighter from the outside: did the punch land, did it fall, does it look like Muay Thai. On 29 October I asked for something different: a film that shows “how these neural networks are interpreted in terms of what techniques being used, which neurons activated”, because “seeing through the brain of the fighter actually helps our understanding of techniques”. I wanted the torques of the joints too, and to watch the brain react as the fighter goes from balance to being knocked over, gets hit from various directions and has to rebalance.
Looking inside a trained network to see what its parts do is called interpretability. This post is a first, simple pass at it: no new training, just one fighter, recorded carefully, and a way to draw what it does.
The brain being looked at
The fighter is the current student, distill9-196.6M: one policy that has every technique on the try page, distilled from the teachers in earlier posts. Fifty times a second it reads its observation, 465 numbers: the angles and speeds of its joints, how its body is moving, where its feet are, the phase of the stance’s rhythm, and which technique button is pressed. Those pass through two hidden layers of 512 neurons each (an MLP with ELU activations) and come out as 48 numbers: a target angle for every joint’s servo. A second network, the critic, reads the same 465 numbers and gives one: its estimate of how much reward the next few seconds will bring. In the pictures that is the forecast.

Two ways to look
Joint force. Each joint motor has a maximum torque, set so the fighter is no stronger than a person. Every physics step I recorded how hard each one pushed, as a percentage of its own maximum. A joint with several motors (the hip turns three ways) shows its strongest. On the body, each joint glows yellow with that percentage; in the panel’s heatmap each row is a joint and time runs left to right. A percentage of each motor’s own maximum is how close the joint is to its limit, not how much force it makes: the hip’s strongest motor has a maximum of 220 N·m, the elbow’s 90 and the toes’ 30.
Neurons. For the second layer’s 512 neurons I first recorded three seconds of quiet standing, to learn each neuron’s resting level and how much it wanders. A neuron’s response at any moment is how far it is from rest, in units of its own wandering, a z-score:
where is the neuron’s output, and its mean and spread while standing (0.05 keeps a neuron that never moves from dividing by nearly zero). Over 3, I call it lit. In the panel each neuron is a row, sorted by when it peaks, so a wave of activity reads as a diagonal sweep. Bright means far from rest.
Every segment below started from the same reset, in the same stance, and was recorded once at 60 frames a second on the MuJoCo simulation. The robot body is drawn in Blender over the simulated one.
Standing: never still

Standing is never still. The stance has a rhythm, a gentle bounce on the lead foot, and the legs carry the body’s weight through it, so the hips and knees are always working. The neurons hum but never stray: in the quiet seconds not one is lit.
A push from four sides
Then a steel block hits the chest: 260 N for 0.16 s, from in front, from behind, from the left and from the right, each from a fresh start.

Within 0.16 s of the block landing, 98–146 neurons are lit, depending on the direction (front 98, behind 130, left 146, right 144); at their peak 161–174. Over the second after the push, both hips average 60–64 % of their maximum when pushed from the front, and three to five joints touch 95 % or more. The fighter steps and is balanced again every time.
In all four the environment switched on survive mode. It comes on when the body’s capture point, where its momentum is carrying it, heads past the edge of its feet, and goes off once it is calm again. In survive mode the legs may move further from the stance and the only reward is staying up. The network sees the mode as one of its inputs; the recovery itself is learnt.
Do different pushes use different neurons? For each direction I took the 40 neurons that responded most in the second after the push and counted how many each pair of directions share:
| behind | left | right | |
|---|---|---|---|
| front | 18 | 18 | 25 |
| behind | 30 | 18 | |
| left | 16 |

Left and right are told apart most clearly, which makes sense: they need opposite answers. The surprise is that a push from behind and one from the left look almost the same to it. My guess, not something I measured: in its side-on stance, both tip it the same way, over its lead side. Nobody designed this map; it grew out of the millions of shoves in its training.
Knocked over
The same push at 900 N is too big to hold.


The forecast before the push is 555 (the reward it expects over its horizon). Two ticks after the push, 40 ms, it is already below half. It bottoms out at −92 a second later. The body hits the floor at 1.94 s. The network knew it would fall long before it did, and kept fighting anyway: 187 neurons lit at 0.16 s, nine joints at 95 % or more of their maximum. On the ground, it keeps trying.
Pressing a technique
A technique starts with a button: one of the 465 inputs flips from 0 to 1.

On the very next tick, 20 ms later, 108–140 neurons are lit, across all fourteen techniques, before the body has moved at all: the press itself is the cause, not anything the body felt. Then the wave spreads, peaking at 179–232 neurons: up to 45 % of the layer for one technique.
Three techniques switched survive mode on for a moment: the rear hook, the switch knee and the pull counter. For a short time each of them put the capture point past the edge of the feet, so close to falling that the balance rules took over.

Neural fingerprints
Each push and technique leaves a pattern: every neuron’s average response over the second after it. I scaled each pattern to the same size (otherwise the loud techniques all look alike just for being loud), took away the average pattern, and compared each pair with cosine similarity: 1 for the same neurons in the same proportions, 0 for unrelated, negative for opposite.

- The straight punches and hooks share much of their brain. A cross and a rear hook: similarity 0.75, and 28 of their 40 most responsive neurons in common. Jab and cross 0.69 (23 of 40), the two hooks 26 of 40.
- The pushes are a family of their own. Behind and left are the most alike pair of anything: 0.93.
- The rest are individuals. A jab and a left high kick share 2 of 40. The two high kicks share 9, the rear and switch knees 11. Each knee and kick has neurons of its own.
- A shared core. Eleven neurons are in the top 60 of at least 70 % of the techniques: something every technique uses, whatever it is.
The uppercuts don’t join the punches’ block: in the grid they sit with the elbows, knees and kicks, each mostly on its own.
Where the force comes from
The joints tell what each technique asks of the body. For each, the three joints that worked hardest on average in the second after the press:

- Punches: the hips are the top two joints in every punch: the jab (left hip 56 %, right 54 %), the cross (61 %, 49 %), both hooks and both uppercuts. In the rear hook, the rear uppercut and the cross to the body the lower back is next (38–43 %). The arm joints never make the top three, apart from the lead hook’s shoulder girdle (29 %).
- Knees and kicks: the feet take over. The switch knee’s left toes 82 %; the right high kick’s toes 65–66 % on both feet and its right ankle 64 %; the left high kick’s left ankle 69 % and right hip 68 %. The standing foot works as hard as the kicking one: it is the only thing holding the body up.
What this does and doesn’t show
- It shows what goes together, not what causes what. A neuron that lights up during a hook might drive the hook, or only notice it. The next step is to switch neurons off, or hold them at rest, and see which techniques break.
- One take each. Every push and technique is one recording from one start. The counts would shift a little with another start, and with the threshold (3) I chose for “lit”.
- The second layer only. The first layer and the critic’s own neurons aren’t drawn.
- Percent of each motor’s own maximum. Hips and ankles have far stronger motors than elbows, so the same percentage is not the same force.
No one told these neurons what to mean, or the fighter where a punch’s force should come from. Both were found by trial and error in training, and looking inside is a way to read them back out.