Lawfare Academy — Quantitative Decision Laboratory
Python 3.10 or newer; standard library only.
Run: python laboratory.py selftest
Run: python laboratory.py demonstrate
All examples and data are fictional. The local SQLite database is temporary.
The code does not train a generative model, access real accounts or perform external actions.
Investigations:
1. Change the queue's arrival rate and identify the stability boundary.
2. Re-solve the product mix after a capacity change; do not round a continuous solution as if integer-feasible.
3. Reproduce regression standard errors and alter the error structure; distinguish calculation from valid inference.
4. Change asymmetric loss and compare forecasts without future data.
5. Add period-dated events and hand-reconcile the cash metric before changing the SQL.
6. Introduce a missing rollback deliberately and show the audit-failure test detect it, then restore the code.
7. Run actual competing SQLite connections and inspect the persisted refund sum.
8. Change classification cost and review capacity; a lower error cost may be operationally infeasible.
Each result depends on the assumptions developed in the linked Academy units. Passing these tests is not certification of a production system or academic equivalence.
