I started with a dumb question:
Can a Toribash bot learn ABD by fighting itself?
So far, the answer is:
Yes, but only after launching a small army of Toribash clients, building a training league, making a dashboard, and watching thousands of tiny martial artists fold themselves into questionable shapes.
Welcome to
Project Belisarius.
Short Version
Belisarius is an offline/local Toribash AI project.
Current goal:
Train a bot for aikidobigdojo.tbm.
It trains by fighting:
- itself
- random behavior
- older versions of itself
- the current champion
- other strong saved versions
This is
not an online bot.
No public room farming.
No matchmaking nonsense.
No terrorizing beginners while I sleep.
Just local Toribash science.
Current setup:
20 Toribash clients running in parallel.
Current best version:
Belisarius Primus.
The bot plays a match.
Then it plays another match.
Then another.
Then thousands more.
Every so often, the system saves a version of the bot.
Those saved versions fight each other.
A new version is not automatically better just because it is newer.
It has to prove itself against the current champion and other strong versions.
So instead of saying:
"This one is newest, therefore best."
The system says:
"Cool. Now beat the guy who has been throwing everyone else out of the dojo."
That is the important part.
The Belisarius Campaigns
I started naming the project phases because otherwise everything becomes:
"new run 4"
"fix 27"
"why is it fullscreen"
"please stop becoming furniture"
So here is the actual journey.
This was the "can this even work?" phase.
The first goal was simple:
Make Toribash talk to Python.
Toribash runs a Lua script. Python runs the brain outside the game. The Lua side reads the match state, sends it to Python, receives joint/grip actions back, applies them, and advances the fight.
Sounds easy until you remember this is Toribash, Lua, Windows, sockets, and a game client that was absolutely not designed around "please become an AI laboratory".
Main difficulty: getting a stable bridge between the game and the controller.
Improvement unlocked: Belisarius could finally move from outside the game.
Not intelligently.
But he moved.
At this point he was basically a remote-controlled training dummy with ambition.
Once the bridge worked, the next step was making a real training environment.
The bot needed complete matches, resets, observations, actions, rewards, wins, losses, ties, injuries, and match state.
This is where the project stopped being:
"Send random commands to Toribash."
And became:
"Build a place where learning can happen."
The hard part was deciding what the bot should even see.
Toribash is not a clean board game. It has body parts, velocities, rotations, grips, DQ, damage, momentum, and a lot of beautiful nonsense.
Main difficulty: turning a chaotic physics fight into useful information for a learning system.
Improvement unlocked: Belisarius could play full offline ABD matches, collect results, and learn from repeated attempts.
At this stage he was alive.
Not smart.
Alive.
One Toribash client is too slow for serious training.
So the next phase was parallelism.
Many Toribash clients running at once, each playing matches, all feeding experience back into the training system.
This became the "small army of little Belisarii" phase.
The clients also had to stay open across many matches. Restarting Toribash every fight would be painfully slow and unstable, so the system keeps clients alive and reuses them.
Main difficulty: making many Toribash clients behave at the same time without ports colliding, workers dying, windows going insane, or Windows deciding the entire project is a personal attack.
Improvement unlocked: training became fast enough to run overnight and actually produce useful generations.
This was the first time the project felt like a real self-play system instead of a cursed science fair demo.
At some point, watching terminal logs becomes a form of psychological damage.
So I built the dashboard.
The War Room is the control center.
It shows training progress, running clients, evaluation results, model rankings, worker health, and recent stats.
It also lets me launch training, stop it, resume it, evaluate models, watch fights, and play against selected versions.
The dashboard also had to update live without constantly jumping around or blanking graphs like it was trying to dodge taxes.
Main difficulty: making the system controllable and readable while training is running in real time.
Improvement unlocked: I no longer need to babysit console windows and guess what is happening.
This is where Belisarius got a command room instead of a pile of scripts.
This was one of the most important phases.
Early on, it was tempting to treat the newest model as the best model.
That is wrong.
In self-play, the newest model is often just the latest idiot.
Sometimes it is better.
Sometimes it learned a weird trick.
Sometimes it became amazing at beating weak opponents and terrible against strong ones.
So I added evaluations and champion sweeps.
Saved versions fight against random behavior, recent versions, strong older versions, and the current champion.
The winner is not decided by age.
It is decided by performance.
Main difficulty: separating real improvement from noisy training reward.
Improvement unlocked: Belisarius now has an internal league. A version has to prove itself before becoming champion.
This is where "latest" stopped meaning "best".
Beating random opponents looked good at first.
Then it became obvious that beating random does not mean the bot understands ABD.
It just means it can bully something with no plan.
So the training pressure changed.
Belisarius now spends more time fighting meaningful opponents:
- itself
- recent versions
- strong older versions
- the current champion
- finalists from previous sweeps
- only a small amount of random behavior
This makes training harder, but more useful.
Main difficulty: preventing the bot from becoming good at fake progress.
Improvement unlocked: the system now pushes Belisarius toward actual competitive strength instead of just farming easy wins.
This was the "stop congratulating the bot for beating furniture" phase.
ABD is not just "do damage".
If the bot only chases damage, it can learn very stupid habits.
It might get a hit, fall over, DQ, or sacrifice position for a number that looks good but loses the match.
So the reward system became more ABD-focused.
Belisarius now gets shaped around:
- winning
- staying in the dojo
- not self-DQing immediately
- ring control
- edge pressure
- balance
- stability
- useful grips
- injury advantage
- avoiding bad positions
The goal is to reward control, not just chaos.
Main difficulty: teaching the bot what "good ABD pressure" means before the win happens.
Improvement unlocked: Belisarius started showing more stable movement, better survival, and more meaningful fight behavior.
Not always.
But more often than before.
Once the league existed, the next step was making the champion matter during training.
The current champion is not just a trophy.
It becomes part of the training pressure.
New models have to fight the strongest known version often enough that they cannot simply drift into weird habits and still look good.
This is where the project became stricter.
A new version can beat random, have decent reward, and still fail if it cannot handle the champion.
Main difficulty: making training harder without completely crushing exploration.
Improvement unlocked: better versions now have to survive real internal resistance.
The system is less impressed by cheap progress.
This is where Belisarius stopped getting participation trophies.
This one was very Toribash.
Belisarius discovered that if you tripod hard enough, you often do not immediately die.
This was good.
It meant he learned balance.
It was also bad.
Because he started using balance as an excuse to not fight.
The bot was becoming stable, but passive. It could survive, tie, and avoid disaster, but that is not the same as winning ABD.
So the reward system had to change again.
Now the bot gets punished more for boring low-damage ties and inactive stalling.
Balance is still useful.
Tripoding is still allowed.
But becoming furniture is not a strategy anymore.
Main difficulty: keeping the good part of tripod behavior without letting the bot turn into a table.
Improvement unlocked: fights became shorter, more active, and higher damage again.
This was the "stand up, yes, but now actually fight" phase.
This is the current live setup.
Belisarius trains continuously, saves versions, evaluates them, and runs champion sweeps.
The system now asks three separate questions:
Is the latest version learning?
Training stats answer this.
Is it better than weak/random opponents?
Evaluation answers this.
Is it actually stronger than the current best?
Champion sweeps answer this.
That last question is the one that matters most.
The current best version is called:
Belisarius Primus
New versions are still being produced, but they do not become champion unless they earn it.
Main difficulty: keeping long training runs stable while still judging progress honestly.
Improvement unlocked: the project can now run, evaluate, rank, and continue without blindly trusting the newest model.
Belisarius is still not a top human ABD player.
But he is no longer just flailing in the dark.
Now he flails with a ranking system.
Right now, the project can:
- launch multiple Toribash clients in parallel
- keep clients alive across many matches
- train overnight
- save model versions
- evaluate saved versions
- run champion sweeps
- rank models by actual performance
- watch bot-vs-bot matches
- let me play against selected saved versions
- monitor everything from a local dashboard
Current setup:
20 persistent Toribash clients
Current mod:
aikidobigdojo.tbm
Current proven best:
Belisarius Primus
That version became champion through repeated sweep evaluations, not just one lucky batch.
The dashboard tracks a lot of stats, but the simple version is:
Training reward
Shows whether the current training batch is getting more reward. Useful, but noisy.
Win rate
How often the bot wins in evaluation.
Injury delta
Whether the bot is dealing more damage than it receives.
Tie rate
Whether the bot is actually fighting or just surviving forever.
Evaluation score
A combined score from reward, win/loss rate, and injury advantage.
Champion sweep score
The serious one. This comes from internal tournaments between saved versions.
Best version
The version that proved itself best through evaluation/sweeps.
Latest version
The newest version. Sometimes good. Sometimes cursed. Never trusted blindly.
Toribash runs a Lua bridge script.
Python runs the training/controller side.
The Lua script reads the game state, sends it to Python, receives joint/grip actions, applies them, and advances the match.
The bot observes things like:
- body positions
- velocities
- joint states
- grips
- injuries
- match frame data
- selected player
- dojo position
- ABD-specific pressure/ring information
The training system uses many persistent Toribash clients in parallel.
Each client keeps playing matches instead of restarting every fight.
Saved models become checkpoints.
Those checkpoints are evaluated against:
- random behavior
- recent checkpoints
- the current champion
- finalist/strong checkpoints
- sometimes older external champions
The system does not trust raw training reward alone, because reward can improve while real fighting strength does not.
That is why champion sweeps matter.
Toribash is not like a normal board game.
The bot has to deal with:
- body physics
- joints
- grips
- balance
- momentum
- DQ rules
- positioning
- openers
- reactions
- weird emergent nonsense
In ABD especially, the bot cannot just maximize damage like a caveman.
It needs to understand:
- staying in
- pushing out
- lifting
- not falling first
- when to grip
- when not to grip
- how to recover
- how to pressure edges
- how to avoid donating its own body to the floor
That is why this is fun.
And painful.
Mostly fun.
This is still early.
Known limitations:
- the bot is not human-competitive yet
- learning is unstable
- some versions overfit weak opponents
- some learn one trick and forget three other things
- evaluations take time
- training reward can improve while champion strength does not
- ABD reward design is still being tuned
- watching it sometimes makes you question whether intelligence was a good idea
But the pipeline now works.
The system can train, evaluate, rank, and keep going.
Planned next steps:
- better replay/video exports
- more human-vs-bot testing
- more stable champion league logic
- better ABD-specific reward shaping
- more style diversity
- possible specialist bots:
- edge pressure
- anti-grip
- defensive recovery
- aggressive opener pressure
- more reliable comparison against older champions
- eventually trying other mods after ABD becomes more mature
Final Note
Project Belisarius is offline/local only.
No online automation.
No public room botting.
No farming.
No matchmaking nonsense.
Just a local Toribash training project trying to answer a dumb but interesting question:
Can a bot learn Toribash by getting beaten up by itself enough times?
So far, the answer seems to be:
Yes, but first it must suffer.
I will post screenshots, videos, and replays as I get cleaner examples.
For now, Belisarius is awake, training, and still occasionally trying to solve ABD by becoming furniture.
Last edited by AlteredCode; Jun 9, 2026 at 02:23 AM.