Petri-Pilot is an interactive learning platform for Petri nets. Rather than reading theory, you learn by playing games, modeling workflows, and seeing how ODE simulation reveals strategic insights. Each tutorial builds on the previous one, from basic concepts to complex multi-player state machines.
The platform explores a central question: What if the model was the app?
Petri-Pilot organizes tutorials in a progressive sequence. Each one introduces new Petri net concepts through hands-on examples:
| Tutorial | Concepts | Difficulty |
|---|---|---|
| Tic-Tac-Toe | Places, transitions, arcs, ODE basics | Beginner |
| Coffee Shop | Capacity limits, weighted arcs, rates | Intermediate |
| Texas Hold'em | Roles, guards, event sourcing | Advanced |
| Build Your Own | Visual editor, JSON export | Create |
Start with Tic-Tac-Toe to understand the fundamentals. By the time you reach Texas Hold'em, you'll be modeling complex concurrent systems.
Every tutorial uses the same building blocks. Understanding these six concepts unlocks all Petri net modeling:
The first three define structure (what's possible). Tokens define state (what's current). ODE provides prediction (what will happen). Events provide history (what did happen).
Petri-Pilot uses deterministic code generation. You define a model in JSON, and templates produce a complete application:
The generated stack includes:
This isn't LLM-generated code that needs debugging. Templates produce consistent, predictable output. To change behavior, you change the model and regenerate.
Petri nets are visual and dynamic. Reading about tokens moving through places doesn't build intuition the way playing does. When you make a move in Tic-Tac-Toe and see:
...the concepts click in a way that diagrams alone can't achieve.
The ODE visualization is particularly powerful. Watching strategic value flow through the game tree—seeing why the center square matters more than corners—makes abstract theory concrete.
The simplest complete model. Nine cells, two players, win detection. But even this "simple" game demonstrates:
See Tic-Tac-Toe Model for detailed analysis.
Moves beyond games to workflow modeling. A coffee shop with limited inventory teaches:
The ODE predicts when you'll run out of coffee beans. No scheduling logic—the dynamics emerge from structure.
See Coffee Shop Model for detailed analysis.
Multi-player poker with all the complexity that entails:
This demonstrates that Petri nets scale to production-grade state machines.
See Texas Hold'em Model for detailed analysis.
The visual editor at pilot.pflow.xyz/pflow lets you create custom models. You can:
Traditional development starts with code. Petri-Pilot inverts this: start with a model, generate the code. The model becomes the source of truth.
This matters because:
The experiment asks: can we make the model so good that the application becomes a commodity output? Petri-Pilot suggests the answer is yes.
For the underlying library: go-pflow on GitHub
For theory behind ODE analysis: Declarative Differential Models