Blog
Technical write-ups from training a simulated martial artist.
How full is a fighter's brain? A network-size experiment

The AI fighter's network had started trading old skills for new ones. To find out whether it was full, I grew it four ways without changing what it does and trained each beside an unchanged control. The bigger networks got 20–41 % closer to their teachers; in the fight tests, none was clearly better.
Torque and neural visualisation of Muay Thai techniques

What goes on inside the AI fighter while it takes a shove, falls over and throws fourteen techniques: every joint's torque and every neuron of its second layer, shown together. The hips drive the punches, a press wakes over a hundred neurons before the body moves, and the network knows it will fall 1.9 s before it does.
Muscles instead of motors

What if the fighter were driven by muscles, not motors in its joints? It can learn the stance: in 2–3 times the training with simple joint muscles, 5–6 times with 142 muscles including real leg anatomy. It didn't learn to punch, and the reason is a muscle problem.
Correcting the knee

How a Muay Thai technique gets from my body into a simulated fighter: two-phone motion capture, a table of variations, a teacher, a student, and a human check at every step. Then one case in detail: a rear knee that scored well, recovered its balance, and was still wrong.
Shadow clones: four Muay Thai techniques learnt in parallel

Instead of teaching one fighter every new technique in turn, I copied the latest model into one-technique teachers on rented GPUs, then distilled what they learnt back into a single student. Three techniques came back; some clones finished training and were still wrong.
Two fighters and vision: GPU against CPU, optimised

The blocking training has two fighters, vision and a teacher network, so the GPU-against-CPU test was run again on an RTX 5090 and a 96-vCPU EC2 spot machine. After optimising both, the GPU trains it about 3.2 times cheaper per iteration, and faster.
Training on a rented GPU: four and a half times cheaper

Spot CPU machines on EC2 were getting expensive. Moving the fighter's physics onto a GPU, tuning the code for it and trying nine graphics cards cut the cost of training the stance by about 4.5 times.
Blocking: reading a punch you see a tenth of a second late

Twenty runs taught the fighter four Muay Thai blocks, then to watch an opponent and pick the right one. Four times it found a giveaway in the opponent instead of reading the punch.
Footwork: walking to a spot in a Muay Thai stance

Twenty-two runs taught the fighter to step forward, back, sideways and diagonally, and to pivot, without forgetting its punches. Then every rule about how the walk should look made it walk worse.
Faster punches: from trained amateur towards professional

The five punches landed, but at an ordinary person's pace. Seven runs, a policy that sets its own timing, and a stronger elbow brought every punch to the target sooner, and finally landed the cross.
Five punches: the cross, the hooks and the uppercut

Adding four punches to the jab, then air, pads and a heavy bag: ten training runs, a coach's corrections, and a fighter that now throws a near-human combination.
The jab: the simplest punch, and a long lesson

Teaching a simulated fighter to jab: why a punch copied from an animation doesn't survive physics, and how each fix moved the problem somewhere else.
Coaching an AI fighter
A Muay Thai coach on teaching a simulated fighter to punch: why it is so much like teaching a person, and how he does it from his phone.
Learning to balance in a Muay Thai stance

How a simulated humanoid learned a coach-specified Muay Thai stance, then learned to take shoves of up to 860 N without falling and with its guard up.