AresSim Demo
Why am I building this?
I started learning ML in 2021 through Andrew Ng's Deep learning Specialization course on Coursera. Through this course I came across a documentatry by Deepmind Alpha Go Documentary where they beat a Go champion using their algorithm Alpha Go. This was the first time I heard of the field "Reinforcement Learning". It was fascinating to me how a Algorthm was able to beat great champions who has been mastering the game for years. That's when I decided to learn RL once I am good at Deep Learning. I got the Reinforcement Learning book (Sutto & Barto) in 2022 and finally started reading it this year :p.
Like my DotLM project, I wanted to build something from scratch to showcase my RL learnings. In Decmber 2025, when LLMs have become very trendy, I wanted to test how good it is at developing UI and created this 2D grid-based simulation environment replicating how Mars environment would looklike. It has done a pretty decent job at designing the UI.
AresSim Old Demo
My main objective of creating this environment is to test-out different RL algorithms, LLMs as Agents and compare their exploration capabilities. Once I became comfortable with RL (notations, maths and few algorithms), I started working on making the UI better. I fixed the final version of UI in July 2026.
The entire project is heavily inspired from NeuralMMO by Joseph Suarez. I recommend follwing him on X and watching his live-sessions. He has been working in RL before it was cool.
What is AresSim?
AresSim is a grid-based Mars survival Simulation and RL Environment. The main objective of Rover, acting as Agent is to develop and service the base for Humans and help with extracting Mineral and Ice by exploring the Grid-based Mars Surface. "Ares" means "Mars" in Roman mythology. The environment is designed by considering relastic situations on Mars and also not complex enough to make it a use-case for RL algorithms. In this blog, I will explain the details of the environment and how to formulate this as a RL problem. The upcoming blogs will be showcasing the results of different approaches I tried on this environment.
If you really want to visualize actually Mars surface, Checkout Mars 2020 Images captured by Perseverance Rover from 2020 to this day.
AresSim World
The environment is a 32x32 grid where each cell belongs to a family of terrain types.
Terrain types
Every cell on the 32×32 Mars grid has a terrain type that controls movement cost, which actions are legal, and where resources can be found. Alongside the label, each cell also carries roughness and dust channels (0–100%) — roughness drives battery drain and stress, while dust feeds into solar output and pad maintenance over time.
| Type | Description | Roughness | Dust |
|---|---|---|---|
| Regolith | Default Mars soil — easy to cross with normal battery drain. May hold faint resource traces; Build is not valid unless the cell is part of the build pad. | Low (~15–45%) | ~20–80% |
| Build pad | Compact 5×5 landing zone and colony hub. Only terrain where Build and Unload are valid; Service works on or near the pad. | Very low (≤ ~22%) | Low (≤ ~28%) |
| Rock / ore | Rocky mineral outcrops — higher movement cost than regolith. Scan only in Phase 1; Extract is not valid on rock. | Moderate–high (~35–55%) | ~20–80% |
| Ice | Ice deposits with moderate travel cost. Extract when ice signal is high; cargo stays on the rover until Unload on the pad. | Moderate (~25–45%) | ~20–80% |
| Crater | Unsafe basin — movement is blocked. Build, service, and extraction are invalid. | Very high (rim) | Often ~40–80% |
| Ridge | Elevated rocky bands — passable but heavy battery drain and hazard warnings. Build pad generation avoids ridge cells. | High (~55–85%) | ~20–80% |
| Dune | Loose sand drift in coherent patches — warnings and higher drain than regolith. Heavy dune zones are avoided for pad placement. | High (~50–75%) | Often ~35–80% |
Terrain types
Build Pad
Build Pad is the 5x5 colony’s home. The environment generator picks a flat, safe site from the seed (retries with offsets if needed), places the rover there (initial position), and lays down four starter systems — habitat, solar, charger, and storage — shown in the UI as one integrated site.
Most pad actions require the rover on the pad: Unload (ice → water/O₂), Build (habitat progress), and Service (dust/damage). Entire 5x5 build pad zone is treated identically while formulating as RL problem.
Explore → Extract → Return to pad → Unload → Build / Service
Build Pad
Weather
Weather in AresSim cycles through four states. It changes how much power the colony generates, how hard each rover action is on the battery, and how fast dust accumulates on the build pad. Every simulation step advances the clock and the weather state. Weather is chosen from this cycle as the episode progresses.
Clear → Dusty → Dust Front → Cold Night → (repeat)
What each state does
| Weather | Solar power | Rover battery | Dust |
|---|---|---|---|
| Clear | Best - panels run near full strength | Lowest stress | Slowly clears |
| Dusty | Reduced output | Higher drain on every action | Builds up |
| Dust Front | Strongly reduced | High drain — costly to roam far | Builds quickly |
| Cold Night | Very low - little sunlight | Moderate drain | Eases slightly |
Seed-based worlds
Every episode starts from an integer seed (default range 0–99,999). That single number drives the full Mars layout: terrain height and roughness, ice and ore clusters, crater and ridge placement, a validated 5×5 build pad, rover spawn, starting battery and colony reserves, and initial weather. Generation uses a fixed deterministic PRNG (no wall-clock randomness), the same seed always rebuilds the same map before a single action is taken. After each transition the engine emits a SHA-256 state checksum so that identical seed + identical action sequence can produce identical world state.
AresSim Environment for different seeds
Workflow
seed ──► procedural map ──► reset(world)
│ │
│ ▼
│ action sequence
│ │
▼ ▼
same layout every time same checksums every time
The Agent
In AresSim, the Agent is whoever is driving the rover. It can be Human (Manual mode), an Learned Policy (Algorithm mode), LLM Agent or from a Replay.
Actions
| Action | What it does |
|---|---|
| Move | Shift one cell N / E / S / W |
| Scan | Mark a rock/ore cell scanned; collect a 0.5 kg sample |
| Extract | Mine 2 kg ice from current cell |
| Build | Advance habitat on the pad (+10% per success) |
| Service | Repair pad, cut dust, restore structure health |
| Unload | Empty all cargo into the colony (ice → water/O₂) |
| Wait | Pass time; recharge rover if colony power is positive |
Cargo limit: 12 kg total (Ice + Ore). Agent has to use Unload action to unload all the contents from it;s Cargo into the Build Pad. Rover cannot enter creater and also moves cardinally.
Objective
The goal is to survive as long as possible while keeping the colony viable. An episode ends when rover battery, rover health, or colony livability hits zero (more on this below). Ideally the agent is expected to:
- Explore the 32×32 map
- Scan and Collect Ore
- Extract Ice
- Unload Ice and Ore at Build Pad.
- Build habitat progress toward 100%
- Service the pad when dust, damage, or power margin is bad
- Recharge in Build Pad when battery is low
Battery Drainage
Battery drain stacks terrain + weather + cargo + action type. Rougher ground and heavier payload cost more per step.
Terrain
| Terrain | Effect on movement |
|---|---|
| Build pad | Easiest (~5% stress) |
| Regolith | Normal (~14%) |
| Ice | Moderate (~30%) |
| Rock / ore | Higher (~38%) |
| Dune | High (~55%), hazard warning |
| Ridge | Very high (~82%), hazard warning |
Weather
| Weather | Effect |
|---|---|
| Clear | Lightest |
| Dusty | Moderate |
| Dust Front | Heavy |
| Cold Night | Moderate (low solar) |
| Severe Storm | Heaviest (not in default cycle yet) |
Other factors
| Factor | Effect |
|---|---|
| Cargo weight | More kg carried → more drain |
| Cell dust | Adds stress on top of terrain/weather |
| Power deficit | If colony uses more power than solar provides, battery drains even while Waiting |
| Positive power margin | Wait recharges the rover; slower trickle-charge on the pad |
UI Walkthrough
Manual, Algorithm, and Replay control bars
Camera viewpoints: perspective, 3D survey, and top-down
Data layers: ice, ore, elevation, and weather
Lighting across the map and build pad
Run analytics, mission rewards, guide, and timelineManual, Algorithm, and Replay control bars
Formulating the RL problem
AresSim is a single-agent, discrete-time, partially observable MDP on a 32×32 Mars grid. The hidden full world state lives in the simulator; the policy only sees observation and mask (Agent can only see 8x8 grid region around it with it present at middle of the region).
| Symbol | Meaning |
|---|---|
| Full world (terrain, rover, colony, weather, dust) — not given to the policy | |
aresim.obs.local.v1 - 8×8 crop + telemetry | |
| - 10 masked discrete actions | |
| Deterministic transition: same seed + action same next state | |
| Shaped training reward (separate from UI engine score) | |
| Discount factor (default 0.99 in PPO configs) |
Horizon: episodes end on terminal survival failure or external truncation at (e.g. 1200 steps in rollouts).
Environment
- World:
32×32cells, one rover (rover_0), one 5×5 build pad, procedural terrain from seed. - Task:
phase1_open_exploration_v1— survive and explore; no win condition. - Clock: weather cycles each step; sol/time advances deterministically.
- Truth vs view: simulator owns rules; the RL layer only projects observation, mask, and reward.
Weather (cycles: Clear → Dusty → Dust Front → Cold Night):
Solar generation (drives colony power margin):
| Weather | |
|---|---|
| Clear | 1.18 |
| Dusty | 0.72 |
| Dust Front | 0.48 |
| Cold Night | 0.22 |
Power margin (negative margin drains rover battery even on Wait):
Battery drain (per step, simplified):
| Terrain | Weather | |||
|---|---|---|---|---|
| Build pad | 0.05 | Clear | −0.06 | |
| Regolith | 0.14 | Dusty | +0.22 | |
| Ice | 0.30 | Dust Front | +0.48 | |
| Rock | 0.38 | Cold Night | +0.28 | |
| Dune | 0.55 | |||
| Ridge | 0.82 |
, = local roughness and dust (0–1). Recharge applies on Wait when .
Agent
The agent is the rover decision-maker: pick each step from .
| ID | Action |
|---|---|
| 0 | Wait |
| 1–4 | Move N / E / S / W |
| 5 | Scan |
| 6 | Extract |
| 7 | Build |
| 8 | Service |
| 9 | Unload |
Policy input:
iff action passes simulator validation; Wait is always legal. Masks come from rules, not from the network.
Phase 1: one agent rover_0. Human play uses the same actions under actor Player; algorithms use actor Agent.
Terminal conditions
| Signal | Meaning |
|---|---|
| Terminated | Survival failure — episode over |
| Truncated | External step limit — not death |
| Failure | Trigger |
|---|---|
| Battery depleted | Rover battery → 0 |
| Health depleted | Rover health → 0 |
| Livability depleted | Colony livability → 0 |
State
Hidden state : full 32×32 map, all channels, colony reserves, weather, dust, structures.
Observation — schema aresim.obs.local.v1 (rover fixed at local , window ):
| Component | Shape | Content |
|---|---|---|
terrain_type | Terrain class IDs | |
spatial | height, roughness, ice, ore, dust | |
cell_flags | known, visible, scanned, extracted | |
self | position, battery, health, cargo, time | |
colony | power, water, O₂, livability, build %, … | |
pad_proximity | off-pad / in range / on pad | |
weather_type | current weather category | |
objective_* | padded | zeros in Phase 1 (reserved) |
Partial observability: cells outside the window are unknown padding, so the policy must move and scan to learn the map.
Actions & rewards
Action effects:
| Action | Main effect |
|---|---|
| Move | ±1 cell; blocked by crater |
| Scan | Rock/ore cell → +0.5 kg sample |
| Extract | Ice cell → +2 kg ice (12 kg cap) |
| Build | +10% habitat progress (on pad) |
| Service | Cut dust, repair structures (near pad) |
| Unload | All cargo → colony (on pad; ice → water/O₂) |
| Wait | Time passes; recharge if |
Training reward (profile shaped_train) is weighted sum of terms, then clipped to on non-terminal steps:
| Term | Weight | Intuition |
|---|---|---|
new_scan | +0.10 | Exploration |
ice_delivered | +0.50 | Logistics |
samples_delivered | +0.20 | Science |
build_progress | +0.50 | Habitat |
service_recovery | +0.25 | Maintenance |
hazard_damage | −1.00 | Rough travel / hits |
energy_used | −0.05 | Battery spend |
invalid_action | −0.10 | Illegal command |
time_cost | −0.001 | Per-step living cost |
terminal_failure | −5.00 | Episode death |
Try it yourself
git clone https://github.com/shanmukh05/AresSim.git && cd AresSim
python3 -m venv engine/.venv
engine/.venv/bin/pip install -e './engine[dev,env]'
Inspect the Environment through API
from aresim.factory import make_gym_env
env = make_gym_env(max_episode_steps=200)
obs, info = env.reset(seed=1447)
print("schema:", info["observation_schema"])
print("checksum:", info["state_checksum"])
print("mask:", obs["action_mask"])
obs, reward, term, trunc, info = env.step(5) # Scan
print("reward:", reward, "scanned flags changed:")
print("terminal:", term, "reason:", info.get("terminal_reason"))
Look at:
obs["observation"]["terrain_type"]— local terrain IDsobs["action_mask"]— which buttons would be greeninfo["reward_breakdown"]— why reward movedinfo["engine_reward"]vsreward— two scoring systemsinfo["state_checksum"]— reproducibility spot-check
Play - Export - Replay in UI
# terminal 1
engine/.venv/bin/python -m aresim.api
# terminal 2
npm install && npm run dev
- Start Frontend + Backend (commands above).
- Manual mode — set seed, move/scan/extract, watch battery and weather in the HUD.
- Export — save the run as a trajectory JSON from the action bar.
- Replay — switch to Replay mode, load the file, step through the same episode without re-simulating decisions. Check Reun Analytics, Rewards, Timeline, Guide, Settings Panel.
What's next?
My next focus is on running few RL Algorithms such as PPO (& it's variants), DQN (& it's variants) and see how they're perform on AresSim. Once I cover enough RL algorithms, I will trying-out different LLMs as Agents. Using LLMs requires us to design the state, action and other environment information very efficienlty for long-range exploration.
As of the day of publishing this blog, I added Baselines (Random, Random-valid, Wait and Scripted) and PPO (Masked) initial version. Check teh repo for more details about these.
References
- Suárez, J. et al. “Neural MMO 2.0: A Massively Multi-task Addition to Massively Multi-agent Learning.” arXiv:2311.03736 (2023).
- Neural MMO
- Mars 2020 Images — Perseverance rover imagery from PDS Geosciences.
- The Beginner's RL Playground — Arthur Juliani
- Awesome Deep RL
- Suarez, Joseph et al. “Neural MMO v1.3: A Massively Multiagent Game Environment for Training and Evaluating Neural Networks.” Adaptive Agents and Multi-Agent Systems (2020).
Tools
- UI Design/Development: ChatGPT/Codex
- Editor: Cursor
- Flowchart and Diagrams: Excalidraw
- Screen Recording: OpenScreen
Citation
Shanmukha Sainath. "AresSim - Mars Survival Simulation & RL Environment". TensorWrites (Sep 2026). https://www.tensorwrites.com/posts/aressim-env
@article{aressimenv2026,
title = "AresSim - Mars Survival Simulation & RL Environment",
author = "Shanmukha Sainath",
journal = "TensorWrites",
year = "2026",
month = "Sep",
url = "https://www.tensorwrites.com/posts/aressim-env"
}