Project Thread

Echo-Heaven — Generative Social Simulacra: Real-time multi-agent personality simulation

🐙 View GitHub

Overview

A multi-agent simulation platform inspired by Stanford’s "Generative Agents" paper. Users digitize their personalities into autonomous "Digital Twins" that live and socialize in a persistent world.

Tech Stack

Python (FastAPI)JavaScript (Phaser Engine)Ollama (Llama 3 Local Inference)ChromaDB (Vector Database)WebSockets

Features

  • Heuristic Retrieval: Memory access weighted by Recency, Importance, and Semantic Relevance.
  • Reflection Tier: Periodic synthesis of raw observations into abstract "Insight Trees."
  • Recursive Planning: Top-down decomposition of daily goals into 15-minute action chunks.
  • Environment Tree: Natural language spatial reasoning.

Key Decisions

01

Deployed Ollama for local inference to bypass cloud token costs during the simulation's high-frequency social loops.

02

Implemented an Exponential Decay function in the memory retrieval algorithm to prioritize recent interactions while preserving long-term core memories.

Learnings

→Mastered the synchronization of Phaser's 2D game state with a FastAPI backend using real-time WebSockets.
→Developed a robust "Memory Stream" that prevents agents from infinite self-recursion by filtering out irrelevant environmental observations.