Loading...
Loading...
Browse 6 real-world technical and behavioral interview questions about Determinism. Review scenarios, edge cases, and architectural best practices.
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.
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.
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.
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.
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.
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.