A spectator-only, multi-agent social deduction simulation on Monad
All players are autonomous AI agents. Humans don't play — they watch and bet.
Imagine Among Us, but every single player is an AI agent — making decisions autonomously, accusing each other, forming alliances, and betraying trust. You are the spectator. Watch the chaos unfold, and place your bets on who lives, who dies, and who the imposter really is — all settled on-chain via Monad prediction markets.
# Install dependencies
pip install -r requirements.txt
# Run autonomous agent mode
python main_autonomous.py
# Betting UI (separate server)
python -m http.server 8000| Key | Action |
|---|---|
TAB |
Cycle camera between agents |
1-9 |
Jump to specific agent |
SPACE |
Restart match |
ESC |
Quit |
The imposter is caught and ejected! |
The imposter eliminates enough crewmates to take over. |
The airlock doesn't discriminate...
Kill • Emergency • Sabotage • Lights • Map
Each AI agent runs an autonomous decision loop every game tick:
┌─────────────────────────────────────────────────────────────┐
│ AGENT DECISION LOOP │
│ │
│ Perceive → Decide → Act → Communicate │
│ │
│ • MOVE: Random walk with stuck detection │
│ • KILL: Range check + cooldown (imposter only) │
│ • SPEAK: Role-aware dialogue generation │
│ • VOTE: Accusation-weighted majority vote │
│ • REPORT: Detect bodies → trigger meeting │
└─────────────────────────────────────────────────────────────┘
Agents generate context-aware dialogue during meetings:
| Template | Example |
|---|---|
| 🔴 Accusation | "I saw Green near the body in Electrical!" |
| 🛡️ Defense | "I was in MedBay doing my tasks, check the logs." |
| 🤔 Uncertainty | "I'm not sure, but Yellow was acting weird." |
| 👀 Observation | "Red and Blue were together in Navigation." |
| 🎭 Deflection (Imposter) | "Why is nobody talking about Orange?" |
┌────────────────────────────────────────────────────────────┐
│ SPECTATOR (Human) │
│ Watch match, trade predictions │
└────────────────────────▲───────────────────────────────────┘
│ read-only
┌────────────────────────┴───────────────────────────────────┐
│ BLOCKCHAIN MODULE │
│ blockchain.py │
│ - EventLogger: logs kills, meetings, dialogue, votes │
│ - BlockchainConnector: simulation / Monad testnet │
│ - MonadSusChainIntegration: high-level game hooks │
└────────────────────────▲───────────────────────────────────┘
│ events
┌────────────────────────┴───────────────────────────────────┐
│ GAME ENGINE │
│ autonomous_game.py │
│ - AutonomousGame: main loop, phases, rendering │
│ - Meeting phases: ALERT → DIALOGUE → VOTING │
│ - Win conditions, ejection, body detection │
└────────────────────────▲───────────────────────────────────┘
│ actions
┌────────────────────────┴───────────────────────────────────┐
│ AGENT CONTROLLERS │
│ agent_controller.py │
│ - AgentController: base class │
│ - SimpleAgent: random walk, kill, speak, vote │
│ - Dialogue templates: accusation, defense, uncertainty │
└────────────────────────────────────────────────────────────┘
All game events are hashed, logged, and settled on-chain.
Located in monadsus-contracts/src/:
| Contract | Purpose |
|---|---|
🗂️ AgentRegistry.sol |
Track agent names, games played, wins |
🎮 GameRegistry.sol |
Register games with hash, manage lifecycle |
📊 PredictionMarket.sol |
YES/NO betting pools, payout claims |
⚖️ GameResolver.sol |
Batch-resolve markets when game ends |
cd monadsus-contracts
forge build
forge script script/Deploy.s.sol --rpc-url <MONAD_RPC> --broadcastWhen a game starts, these markets are automatically created on-chain:
| Market | Resolution Condition |
|---|---|
🛡️ Will the Crew win? |
YES if crew ejects the imposter |
🔍 Is {Agent} the Imposter? |
YES if agent is revealed as imposter |
💀 Will {Agent} survive? |
YES if agent is alive at game end |
All markets settle deterministically from the final game state hash — no oracles needed.
Every game exports a full replay log as JSON:
[
{"t": 0.0, "type": "GAME_START", "agent_id": null, "data": {}},
{"t": 15.2, "type": "KILL", "agent_id": "Green", "data": {"victim": "Blue"}},
{"t": 30.5, "type": "MEETING_START", "agent_id": "Red", "data": {}},
{"t": 31.0, "type": "SPEAK", "agent_id": "Red", "data": {"message": "I think Green is suspicious."}},
{"t": 32.0, "type": "VOTE", "agent_id": "Red", "data": {"target": "Green"}},
{"t": 35.0, "type": "EJECT", "agent_id": "Green", "data": {"was_imposter": true}},
{"t": 35.1, "type": "GAME_END", "agent_id": null, "data": {"winner": "CREW", "imposter": "Green"}}
]monaddotsus/
├── main_autonomous.py # 🚀 Entry point
├── autonomous_game.py # 🎮 Game engine (850+ lines)
├── agent_controller.py # 🤖 Agent interface + SimpleAgent
├── blockchain.py # ⛓️ On-chain integration
├── betting.html # 💰 Betting UI (standalone)
├── server.py # 🌐 Game server
├── sprites.py # 🎨 Player/Bot sprite system
├── settings.py # ⚙️ Config & sprite loading
├── game.py # 🕹️ Original game (reference)
├── openclaw_agent.py # 🧠 Advanced agent implementation
├── monadsus-contracts/ # 📜 Solidity contracts (Foundry)
│ └── src/
│ ├── AgentRegistry.sol
│ ├── GameRegistry.sol
│ ├── GameResolver.sol
│ └── PredictionMarket.sol
└── Assets/ # 🖼️ Sprites, sounds, maps
├── Images/
│ ├── Alerts/ # Victory, defeat, kill, eject screens
│ ├── Meeting/ # Discussion & voting UI
│ ├── Player/ # 12 color variants
│ ├── Items/ # In-game task objects
│ └── UI/ # Action icons
├── Maps/ # Game maps
├── Sounds/ # SFX & music
└── Fonts/ # Custom typography
| Feature | Status |
|---|---|
| Agent Controller Interface | ✅ agent_controller.py |
| Random Walk Movement | ✅ Stuck detection included |
| Imposter Kill Logic | ✅ Range check, cooldown, body spawn |
| Body Detection → Meeting | ✅ Crew detects corpses |
| Meeting Dialogue System | ✅ Template-based accusations/defenses |
| Voting & Ejection | ✅ Majority vote, ties skip |
| Win Conditions | ✅ Crew wins if imposter ejected, imposter wins if outnumbered |
| Dead Body Sprites | ✅ Proper death rendering |
| Feature | Status |
|---|---|
| SPEAK action type | ✅ |
| Dialogue templates (Accusation, Defense, Uncertainty, Observation) | ✅ |
| Role-aware dialogue (Imposter deflection) | ✅ |
| Meeting phases: Alert → Dialogue → Voting | ✅ |
| Turn-based speaking (shuffled order) | ✅ |
| Console logging of all dialogue | ✅ |
| Feature | Status |
|---|---|
| Event logging system | ✅ blockchain.py |
| Deterministic game hash | ✅ SHA-256 of all events |
| Agent Registry connector | ✅ Track games played, wins |
| Game Registry connector | ✅ Register/start/finish games |
| Prediction Market connector | ✅ Create/resolve markets |
| Batch settlement via GameResolver | ✅ |
| JSON event log export | ✅ game_log_{id}.json |
- Replace
SimpleAgentwith GPT/Claude-powered reasoning - Memory system for tracking observations across rounds
- Strategic deception, persuasion, and coalition formation
- Web UI for watching matches in real-time
- Live event stream with agent POV switching
- Integrated market trading interface
- Deploy contracts to Monad mainnet
- Web3 wallet integration for spectators
- Real prediction market trading with actual stakes
This is AI systems research wearing a game skin.
- 🧪 Study deception, persuasion, and coalition formation in LLM agents
- 📊 Aggregate human belief signals via prediction markets
- 📈 Generate measurable agent performance metrics over time
- 🔁 Deterministic, reproducible matches for benchmarking
- ⛓️ On-chain verifiability — every game is a tamper-proof record
The void of space holds many secrets... and one imposter.
Built for Moltiverse.dev Hackathon · MIT License








