How each demonstration works
Every demonstration follows the same path the book does, so you always know what comes next.
Predict first
Read the question and the equation from the chapter, then choose or make a guess. A wrong guess is useful.
Change one value
Pick from a short menu. The picture and the numbers update together, starting from the chapter's own example.
Read the work
Every state shows the calculation behind it, small enough to redo with a pencil.
Check yourself
Open the check question and the answer. Each demonstration names the section it came from.
Download the laboratory
Everything here is free. The complete archive runs on your own computer with Python; the PDFs need nothing.
- Complete lab, ZIP12.8 MB. Notebooks, readers, skills, workbook, code and tests.
- WorkbookProblems for every chapter, PDF.
- SolutionsSeparate worked solutions, PDF.
- Notation guideEvery symbol the book and lab use, PDF.
- Field guideChoose a working route through the lab, PDF.
- Laboratory guideReading pages, one per chapter, with the notebook results.
How New Behavior Appears
Emergence as a measurement question: when a score jumps, what changed, how to measure it, and how to forecast it honestly.
When a Score Becomes a Skill
Compare continuous evidence and thresholded scores without attributing a mechanism.
How to Measure Emergence
Compute the signed four-cell contrast, positive amount, and valid share.
How to Predict Emergence
Fit a declared curve on development data and score a separate test.
The Path from Prediction to Action
Return reachable states, a permitted path, and sinks under frozen permissions.
What the Model Becomes Inside an Agent
Compose a chooser and tool kernel, then separate marginal from trajectory reliability.
Choice
Prices for choices, decisions that look ahead, and acting when the state is hidden.
The Price of a Choice
Return an expected-utility choice and a break-even value under declared stakes.
The Equation That Looks Ahead
Compute a finite-horizon optimal policy and its value by backward induction.
Acting in the Dark
Update a belief and calculate gross and net one-step information value.
Planning and Learning
Search, plans within plans, curiosity, credit assignment and learning from trajectories.
Searching the Future
Execute A* and audit supplied heuristic admissibility and cost.
Plans Within Plans
Compute option returns with duration discounting and explicit completion.
The Mathematics of Curiosity
Compare greedy, UCB, and Thompson choices in a declared stationary bandit.
Credit for Consequences
Compare Monte Carlo, TD(0), and accumulating TD(lambda) updates on one trajectory.
Learning to Choose
Train a seeded softmax policy with REINFORCE and evaluate a separate success predicate.
Agent Architectures
Models of the world, memory, thought as search, consequences of actions and interfaces.
Building a World Inside
Calculate uniform transition error, actual fixed-policy finite values, and conditional bounds.
What an Agent Should Remember
Choose fresh valid records and inspect action preservation under compression.
Thought as Search
Separate candidate coverage from actual selector success and choose a feasible allocation.
State and Consequence
Separate effects from acknowledgements and price a next recovery step.
When an Action Has Coordinates
Compare coordinate, semantic, and version-bound action contracts.
Societies of Agents
Other minds in the environment, messages and consensus, markets, teams and institutions.
When Another Mind Becomes Part of the World
Compute diagonal, cross-play, and deployment-mixture performance.
Messages, Beliefs, and Consensus
Enumerate bounded message worlds and distinguish agreement from local knowledge.
Markets, Teams, and Institutions
Compare Braess equilibrium, social optimum, tolls, and overhead.
Trust
Safety, security, capability measurement, safe improvement, ceilings and delegation.
Safe Enough to Act
Compare penalty choice with hard authorization and expected-risk constraints.
When the Environment Gives Instructions
Replay a fictitious attack trace against capability, provenance, and review checks.
How Much Capability Have We Extracted?
Report observed denominators, matched differences, uncertainty assumptions, and target mixtures.
Improving an Agent Without Trusting the Improvement
Select on development and check only the frozen winner against a declared guard contract.
How Much More Could the System Become?
Separate bank oracle coverage, actual choice, and permission-filtered success.
The Mathematics of Delegation
Compute a review queue diagnostic and identify required handoff packets and release blockers.
Every chapter in one list
Guide page, notebook and chapter skill for each chapter.
- 1. When a Score Becomes a Skill · notebook · skill
- 2. How to Measure Emergence · notebook · skill
- 3. How to Predict Emergence · notebook · skill
- 4. The Path from Prediction to Action · notebook · skill
- 5. What the Model Becomes Inside an Agent · notebook · skill
- 6. The Price of a Choice · notebook · skill
- 7. The Equation That Looks Ahead · notebook · skill
- 8. Acting in the Dark · notebook · skill
- 9. Searching the Future · notebook · skill
- 10. Plans Within Plans · notebook · skill
- 11. The Mathematics of Curiosity · notebook · skill
- 12. Credit for Consequences · notebook · skill
- 13. Learning to Choose · notebook · skill
- 14. Building a World Inside · notebook · skill
- 15. What an Agent Should Remember · notebook · skill
- 16. Thought as Search · notebook · skill
- 17. State and Consequence · notebook · skill
- 18. When an Action Has Coordinates · notebook · skill
- 19. When Another Mind Becomes Part of the World · notebook · skill
- 20. Messages, Beliefs, and Consensus · notebook · skill
- 21. Markets, Teams, and Institutions · notebook · skill
- 22. Safe Enough to Act · notebook · skill
- 23. When the Environment Gives Instructions · notebook · skill
- 24. How Much Capability Have We Extracted? · notebook · skill
- 25. Improving an Agent Without Trusting the Improvement · notebook · skill
- 26. How Much More Could the System Become? · notebook · skill
- 27. The Mathematics of Delegation · notebook · skill
Setup and recovery help: START-HERE. Running the notebooks needs Python and the packages listed there.