10 weeks · one loop · four domains

Real-Time Intelligent
Systems

A real-time system is not a fast system. It is a system with a deadline — it must sense the world, decide, and act before a clock runs out, and an answer that arrives late is simply wrong. This course builds that one loop ten weeks deep in AlgoArena, a live Python market, then bolts intelligence into its hot path and re-instantiates the same loop as a detector, a vision pipeline and a car controller.

Start with Week 0 See the 10-week map Play with the loop Set up your environment
10
Weeks, one system
4
Domains, one loop
p99
The metric · never the mean
8765
The arena WebSocket port
The learning path

Ten weeks, one loop, five arcs

After week 2, every week consumes something an earlier week built. The objects you draw in week 1 become the async tasks of week 2, the trading system of week 3, the signal of week 4; week 5 splits the venue in two, week 6 reads its own session tape, week 7’s perception stage becomes week 8’s sensor, and week 9 turns all of it into deadlines, replay and a safety case.

11 weeks shown
Arc 1 · FoundationsWeeks 0–2 · what a real-time system is, the objects it is made of, and the machinery that keeps them all in flight at once.
Arc 2 · The trading real-time systemWeeks 3–4 · build the loop end to end, measure its tail, then put intelligence inside the budget.
Arc 3 · DistributedWeek 5 · two venues, one asset, and a link you are about to cut.
Arc 4 · SecurityWeek 6 · the system reads its own tape and looks for someone cheating.
Arc 5 · Perception & safetyWeeks 7–9 · the loop grows eyes, then a steering wheel, then a safety case.
Arc 6 · FinaleWeek 10 · a live scored session, a post-mortem in the room, and the exam.
The one idea

Sense → decide → act, before the clock runs out

Every system in this course is the same three-stage loop under a deadline. Only the units change: microseconds for a trading bot, a 33 ms frame budget for a vision pipeline, a couple of hundred milliseconds for a security alert, a tenth of a second for a car. Pick an instance, then spend the budget: add work in decide and watch the bar push past the deadline line.

Latency budget

—

Controls

p50
—
p99
—
Deadline
—
Miss rate
—

What each stage is, here

    Why p99, never the mean. A loop that averages 4 ms against a 5 ms deadline sounds healthy and can still miss one deadline in fifty. The mean hides the tail; the tail is the only part a deadline can see. Every week in this course reports p50 and p99.
    Week 0 · before anything else

    Start here — five steps to a green smoke test

    Week 1 assumes week 0 is green. Tick each step as you finish it; the lamp turns green when your environment can talk to the arena. (Ticks are kept only in this browser tab, and nothing is sent anywhere.)

    Smoke test: RED · 0 of 5 steps

    No GPU, no cluster, no cloud account is needed for any week of this course. Everything above is a pip install on a laptop, and the offline simulator (make sim) is always an acceptable substitute for the live venue.

    If something is red

    ConnectionRefused when the bot connects

    Nothing is listening on the port yet. In a lab the venue is usually started for you; locally you start your own with make exchange.

    Fix: check EXCHANGE_HOST and EXCHANGE_PORT in your .env, and run make sim if you are offline.

    pydantic import error

    The message schemas are pydantic v2 and will not import against v1.

    Fix: re-run make install in a clean 3.11 venv; never mix v1 and v2 in one environment.

    onnxruntime or opencv will not install

    Weeks 7–8 need CPU inference wheels, and those are the ones that bite on a mixed Mac/Windows cohort.

    Fix: Python 3.11 exactly, then pip install onnxruntime opencv-python-headless — the headless build avoids the GUI dependencies you do not need.

    Your token is in a file you are about to commit

    The team token authorises trades against your team’s capital. It belongs in a .gitignored .env and nowhere else — not in a notebook, not in a screenshot, not in a chat message.

    Fix: git check-ignore -v .env before your first commit; if you have already pushed one, rotate it immediately.

    Bot missing from the dashboard

    The handshake was accepted but under an identity the venue does not recognise, so your fills score for nobody.

    Fix: TEAM_ID (and ARENA_TOKEN, when required) must match the registered roster exactly — character for character.

    Where to go next

    Begin, get the code, or see the sibling arenas

    Begin
    Week 1 · UML & OOP
    Design the system as objects and messages, then draw it before you build it.
    Code
    Get the code
    Labs and homework live in your course’s own site; the starter repo is public. Use it as a template, clone, make install.
    Sibling
    Systematic Trading Arena
    Nine interactive weeks on the trading side of the same platform — backtesters, complexity, ML signals, CI/CD.
    Sibling
    Computer Architecture Arena
    Nine interactive dashboards on the machine your Python actually runs on — from the Turing machine to tick-to-trade.