noDice: Inference for Discrete Probabilistic Programs with Nondeterminism and Conditioning
This paper introduces noDice, a system that extends the discrete probabilistic inference engine Dice to support nondeterminism by constructing Markov Decision Processes and utilizing decision diagrams to efficiently infer distributions over schedulers in loop-free programs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to predict the future of a complex system, like a self-driving car navigating a busy city or a robot trying to catch a moving target. You know some things are random (like a sudden gust of wind), but other things are completely unknown or up to a "bad actor" (like a pedestrian who might suddenly run into the street).
This is the problem noDice solves. It is a new tool for computer scientists to calculate the worst-case scenario for systems that mix randomness (probability) with unknown choices (nondeterminism).
Here is a simple breakdown of how it works, using everyday analogies.
1. The Problem: The "Unknown Driver"
Most computer programs that deal with chance (like predicting weather or stock markets) assume they know the odds. They say, "There is a 70% chance of rain."
But in the real world, sometimes we don't know the odds. Maybe a driver is erratic. Maybe a hacker is trying to break in. In computer science, we call this nondeterminism. It's like a driver who could go left or right, but we don't know their strategy. They might be a cautious driver, a reckless one, or they might change their mind every second.
When you add conditioning (looking at evidence, like "The car did swerve left") to this mix, things get incredibly messy. Traditional tools either ignore the unknown driver or get overwhelmed trying to check every single possibility, crashing the computer.
2. The Solution: The "noDice" Detective
The authors created noDice, a tool that acts like a super-smart detective. Instead of trying to guess what the unknown driver will do, it asks: "What is the absolute worst thing that could happen, given the evidence we have?"
It doesn't just guess; it calculates the maximum possible probability of a bad outcome across all possible strategies the "unknown driver" could use.
3. How It Works: The Three-Step Magic Trick
The paper describes a clever three-step process to solve this without the computer exploding:
Step 1: The Translation (Boolean Compilation)
Imagine you have a messy story about a car chase. noDice first translates this story into a giant, complex logic puzzle made of True/False switches.
- It separates the story into two parts:
- The Action: What the car actually does.
- The Clues: What the sensors saw (e.g., "The car was at the intersection").
- It turns the whole scenario into a massive equation of "If this switch is on, then that happens."
Step 2: The Compression (Decision Diagrams)
If you tried to write out every possible path the car could take, you'd end up with a book longer than the Encyclopedia Britannica. This is where Decision Diagrams come in.
- Think of this as a smart map. Instead of drawing every single road, the map merges roads that look the same.
- If two different paths lead to the same traffic jam, the map draws them as one single line.
- This shrinks a massive, impossible-to-read book into a tiny, manageable pamphlet. This is the secret sauce that makes noDice fast.
Step 3: The Game Board (Markov Decision Process)
Finally, noDice turns that compressed map into a board game called a Markov Decision Process (MDP).
- Imagine a board game where some moves are determined by rolling a die (randomness), and other moves are chosen by a player trying to win (the unknown driver).
- noDice uses a special algorithm to ask: "If the player plays the worst possible game against us, what are the odds we lose?"
- It calculates this "worst-case" probability efficiently, ignoring all the redundant paths it already compressed in Step 2.
4. Why It Matters: The "Plane Landing" Example
The paper uses a great example: A plane trying to land while a car is crossing the runway.
- The Randomness: The car's sensors are fuzzy. Sometimes they see the car, sometimes they don't.
- The Nondeterminism: The car's driver is unpredictable. They might speed up, slow down, or stop. We don't know their plan.
- The Question: "Given that our sensors saw the car at specific spots, what is the maximum probability that the car is still on the runway when the plane lands?"
Old tools would either give up or take hours to calculate. noDice does it in seconds. It tells the pilot: "Even if the driver is trying their hardest to cause a crash, there is only a 3.6% chance they succeed." That gives the pilot confidence to land.
5. The Result: Faster and Smarter
The authors tested noDice against other top-tier tools.
- On simple problems: It's just as fast as the best tools.
- On complex, high-stakes problems: It is much faster. While other tools get stuck trying to count billions of possibilities, noDice uses its "smart map" (Decision Diagrams) to skip the boring parts and focus on the critical ones.
Summary
noDice is a new way to predict the future when you have both luck (randomness) and mystery (unknown choices). It translates complex code into logic puzzles, compresses them into a tiny map, and then runs a game simulation to find the worst-case scenario. It helps engineers build safer AI, better networks, and more reliable robots by answering the question: "What is the absolute worst that could go wrong?"
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.