Top 6 Determinism Interview Questions
Browse 6 real-world technical and behavioral interview questions about Determinism. Review scenarios, edge cases, and architectural best practices.
When would you choose deterministic lockstep over an authoritative server, and what does each model cost you?
Deterministic lockstep vs authoritative server is a trade-off between bandwidth and trust. Lockstep sends only inputs but waits on the slowest peer and risks desyncs; an authoritative server spends bandwidth on state updates but handles cheating, latency hiding and correction more cleanly.
Walk me through what rollback netcode does on a single frame, and what it costs to run it.
Rollback netcode predicts remote input so local gameplay never waits for the network. When the real input arrives, the client restores the saved state from that frame and re-simulates forward, trading CPU and correction artifacts for responsive controls.
How would you design an order book, and what makes it hard?
An order book is price levels in price order, each holding a time-ordered queue of orders, plus an ID index so a cancel is O(1); the hard parts are that cancels dominate the flow, the feed must be gap-checked and recoverable, and replay must be deterministic and allocation-free. It also connects matching engine to the point an interviewer is testing.
Your promotions engine lets two discounts stack when it should not. How do you fix it and stop it recurring?
Model eligibility, exclusivity, and priority as explicit promotion data rather than accumulated conditionals, pin a deterministic evaluation order because the same two discounts applied in a different sequence produce a different total, and persist a price trace finance can read months later.
What has to be captured for a training result to be reproducible?
Five things: the data version, the code commit, the resolved configuration, the pinned environment and the seeds. Even with all five, GPU kernels are often nondeterministic, so what you can promise is a statistically equivalent rerun and a recoverable artefact, not a bitwise identical one.
A test passes on your machine and fails in CI roughly once a week. How do you track it down?
Make it reproducible before you make it pass. Pin the ordering seed, then work through the sources of non-determinism the test is exposed to - wall-clock time, global random state, hash-dependent iteration, real network calls and shared resources - and inject each one so the test controls it.