Skip to content

Osrs env upstream#500

Open
valtterivalo wants to merge 2 commits intoPufferAI:4.0from
valtterivalo:osrs-env-upstream
Open

Osrs env upstream#500
valtterivalo wants to merge 2 commits intoPufferAI:4.0from
valtterivalo:osrs-env-upstream

Conversation

@valtterivalo
Copy link
Copy Markdown

@valtterivalo valtterivalo commented Mar 15, 2026

three (currently) OSRS environments (or encounters as i call them inside this broader OSRS env) in pure C. the env itself and its backend has a ton of OSRS logic already that supports building new encounters pretty easily, but abstractions for this could be way better. we'll see where that goes naturally after we start implementing more encounters. ofc i'd rather have the entire damn playable game as a single functional environment but let's be honest about the amount of work involved.

osrs_pvp: NH PvP with 24 scripted opponents (trivial to onetick+action-reading), PFSP support, 7-head discrete action space (39 logits), 373-dim obs. full combat: gear switching, prayers, eating, specs, movement, action masking. most complete encounter here, but some bugs might remain (or have been introduced lately from abstracting things away to env level).

osrs_zulrah (WIP): money snek solo boss encounter, trying to be as faithful as possible to the real deal but some work remains with more ambiguous mechanics. 3 gear tiers with all special effects etc covered (tbow scaling, sang heal, crystal set bonus, eye of ayak magic drain, confliction double-roll, thralls). basic reward shaping for training, i couldn't get budget setup to win without shaping. bis gear obviously shits on the snake with no problems.

osrs_inferno (WIP): the full inferno challenge encounter with all the waves and the final boss. current dev work has still been basic sim rigor, also prompted me to abstract away a shit ton of stuff so that future encounters are easier to implement. assets are mostly good but some animations and projectiles need to be wired up. NPC mechanics are coming together. RL training isn't yet stable and i didn't run any sweeps yet. probably a couple more days of basic sim work and then back to training models!

binary data assets (sprites, models, collision maps) gitignored, regenerated from OSRS cache via included python scripts that are pretty easy to read and understand. expect there to be quite a bit of coordinate system flipping and offset trial and error when implementing new areas and encounters, but that's part of the deal until we figure out something rigorous for that.

image image image

@valtterivalo
Copy link
Copy Markdown
Author

added inferno, WIP ofc

three OSRS encounters in pure C with a shared combat/mechanics backend.
per-encounter bindings using upstream vecenv.h pattern, binary data
gitignored (regenerated from OSRS cache via included scripts), ~1000
unit tests covering combat math, special attacks, bolt procs, etc.
@valtterivalo
Copy link
Copy Markdown
Author

quite a bit of refactoring in the above commit, trying to make adding encounters as easy as possible for other devs. some straight up inferno work in there too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant