Learning Expedition: The Verdant Vault
Play https://matiz-learning-arena.vercel.app.
An original portrait dungeon game inspired by the room progression and skill
choices of Archero 2. The
campaign contains twenty rooms across four five-room acts.
Choose a gunner or mage, select powers between rooms, and defeat four guardians.
All artwork is original canvas drawing. This replaces the original two-dot learning arena;
that experiment and its failed generalization audit remain in legacy/.
Play
- Choose Gunner for fast bullets or Mage for slower piercing magic.
- Move with WASD/arrows or drag inside the room on a touch screen. Both weapons
aim at a nearby enemy with a clear firing line and fire automatically,
including while moving; ammunition is unlimited.
- Dash with Space or the DASH button. Dash grants brief invulnerability and
recharges in three seconds. Pause with P, Escape, or the pause button.
- Dodge glowing attack warnings. Charges lock their direction before moving;
dodge sideways and use their recovery window. Guardians take more damage
during marked openings and change attack patterns below half health.
- Clear a combat room before the final guardian and pick one of three free
powers. Health, powers and coins carry through the run. Each act has a safe
merchant stop and a guardian; the first three guardians lead into the next
act. Defeat or victory at room twenty offers a new expedition.
- Collect coins and hearts. Clearing a room collects its remaining rewards
automatically. Gun ricochets can bounce off stone and room edges; other
projectiles stop at walls. Sound is synthesized locally and can be muted.
- Open Does the network learn? for actual training and test evidence.
At the start of an expedition, the game freezes the accepted ANN checkpoint
for the entire run. If none exists, that run keeps labelled scripted tactics
through all twenty rooms while the ANN learns in a background worker. A newly
accepted checkpoint enters play on the next expedition, including after a
restart; it does not change a current opponent between rooms. Learning can be
started/stopped manually in the lab and starts after a completed or failed run.
Gameplay does not wait for training.
The trained checkpoint, weapon choice, learning reports, achievement counts
and current expedition stay in this browser under learning-expedition-v2.
Save format 4 retains the current encounter, health, coins, powers, reward/shop
state, aspiration and the run's frozen checkpoint. Refreshing offers a paused resume instead
of replaying a room from full health. The game saves during play, on pause and
when the page closes; storage failure is shown in the UI. Older format 2 saves
retain their accepted checkpoint but have no encounter to resume. Valid format 3
chapter saves migrate their active first-five-room encounter, carried resources
and frozen policy into the campaign. Five-room completion counts stay separate
from twenty-room campaign victories. The previous arena's learning-arena-v1
progress is preserved and is not imported into the campaign. Other browsers and
devices keep separate progress.
Campaign and builds
| Act | Rooms | Rest stop | Guardian and mechanics |
|---|---|---|---|
| Verdant Ruins | 1-5 | 3. The Lantern Market | 5. The Verdant Guardian; cover, committed charges and warned fans/rings |
| Ember Foundry | 6-10 | 8. The Cinder Exchange | 10. The Foundry Warden; hot floor pulses, healing support, shield openings and crossing rays |
| Frost Archives | 11-15 | 13. The Starglass Counter | 15. The Crystal Archivist; slowing floor patches and rotating rings with gaps |
| Living Vault | 16-20 | 18. The Last Lantern | 20. The Heart of the Vault; thorn pulses, combined enemy roles and alternating fan/ring/cross attacks |
Each arena has its own cover arrangement, with small seed-dependent shifts.
A fresh expedition gets a new seed; resuming keeps the existing encounter.
Each act contains three ordinary combat encounters, one safe shop and one
guardian. Shops have no hostile physics or elapsed combat ticks. Later acts add
warned floor hazards: ember and thorn patches damage the player, while frost
patches slow movement without changing the player's underlying speed stat.
Authored support enemies warn before healing nearby living allies; bulwarks
alternate protected and vulnerable windows. These authored roles do not use
separate ANN policies. The original canvas art style remains in this revision.
Every defeated enemy drops five coins. Clearing the first two rooms earns
35 coins before the merchant. Recovery costs 12 coins for Second wind or 16
for Oakheart; Heavy hitter costs 14. Weapon mechanics and Dash burst cost 18;
Battle rhythm costs 14. Purchases subtract from the carried balance, and each
shop item can be bought once at that stop. Free reward powers compete with
healing; the shop lets you finish a combination or restore health.
| Combination | Effect |
|---|---|
| Ricochet rounds + Triple shot | Three gun projectiles per volley, each able to bounce twice |
| Frost touch + Chain magic | Magic slows targets; chaining from a chilled target reaches farther and deals more damage |
| Dash burst + Battle rhythm | A dash damages nearby creatures; kills reduce its remaining cooldown |
Acquired powers appear in the build inventory; matching pairs are highlighted.
Basic damage, firing-rate, movement and health powers can stack up to six
times. Weapon mechanics and dash mechanics are single purchases. These are
explicit game-rule changes, separate from ANN learning.
Before an expedition, choose Mobile gunslinger, Frost mage, *Dash
fighter or Balanced explorer* as your build aspiration. You can edit it
again at safe merchant stops. A preset may suggest a weapon, but both hero
choices remain available; changing aspirations in a shop preserves your current
weapon and acquired powers. An optional custom goal of up to 160 characters is
a personal label. It does not infer new powers or train the ANN.
For the three specialized presets, reward offers include two aligned powers
and one different-path choice when both pools have eligible powers. Offers
exclude powers that cannot work with your current weapon or have reached their
stack cap, and fill from remaining legal choices as a pool runs out. Balanced
explorer samples broadly, with an early weapon mechanic and a chance to offer
its matching combination partner next. Any offered power can be chosen,
including the exploratory option. The build panel describes the powers actually acquired,
separately from your aspiration, and reports how many acquired picks align.
These transparent selection rules use declared preferences; they are not
neural adaptation to a human player.
What is actually learned
Skirmisher enemies share one real movement policy:
32 observed features -> 64 ReLU -> 64 ReLU -> 9 movement actionsThe Matiz-derived actor/critic module is reused. The model contains 6,922
parameters, including the unused value head. The new curriculum teaches the
actor with supervised cross-entropy and Adam; it does not train the critic.
Inputs include positions, relative player motion, health, cooldowns, boundaries,
time, nearby incoming projectiles and distance to cover.
A fixed geometric teacher supplies examples of maintaining range and avoiding
incoming fire. Four hundred bounded updates teach a fresh network from 4,096
examples. Health/time vary and some examples have no incoming fire, so the
curriculum also teaches approach/range behavior. Validation selects a frozen
candidate and decides acceptance before the reserved test is evaluated.
During learned gameplay and projectile tests the ANN chooses actions with
argmax at 5 Hz. The teacher does not choose a learned enemy's actions. A model
error activates an explicitly labelled tutorial fallback. Physics runs at 30 Hz.
Skirmisher enemies share the run's frozen checkpoint; they do not independently
update separate models. Committed charges and guardian attack phases are
scripted encounter rules. Weapon rates, enemy health and room progression are
fixed game rules. The curriculum uses simulated examples, not recorded human transitions.
Evidence of learning
The 2026-10-01 proof for the earlier dungeon revision used three fresh
initializations, 400 updates each, disjoint scenario seeds, and a separate
512-attack test per frozen model.
These test attacks were excluded from training and checkpoint selection.
| Initialization | Projectile hits before | Hits after | Relative reduction |
|---|---|---|---|
| 431 | 367 / 512 | 226 / 512 | 38.42% |
| 947 | 360 / 512 | 242 / 512 | 32.78% |
| 2026 | 392 / 512 | 267 / 512 | 31.89% |
Teacher-action accuracy rose from approximately 11-14% to 45-47%. Actor weights
changed, and numerical gradient tests check the actual supervised loss. The
projectile trials use the same movement and collision functions as gameplay,
with ANN inference and no teacher fallback. Before/after policies face identical
attack seeds. All 18,816 scenario seeds were disjoint and executable dependency
hashes stayed fixed throughout the proof.
This demonstrates a bounded projectile-avoidance skill. It does not prove
better full-room combat, player-specific adaptation, independent learning by
each enemy, or enjoyment. The isolated trials use one incoming projectile,
68 px/s enemy movement, no cover, and a one-second window. Actual rooms also
have cover, simultaneous enemies, weapon variations, different enemy speeds
and spread attacks. Transferring the measured skill to all those cases remains
a separate evaluation. Test reservation applies within each frozen proof run;
it is not a claim that development has never exposed a related test.
The evidence is in artifacts/DODGE-LEARNING-PROOF.json. Its proof script and
five runtime dependencies are preserved inartifacts/pre-chapter-source-2026-10-02/; their SHA-256 hashes match that
artifact. To reproduce the historical experiment independently of later chapter
changes, run node scripts/prove-learning.mjs from that frozen directory. It
writes a new artifact inside the snapshot rather than updating the current game.
The current scripts/prove-learning.mjs runs against the current source and can
produce a new result; it does not make the old whole-file hashes current.
The campaign preserves the original movement/collision and observation/trial
functions. tests/dungeon.test.mjs checks their source and deterministic outputs
against the earlier kernel. That continuity check protects the bounded task;
it does not evaluate the new arenas or authored attack phases.
Distinct room layouts, committed attacks, new powers and the shop are separate
gameplay changes. The historical result does not prove ANN strength in those
encounters or enjoyment. The in-game lab produces its own
report for the checkpoint actually trained in that browser. Its before/after
comparison changes the policy weights while holding the trial rules fixed;
extra health, damage or hidden speed bonuses do not generate the proof.
Architecture and verification
| File | Responsibility |
|---|---|
dungeon.js | Twenty-room deterministic combat, observations, geometric teacher, projectile trials |
neural.js | Matiz-derived MLP, prediction, verified backpropagation and Adam |
game.js | Shared movement actions/RNG; historical single-enemy physics |
curriculum.js | Bounded supervised training, validation selection, reserved test and weight evidence |
learning-worker.js | Background training and cancellation |
expedition-app.js | Controls, original artwork, powers/shop, per-run policy freezing, saved checkpoints |
run-state.js | Validated encounter snapshots and paused expedition resume |
vision.js | Declared build aspirations, legal weighted offers and acquired-persona descriptions |
index.html, styles.css | Portrait game layout and collapsed evidence panel |
legacy/ | Preserved original arena and its learning audit |
Local play needs Python 3:
python3 -m http.server 8766 --bind local-serviceOpen local-service. All gameplay and learning execute in the browser.
There is no backend, external asset service, GPU dependency or account login.
With npm installed, npm start launches the same server. Development checks
below also require Node.js and npm.
For development checks:
npm ci
npm test
npm run test:browser
node scripts/prove-learning.mjsBrowser tests use installed Google Chrome. They cover touch/keyboard play,
weapons, dash, pause, actual worker training, policy freezing, saved
checkpoints, worker failure and room-clear upgrades. Campaign checks cover all
twenty layouts, hazards, support/guard behavior, act transitions, final victory,
later-room resume, chapter-save migration and aspiration-guided offers; historical
verification receipts do not establish those additions. Fresh local functional
and real-worker evidence is in CAMPAIGN-VERIFICATION.json; deployed evidence
is in EXPEDITION-LIVE-VERIFICATION.json, each bound to runtime source hashes.
Historical arena tests
navigate to /legacy/. Numerical checks verify both PPO and supervised
cross-entropy gradients. The proof script writes models/evidence underartifacts/ and does not alter deployed or browser checkpoints.
The local real-worker campaign receipt is CAMPAIGN-VERIFICATION.json; use its
source hashes and date to identify the runtime it checks.
Deployment
Vercel project matiz-learning-arena is separate from Matiz. deploy/ contains
the reviewed runtime files, legacy runtime files and hosting configuration.
Dependencies, tests, proof artifacts and credentials are excluded. The latest
deployment is recorded in DEPLOYMENT.json; public asset and browser checks
are recorded in EXPEDITION-LIVE-VERIFICATION.json. Check their dates and source
hashes before using an older deployment receipt as evidence for this campaign.
After refreshing the reviewed runtime bundle:
cd deploy
npx vercel@62.1.0 deploy --prod --yes --scope kulbirminhas-5072Use this project's existing link. Do not copy Matiz's project link into it.
Feedback for the next revision
The earlier PPO arena changed weights without reliable gains on fresh rooms.
This revision begins with a skill whose real behavioral improvement can be
measured. Keep those claims separate from full-game strength and enjoyment.
Evaluate the four-act campaign before extending it further: room clears,
damage and survival across unseen layouts, both weapons and multiple attacks;
coin income and purchases; whether aspirations and named power combinations change useful
choices; and whether charge warnings and boss openings are readable. Compare
learned movement with the tutorial teacher and the untrained ANN under the same
combat rules. Add human play feedback before claiming that the loop is fun.
The source-bound artifacts/CAMPAIGN-SMOKE.json records eight complete runs:
two seeds, both weapons, and tutorial or archived ANN v1 opponents. Its controller
uses ordinary movement/dash inputs, legal gifts, real shop prices and carried
resources, and checks exact resume after boss ten. It has exact geometry and
attack-state access and reacts at 30 Hz. All eight clears establish traversable
campaign routes; they do not measure human difficulty, enjoyment or improved ANN
combat performance. Earlier controller stalls are retained in its diagnostic
history, and scripts/campaign-smoke.mjs reproduces the protocol.
The next visual phase should improve chapter identity, enemy silhouettes and
attack readability within the existing portrait layout. Keep the aspiration
as guidance rather than a lock: inspect whether aligned offers help players
build toward their goal and whether off-path choices remain interesting. Custom
goal wording currently labels that aspiration; interpreting arbitrary goals
would need an explicit mapping to the supported skill catalogue and separate
evaluation.
Keep each expedition's movement checkpoint fixed so policy changes do not
confound changes in layout, powers or difficulty. Separate agent roles and
communication remain future work. Multiple enemies sharing a policy is not the
six-independent-learner experiment.