EXPcaliburINSIDE THE MACHINE

00 / ORIENTATION

Start here: how EXP is earned

You upload a program that controls a knight, which the code calls hero. The knight defeats enemies, and the enemies drop gems that the knight collects for EXP. The compiler, VM, engine, and grader each have a different job. We follow one gem first, then look at each part of the system.

The pixel-art EXPcalibur title sword from the repository

Start with a single enemy, not the proof system

The level-one knight starts with 46 HP and 30 total EXP, and a basic spider has 14 HP. One ordinary hit does 12 damage, so the first hit leaves the spider at 2 HP. The knight has no new EXP yet.

Event Spider Knight EXP Knight HP
First successful hit 2 HP remain 30 46
Cooldown completes; second hit Defeated; drops a 3-EXP gem Still 30 46
Gem is collected Gone 33 118 after leveling

The second hit defeats the spider, which drops a gem worth 3 EXP. The counter stays at 30 until the knight collects the gem, and that pickup raises total EXP to 33.

The first level threshold is 32 EXP, so the knight reaches level two. Its maximum HP rises to 118, and its current HP refills to 118. A hit, death, drop, pickup, and level change are separate events.

This example keeps the spider's starting stats fixed and omits the time between events. In a real run, enemies move, attacks have cooldowns, gems fall, and objects can collide. Later enemies are stronger, and the world chapter explains those details. First, follow the path from a hit to EXP.

Follow three EXP from enemy to knight

This example uses fixed positions and omits time between steps. Knight, enemy, and gem sprites come from the game. Use the steps to see what changes—and what has not yet changed.

Keep three jobs separate. The pilot chooses where to move and aim, while the world decides the results of those requests. The selected engine can change the knight's power, but it cannot add EXP directly. The world must still resolve the fight and gem pickup.

Follow one gem from bot request to EXP

Bot: “aim there”The bot asks the host to change aim.
World: “that hit”The game checks position, timing, damage, and enemy HP.
Gem: “collected”Only collection adds the gem's value to EXP.

The engine can make the knight stronger. The world still checks the attack and pickup.

More damage could let the knight defeat the spider in one hit. A stronger magnet could bring its gem in sooner, but neither bonus adds EXP directly.

The whole challenge on one page

This map has three parts. At the top, you build the bot once. In the middle, the VM, engine, and world work each tick. At the bottom, the game records EXP from collected gems. On the next tick, the bot can scan again and see the changed world. That is why the whole challenge is a loop.

Two routes to power; one route to EXPTwo routes to power; one route to EXPBUILD ONCE · THE UPLOAD FIXES THE ENGINEBot sourceReadable pilot and powerwork.CompilerEmits guest instructions.Upload + modeRunner fixes the enginefor this run.compilepackagefixed imageEACH TICK · THE BOT ASKS; THE WORLD DECIDESOuter VMReads a world copy.Runs the bot.Requests aim andmovement.CLASSICVM behavior fills fadingmeters.ABYSSChecked inner work canearn a short boost.WorldUses selected powerplus action requests.Resolves combat andpickups.Aim and move travel directly; next tick the VM reads this changed world.SCORE · SHARED BY BOTH ENGINES+ EXPFightA real kill can drop a gem.CollectA pickup banks its value.RecordEXP, level, and replay persist.Power helps the knight. The score still comes from picked-up gems.
From a written decision to collected EXP. Follow the arrows, not just the boxes. CLASSIC and ABYSS are alternative routes through the middle of the system; the ordinary movement, combat, and pickup loop exists in both. View diagram at full size
Build onceSource → compiler → uploaded programThe upload fixes its engine: CLASSIC or ABYSS.
Repeat each tickOuter VM runs the botIt reads copied observations and asks to aim or move.
CLASSICVM behavior fills fading power meters.
ABYSSChecked inner work can allow a short boost.
The shared gameWorld resolves the actionMovement, hits, enemy deaths and gem pickup happen here.
What gets scoredCollected gems add EXPThe changed world becomes the bot's next observation.

The compiler turns bot code into instructions, and the outer VM runs those instructions. A host call sends a request from the bot to the game. For example, the bot can request an enemy scan, change its aim, or move. The world stores the live knight and enemies, and it decides the result of each request.

CLASSIC measures what the outer VM does and fills power meters. ABYSS adds a second machine, and the host checks its work before allowing stronger effects. Later chapters explain those checks. Both engines can change limited game settings, including damage, survival, and gem pickup range.

Two names run through this guide. CLASSIC engine means EconomyMode::ClassicLegacy, and ABYSS engine means EconomyMode::DeviceV4. Code excerpts keep the original identifiers, while the surrounding explanation uses the engine names.

