45Build a simulation harness that evaluates a non-deterministic researcher-writer multi-agent system under injected faults.▼expertScale AIAnthropicOpenAI1 replies◆ premiumYou cannot unit-test a stochastic two-agent pipeline with a golden output. You evaluate it the way you stress a distributed system: thousands of simulated runs, controlled fault injection, and a judge calibrated against humans.Open full answer →
88Given a biased coin, produce a fair coin flip▼mediumGoogleMetaTwo Sigma2 replies◆ premiumYou have a coin that lands heads with some unknown probability p. Build a fair 50/50 flip from it without knowing p. The von Neumann trick is two lines; the part that scores is explaining why the bias cancels and how many flips it costs.Open full answer →
89Simulate an infection spreading across a grid over time▼mediumOpenAIGoogleAmazon1 replies◆ premiumA grid where some cells start infected, and each step every infected cell infects its orthogonal neighbors. How many steps until everything is infected, or -1 if some cell is unreachable? This is rotting oranges in disguise, and the multi-source BFS framing is what they want to hear.Open full answer →