---
title: "Powering AI-led research through simulation"
description: "Grab built sim-rs, a self-contained tick-based marketplace simulator that replays a city-day of bookings and drivers through a closed dispatch loop (demand, supply movement, cancellation models, batching, solver-based allocation, recycling) in tens of minutes, with pluggable stages, portable reproducible run packages, and built-in switchback/spatial A/B/n experiments."
url: "https://swe.quest/articles/powering-ai-led-research-through-simulation-d6d1409659075b73"
canonical: "https://engineering.grab.com/powering-ai-led-research-through-simulation"
source: "Grab Engineering"
published: "2026-10-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["ai-agents","system-design","testing","performance","rust"]
---

# Powering AI-led research through simulation

A post on [Grab Engineering](https://swe.quest/sources/grab.md), published 2026-10-05, 9 min read, Case study. Original: [https://engineering.grab.com/powering-ai-led-research-through-simulation](https://engineering.grab.com/powering-ai-led-research-through-simulation)

## Summary

Grab built sim-rs, a self-contained tick-based marketplace simulator that replays a city-day of bookings and drivers through a closed dispatch loop (demand, supply movement, cancellation models, batching, solver-based allocation, recycling) in tens of minutes, with pluggable stages, portable reproducible run packages, and built-in switchback/spatial A/B/n experiments. An autoresearch loop lets agents propose code changes, run them, and keep only those that improve a computed metric and pass checks. To counter specification gaming, the environment enforces immutable core data, metrics the agent cannot redefine, branch-scoped diffs and layered compile and evaluation gates. Across about 150 overnight experiments, agents made driver-eligibility checks roughly 10x and cost adjustment roughly 24x faster, derived a deadline-bounded trip-recycling rule, and help keep the simulator faithful by porting production logic and fitting held-out-validated cancellation models.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Rust](https://swe.quest/tags/rust.md) (Languages)

## Prerequisites

- marketplace dispatch basics ([easy posts on E-commerce](https://swe.quest/tags/ecommerce.md?difficulty=easy))
- A/B testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- LLM coding agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

sim-rs, autoresearch, Grab, specification gaming, switchback experiments, survival analysis

## Related posts

- [Harness design for long-running apps](https://swe.quest/articles/harness-design-for-long-running-apps-8e65b1112006c61b.md): Anthropic Engineering · 2026-03-24 · Medium · 23 min read · AI agents, AI for coding, Evaluation, LLMs, Frontend
  A GAN-inspired multi-agent harness separates generation from evaluation so Claude can produce distinctive frontend designs and build full-stack apps autonomously over multi-hour sessions.
- [Agents are users, so your software needs evals](https://swe.quest/articles/agents-are-users-so-your-software-needs-evals-ae7971006fec5a38.md): Vercel · 2026-11-16 · Medium · 19 min read · Evaluation, AI agents, Testing, LLMs
  Agents act as users of APIs, CLIs, MCP servers and SDKs, so measuring whether they complete tasks correctly requires evals: tests run many times and scored.
- [How Legora runs 2,000 parallel agent evals on Modal Sandboxes](https://swe.quest/articles/how-legora-runs-2-000-parallel-agent-evals-on-modal-sandboxes-18a61f0150fc40b8.md): Modal · 2026-10-19 · Medium · 4 min read · Evaluation, AI agents, Sandboxing & isolation, Virtualization, Containers
  Legora tests its long-running legal agent by booting the full application, pinned to a specific commit, inside a separate Modal Sandbox for each eval run.
- [How Ramp built a full context background coding agent on Modal](https://swe.quest/articles/how-ramp-built-a-full-context-background-coding-agent-on-modal-8c26a10f9ce0801d.md): Modal · 2026-02-19 · Easy · 6 min read · AI agents, AI for coding, Sandboxing & isolation, Developer productivity
  Ramp Inspect, an internal background coding agent, runs each session in a Modal Sandbox containing a full dev environment (Postgres, Redis, Temporal, RabbitMQ, OpenCode, VS Code server, VNC with Chromium) and now starts roughly half of merged pull requests at Ramp.
- [Deterministic AI Testing with Session Recording in cagent](https://swe.quest/articles/deterministic-ai-testing-with-session-recording-in-cagent-aad4a70e828b2b3b.md): Docker · 2026-01-06 · Medium · 2 min read · AI agents, Testing, CI/CD
  cagent's session recording applies the VCR pattern to AI agents.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
