AI Research

WorldSim AI — An Open-Source Digital Twin Simulation Platform You Can Run Today

Rudra Sarker
AI Engineer & Full-Stack Developer | Creator of MindWell, SightlineAI & StealthHumanizer
·
2 min read
·
1 view
·
AI-generated

AI tooling disclosure

Generative AI materially contributed to this article.

Human review confirmed by the author.

WorldSim AI — An Open-Source Digital Twin Simulation Platform You Can Run Today

Digital-twin platforms are usually enterprise products with enterprise pricing. WorldSim AI is the opposite: a free, MIT-licensed, agent-based simulation platform with real-time 3D visualization, machine-learning forecasting, and distributed scaling — clone it and run it on your own machine with one Docker command.

Try it: git clone https://github.com/rudra496/worldsim-ai && cd worldsim-ai && docker-compose up --build, then open http://localhost:3000. Source: github.com/rudra496/worldsim-ai.

What it does

WorldSim AI lets you model, predict, and optimize real-world systems — smart cities, factories, energy grids, logistics networks — as living simulations rather than static diagrams.

Agent-based modeling

Four agent types (Vehicle, Human, Machine, EnergyUnit) move and act through rule-based or probabilistic behaviors, coordinated by an autonomous multi-agent system: Planner, Predictor, and Optimizer agents cooperate through an AgentCoordinator. The world itself is a 2D grid or graph with 8 zone types — residential, industrial, commercial, road, park, power plant, water treatment, warehouse — and tracked resources (energy, water, materials, bandwidth).

The AI layer

  • Forecasting: a PyTorch LSTM predicts time series, with a NumPy fallback when PyTorch is not installed.
  • Anomaly detection: an unsupervised autoencoder flags drift and outliers.
  • Optimization: scipy linear programming allocates resources; a greedy priority scheduler orders tasks.
  • Reinforcement learning: a Gymnasium-compatible environment ships with PPO and Q-learning agents, closing an adaptive loop of simulation → prediction → optimization → correction.

Real-time 3D and data ingestion

The React + Three.js frontend (React Three Fiber) renders zones and agents in interactive 3D — orbit, pan, zoom, a day/night cycle, and a seamless 2D ↔ 3D switcher. On the data side, WorldSim ingests live input from MQTT (IoT sensors), CSV/JSON/JSONL files, REST polling, or its own synthetic simulator with noise, drift, and failure injection, and raises CRITICAL/WARNING/INFO alerts.

Distributed simulation and digital-twin sync

A multi-node engine scales horizontally with grid-based spatial partitioning, threshold-based load balancing, and gRPC messaging (dataclass serialization — no protoc needed). Digital-twin modes cover live mirroring, historical replay, or a hybrid of both, with GIS integration: GeoJSON loading, coordinate transforms, and ray-casting geofencing. A hot-reloadable plugin system ships with logging, Prometheus metrics export, and Slack notification plugins, plus a REST + WebSocket connector with API-key auth, role-based access control, and token-bucket rate limiting.

Python 3.10+ / FastAPI backend, React 18 + Three.js frontend, NumPy, optional PyTorch, Docker-ready, MIT licensed. Released as v0.1.0 and archived on Zenodo (DOI 10.5281/zenodo.22118796).

If you build a city, a factory floor, or an energy grid on it, the Discussions tab is open — feature requests and PRs are welcome.

Comments(0)

Join the discussion securely with your ZyVOP account.

Continue on ZyVOP to Comment

No comments yet. Be the first to comment!

Rudra Sarker
Rudra Sarker

AI Engineer & Full-Stack Developer | Creator of MindWell, SightlineAI & StealthHumanizer

Hi, I'm Rudra Sarker—an AI Engineer and Full-Stack Developer passionate about building high-impact, accessible web platforms and intelligent systems. I build solutions that blend AI, accessibility, and mental health, including MindWell (accessible mental health support platform), StealthHumanizer, SightlineAI, and ScienceLab 3D. Here on ZyVOP, I write about AI engineering, web development, open-source projects, and developer productivity.

Subscribe to Rudra Sarker's Newsletter

Direct email dispatches when new stories are published. Zero algorithms.