Inspiration

During preliminary research, our team examined how competitive mobility systems like Formula E races and drone logistics depend on large-scale simulations for data-driven decision making. We identified a consistent limitation: existing simulators are accurate but slow, designed for post‑event analysis rather than real‑time adaptation. They cannot scale to hundreds of agents or deliver results fast enough for live decision feedback.

Our main insight was that the problem lay not in simulation logic but in how updates are processed and visualized. Traditional batch systems accumulate events before computing results. We wanted to remove those bottlenecks and create a continuous, high‑frequency simulation loop that updates the state across engines, APIs, and the visualization layer with minimal delay.

What it does

RaceIQ is a real‑time agent‑based simulator for competitive mobility scenarios. It models multiple entities (vehicles, bikes, drones) under physical constraints which are velocity, acceleration, and energy consumption. This streams their real‑time telemetry to a dynamic leaderboard and visualization layer.

The system supports: Up to 1000 concurrent agents updating at 60 Hz (16 ms per tick). Deterministic physics‑based progression for consistent reproducibility. Sub‑millisecond leaderboard ranking using Redis Sorted Sets. Smooth synchronization between simulation output and web rendering. Web-based monitoring interface for observers, analysts, or engineers.

How we built it

We approached the problem as a distributed pipeline where each layer focuses on minimal latency rather than throughput: Simulation Engine (Python + SimPy): Handles discrete-event logic for racing physics. Agents operate independently, emitting structured state updates at 60 Hz. Data Layer (Redis Streams + Sorted Sets): Stores sequential event logs and ranking data. Sorted Sets allow efficient reordering of leaderboards based on position in O(log N) time. Event Transport (Node.js + Socket.IO): Relays simulated states to connected clients over persistent WebSocket channels for guaranteed delivery under unstable conditions. Visualization (React + Three.js + D3.js): Provides 3D track visualization and live charting for energy, distance, and relative position trends. Deployment (Docker): All modules packaged into lightweight containers for reproducibility and multi‑node scaling.

Challenges we ran into

  1. Synchronization across time domains: Keeping Python’s discrete event loop aligned with the asynchronous Node.js broadcast pipeline to avoid drift between numeric simulation time and wall‑clock display time.
  2. Resource scaling: Maintaining consistent 60 FPS visualization while processing 60 000 events per second required precomputed frame buffers and selective event batching.
  3. Redis contention: Preventing write contention under high-frequency leaderboard updates by introducing micro‑batch operations and atomic scoring pipelines.
  4. Physical consistency: Balancing computational accuracy and visual continuity, especially when predicting overtakes or handling simultaneous updates from multiple agents.

Accomplishments that we're proud of:

Developed a fully synchronous multi-agent simulation engine that remains stable beyond 1000 active agents. Achieved average update latency < 1 ms between simulation and visualization. Implemented reliable cross‑language integration between Python, Redis, and Node.js within the short hackathon timeframe. Delivered a demonstrable product with clear use cases for motor-sport analytics, logistics testing, and real‑time strategy evaluation.

What we learned

  1. Through performance profiling and architecture experiments, we observed how data movement, not computation, was the primary constraint in real‑time systems.
  2. We learned to optimize the bandwidth and memory footprint of frequent state updates, apply event scheduling best practices in SimPy, and design asynchronous APIs capable of sustaining constant high-frequency publishing without message loss.
  3. This project reinforced the importance of coupling simulation determinism with visualization responsiveness to achieve operational accuracy and user clarity.

What's next for RaceIQ

  1. Integration of machine learning agents for autonomous strategy adaptation during simulations.
  2. Support for multi‑track environments with variable topography and vehicle class differentiation.
  3. Extension to infrastructure and logistics simulations (fleet management, urban mobility, and drone path optimization).
  4. Development of a dedicated mobile telemetry app with haptic feedback representation for accessibility testing.
Share this project:

Updates