PitForge — Exact Ultimate Pit Limit & Nested Whittle Pit-Shell Workbench
An open-pit mine-design workbench that solves the ultimate pit limit exactly, as a maximum-weight closure of the block-precedence graph reduced to a minimum cut on a Dinic max-flow engine, running live in the browser, and derives the nested Whittle pit shells by revenue factor. It reproduces the published optima of three real MineLib instances to at most 2e-9 relative error, and self-checks every solve with the max-flow duality identity. This is the only one of the Faena four whose headline is validated against third-party published optima rather than its own generator.
Business Context
The ultimate pit and its nested shells set the envelope for reserves, phasing and cash flow, so a wrong or unauditable pit propagates into every downstream number. PitForge's value is that its exact answer is checkable two ways: against published third-party optima it did not create, and against the max-flow duality identity on every single solve. A 14,153-block instance with 219,778 precedences solves exactly in about 259 ms median in the browser, which puts a design-grade optimiser on a static page with no server and no licence. The learned surrogates are positioned honestly as fast approximations for what-if exploration, never as replacements for the exact result.
Strategic Value
PitForge is the most strongly validated of the Faena four, and the validation is third-party: its exact ultimate pit reproduces three published MineLib optima (newman1, zuck_small, kd) to at most 2e-9 relative error, with the largest solved in about 259 ms in the browser. Two honesty properties reinforce it. Scenario knobs are locked in real mode because the MineLib instances publish their own net values and precedences, so re-deriving them would break comparability with the published optimum, a deliberate decision to protect the benchmark. And the learned grade-nn is reported as a tie, not a win: R2 0.9613 against ordinary kriging 0.958, a 0.0033 margin the artifact itself calls a fast approximation that never beats the exact result. The CPIT relaxation publishes its 10.46% integrality gap rather than hiding it. It is a reusable pattern for an auditable, self-checking optimiser that proves itself against numbers it did not author.
The Challenge
The ultimate pit limit, the set of blocks worth mining once slope precedences are honoured, is the foundation of every open-pit design, and it has an exact solution: the maximum-weight closure of the precedence graph, equivalent to a minimum cut. In practice it is often approximated, or locked inside commercial software whose results cannot be reproduced or audited. Proving an implementation is correct requires more than "it returns a pit": it requires matching a published optimum on an instance you did not generate yourself, and checking the solver against its own duality identity on every run.
Our Approach
PitForge solves the ultimate pit limit as a maximum-weight closure, reduced to a minimum cut via Picard's 1976 construction and solved by a Dinic max-flow engine written in TypeScript, running live in the browser. The exact result is what it is described as: this is the max-closure / min-cut equivalent of Lerchs-Grossmann, not a re-implementation of Lerchs-Grossmann, and not Hochbaum's pseudoflow (referenced only as computing the same cut). From the exact pit it derives the nested Whittle pit shells over an ascending revenue-factor schedule, yielding value, tonnage and strip-ratio curves. Grade estimation runs three ways live (IDW, ordinary kriging, and a grade-nn ONNX surrogate over a 27-vector neighbour stencil), plus a pit-inclusion surrogate. A CPIT LP relaxation (scipy HiGHS) with greedy integer rounding is computed offline and rendered from JSON, never live. Every solve asserts pitValue = sum(positiveValue) minus maxflow. Static on GitHub Pages, with an in-app drag-and-drop CSV path for bring-your-own block models.
Key Performance Indicators
| KPI | Baseline | Result | Impact |
|---|---|---|---|
| Correctness, third-party validated | Returns "a pit" with no external check | Reproduces 3 published MineLib optima (newman1, zuck_small, kd) to <= 2e-9 relative error | Validated against optima it did not generate, not against its own output |
| Exact solve, in the browser | Approximate pit, or a licensed desktop solver | 14,153 blocks / 219,778 precedences solved exactly in ~259 ms median (Dinic min-cut over Picard reduction) | Design-grade optimiser on a static page, zero backend |
| Self-check on every solve | Trust the returned number | pitValue = sum(positive) - maxflow asserted on every solve (max-flow duality identity) | The optimiser checks itself, not just the caller |
| Learned surrogate, honestly scoped | Claim the neural net beats kriging | grade-nn R2 0.9613 vs ordinary kriging 0.958 (a tie); reported as a fast approximation, never beating the exact result | A 0.0033 margin is a tie, and the card says so |
Architecture
pitforge pipeline
The exact pit, in the browser, checked against published optima
PitForge is an open-pit mine-design workbench. It solves the ultimate pit limit exactly, as a maximum-weight closure of the block-precedence graph reduced to a minimum cut on a Dinic max-flow engine, running live in the browser, and derives the nested Whittle pit shells by revenue factor. Live at pitforge.fasl-work.com, part of the Faena mining-analytics hub.
Say what the engine is
The exact result is the max-closure / min-cut equivalent of Lerchs-Grossmann, via Picard’s 1976 reduction on a Dinic engine. It is not a re-implementation of Lerchs-Grossmann, and it is not Hochbaum’s pseudoflow, which is referenced only as computing the same cut. From the exact pit, nested Whittle shells over an ascending revenue-factor schedule give value, tonnage and strip-ratio curves.
Validated against MineLib, not against itself
The exact pit reproduces the published optima of three real MineLib instances:
- newman1: 1,060 blocks, solved in 5.2 ms median, relative error 9.96e-10
- zuck_small: 9,400 blocks, 237 ms, 1.86e-10
- kd: 14,153 blocks / 219,778 precedences, 259 ms, 1.30e-10
All three match: true. Two further instances (marvin, mclaughlin_limit) are excluded with committed reasons (marvin ships with commercial Whittle software; neither has a verified public mirror) rather than silently dropped. In real mode the scenario knobs are locked, because the instances publish their own net values and precedences and re-deriving them would break comparability with the published optimum.
Honest about the learned and offline rungs
Every solve asserts the duality identity pitValue = sum(positive) - maxflow, so the optimiser checks itself. Grade estimation runs three ways live (IDW, ordinary kriging, and a grade-nn ONNX surrogate); the learned grade-nn is a tie, not a win (R2 0.9613 vs ordinary kriging 0.958, a 0.0033 margin), and the artifact calls it a fast approximation that never beats the exact result. Scheduling is a CPIT LP relaxation computed offline with scipy HiGHS, rendered from JSON, never live; it publishes a certified NPV upper bound with a 10.46% integrality gap, and states plainly that the rounded schedule is a heuristic and is never optimal. It is a design optimiser, not a JORC or NI 43-101 resource estimate.
Technology Stack
In action
A short tour of the live app — the real interface, recorded from the deployed site.

Application Screenshots