The reading route: one game, two engines

The first six chapters explain the game that both engines share. Then the guide follows each engine. CLASSIC and ABYSS earn power in different ways, but both give it to the same knight, inside the same EXP loop. The last chapters compare the reference bots and explain how seven matches produce one ranked score.

Read the common game first, then pick an engine
START HERE · CHAPTERS 00–05Learn the shared game

Follow a bot from source code to scan, move, swing, gem pickup, and EXP. Every later power boost feeds into this loop.

Follow one bot through the system
THEN CHOOSE THE POWER ROUTE YOU WANT TO STUDY
CLASSIC · CHAPTER 06Keep the meters fed

Recognized VM behaviors fill fading meters. Those meters become limited bonuses for the knight.

Explore CLASSIC's 41 chains
ABYSS · CHAPTERS 07–11Earn checked proof

A second machine runs bounded work. The host checks it, saves proof, and may allow a short boost.

Enter the ABYSS engine
BOTH ROUTES RETURN TO THE SAME KNIGHT, ENEMIES, GEMS, AND EXP
FINISH · CHAPTERS 12–13See what the bots achieved

Follow the reference builds and pilots, then see how seven seed runs yield one ranked score.

Compare the reference bots

Need a definition? The glossary is always there.

One name needs care: CLASSIC has a chain called ABYSS, which is not the ABYSS engine. The shared chapters still apply if ABYSS is your goal. Its proof can change damage or pickup range. But the world still decides whether the spider dies and whether the knight collects its gem.

Find a chapter by question
Your questionRead thisWhat it unlocks
Who runs the bot and moves the knight?Follow one botThe bot asks; the game decides.
How does the bot choose a target?Build the pilotStart with a small steering loop.
How does source become a program?Decisions become bytesThe compiler writes VM instructions.
What does the VM do?Bytes become actionsMemory, stack, time limits, and host calls.
When does a kill add EXP?Actions become a scoreHits, drops, pickup, and leveling.
How does CLASSIC add power?CLASSIC engineChain checks, fading meters, and limited bonuses.
How is ABYSS different?ABYSS engineA second machine saves checked work.
What must its requests pass?ABYSS surfaceEntry, Rift, Chasm, and module checks.
How does the inner machine run?The GateCells, work limits, and host verification.
Why does proof limit power?Proof and authoritySaved checks set a level ceiling.
How does power affect the fight?The economyBoosts change damage, survival, and pickup.
Which bots got the scores?Reference botsBuild choices, pilots, and measured results.
How is a result ranked?The platformSeven runs produce one median entry.

All route links stay inside this guide, and code appears beside the facts it helps explain. Each code block has a control that shows a simpler version. You do not need the repository open.

The CLASSIC chapter shows the trigger and proof cells for each chain, including a worked VECTOR loop. It also tells you when an example proves one tick only.

What “a stronger bot” actually means

A strong bot must earn power and also steer well enough to use it. The pilot does that steering. High damage cannot help if the knight never reaches an enemy. That is like giving someone a legendary sword while they keep walking into walls.

A movement rule can also depend on extra survival power. Without it, the same rule can get the knight killed.

If the knight stands near many enemies, a local attack can hit more of them. But those enemies can also hit back. Wider attacks and better survival can make that risky position worthwhile, and better gem collection turns more drops into EXP.

The reference-bot chapters show what power each bot earned, when the game applied it, and how movement and aim turned it into EXP. This guide places the relevant code beside each explanation. The CLASSIC chapter also gives the trigger and proof steps for every named chain.

The result we are trying to account for

The release records these median scores from hidden test runs. The bars show what happened. Later chapters show how accepted machine work can help the knight earn more EXP.

Saved scores from the release

Repository measurements · hidden bundle · seven scores per artifact.

Each uploaded bot ran on seven seeds. The runner used the fourth-ranked run as its headline result. The ABYSS reference scored 336,338 in this release, and the CLASSIC reference scored 22,704. These are measured results, not the highest scores possible.

Older documents can show higher CLASSIC scores from before a balance change. The same CLASSIC reference graded 224,384 then, rather than the current 22,704. Still other results come from an older device design. Do not compare any of them with this release as if the settings matched.

The scores come from the supplied challenge records. Interactive examples explain specific rules, but they do not simulate a full match.

The question to carry forward

Ask one question as you read: who owns this change? x + 1 changes a value inside the bot. aim_at(x, y) sends a request to the host. When the knight collects a gem, the world changes EXP. These changes happen in one match, but different parts of the system own them.