Greedy Algorithm: Simulated Annealing, Semivariogram Matching, and WCSB Reservoir Geostatistical Modeling
A greedy algorithm is a problem-solving procedure that builds a solution one step at a time, always choosing the option that looks best at that moment without revisiting earlier choices, on the assumption that a sequence of locally optimal moves will produce a good overall result. In petroleum geostatistics and reservoir characterization, the term names a specific acceleration technique used inside simulated-annealing runs that generate stochastic models of reservoir properties such as porosity, permeability and facies. Simulated annealing builds a property model by perturbing it repeatedly, swapping or modifying grid-cell values, and accepting or rejecting each perturbation against an objective function that measures how far the model's statistics deviate from a target. The most common target is the semivariogram, the function that quantifies how property values become less correlated as the distance between two points increases, capturing the spatial continuity of a geological feature such as a channel sand or a fracture corridor. A pure annealing scheme accepts some worsening swaps early on to escape local minima, but it is computationally heavy because every perturbation requires recomputing part of the objective. The greedy variant speeds this up by using a fast swapping technique that accepts only improving moves, matching the model semivariogram to the actual semivariogram data far more quickly at the cost of some risk of settling into a local rather than global optimum. The trade-off is the defining character of any greedy method: speed and simplicity in exchange for no guarantee of the best possible answer. Many practical workflows blend the two, running a greedy phase to converge most of the way fast, then a slower annealing phase with occasional uphill acceptance to refine the result. In the Western Canadian Sedimentary Basin, these algorithms power the geological models that underpin development decisions in heterogeneous plays. A Montney or Duvernay reservoir model may carry millions of grid cells, and matching the lateral and vertical semivariograms of permeability across that grid by brute force would be intractable, so the greedy swapping technique makes building dozens of equiprobable realizations practical on standard workstation hardware. Those realizations feed directly into reserve estimates booked under National Instrument 51-101 disclosure, into well-spacing and frac-design optimization, and into the uncertainty ranges operators such as ARC Resources, Tourmaline and Cenovus carry into capital decisions. The greedy algorithm is therefore not an abstract computer-science curiosity here; it is a quiet workhorse inside the geomodeling software that converts sparse well and seismic data into the spatial property fields a flow simulator needs.
Key Takeaways
- Locally optimal, never reconsidered: A greedy algorithm makes the best-looking choice at each step and never backtracks, trading the guarantee of a global optimum for speed and simplicity. In reservoir geostatistics this means accepting only improving swaps during a simulated-annealing run, which converges fast but can settle into a local minimum that a slower full-annealing scheme with uphill acceptance would have escaped.
- Semivariogram matching is the target: The greedy swapping technique exists to match a model's semivariogram to measured semivariogram data quickly. The semivariogram encodes how property values decorrelate with distance, capturing the spatial continuity of channels, sands and fractures, so matching it forces a stochastic model to honour the real geological architecture inferred from WCSB well logs and core.
- Speed versus optimality trade-off: The core property of any greedy method is fast, simple convergence at the cost of no optimality guarantee. Practical geomodeling workflows exploit this by running a greedy phase to get most of the way to a match, then switching to a slower annealing phase with occasional worsening moves to refine the result and avoid being trapped in a poor local solution.
- Enables million-cell WCSB models: Matching semivariograms across the millions of grid cells in a Montney or Duvernay model by exhaustive optimization is computationally intractable. The greedy fast-swap technique makes it feasible to build dozens of equiprobable realizations on standard hardware, providing the uncertainty range engineers need rather than a single deterministic and likely overconfident model.
- Feeds reserves and development decisions: The realizations these algorithms produce flow into flow simulation, well-spacing studies, frac design and reserve estimates disclosed under NI 51-101. The quality of the semivariogram match directly affects how faithfully the model represents reservoir heterogeneity, and therefore the reliability of the production forecasts and capital decisions built on top of it.
Why Greedy Acceleration Matters in Annealing
Simulated annealing is powerful but slow because its strength, the willingness to accept worsening moves to escape local minima, also means it wanders. Every perturbation requires updating an objective function that measures semivariogram mismatch, and on a large grid that cost compounds over millions of iterations. The greedy modification restricts acceptance to moves that lower the objective and uses a fast incremental update that recomputes only the affected pairs rather than the whole semivariogram. The result is rapid descent toward a good match. The danger is premature convergence: the model locks onto a configuration that honours the data adequately but is not the best available, which is why analysts monitor the objective-function plateau and may restart from a new seed.
Honouring Hard Data in WCSB Realizations
A geostatistical realization must reproduce two kinds of information at once: the hard data at well locations, where porosity and permeability are known from logs and core, and the spatial-continuity statistics encoded in the semivariogram. Greedy swapping handles this by freezing the cells that carry hard well data and only perturbing the unconditioned cells between wells. In a tightly drilled Montney pad with wells on 250 to 300 m spacing, this keeps each realization consistent with every penetration while still exploring plausible interwell heterogeneity. The spread across realizations then quantifies the geological uncertainty that single-model deterministic mapping would hide, feeding directly into probabilistic reserve and economic ranges.
Fast Facts
The name simulated annealing borrows directly from metallurgy: annealing is the slow controlled cooling of metal that lets atoms settle into a low-energy crystal lattice, and the 1983 algorithm by Kirkpatrick and colleagues at IBM mimicked that physics to solve optimization problems, using a temperature parameter to control how often worsening moves are accepted. A greedy algorithm is the zero-temperature limit of the same idea, where the temperature is held at zero so no uphill move is ever accepted. The entire family of stochastic geomodeling tools that map WCSB reservoirs descends from this single thermodynamic analogy.
Related Terms
The greedy algorithm operates inside the broader toolkit of reservoir geostatistics. The semivariogram is the target statistic it matches, describing spatial continuity, and kriging is the related deterministic interpolation method that honours the same semivariogram but produces a single smooth estimate rather than multiple realizations. The realizations the greedy swapping builds become the input grids for reservoir simulation, where flow equations are solved to forecast production, and they ultimately support the original oil in place volumetrics that anchor reserve bookings and field economics.
Real-World WCSB Scenario: Duvernay Permeability Modeling
A Kaybob Duvernay operator near Fox Creek is building a static model to optimize horizontal well spacing across a 12-section land block. The team has permeability data from eight cored vertical pilots and porosity logs from forty horizontals, and they want a realistic interwell permeability field that honours the measured semivariogram, which shows a 900 m lateral correlation range aligned with the regional stress fabric. A pure simulated-annealing match on the 4-million-cell grid would take many hours per realization on the workstation, making the planned 50-realization uncertainty study uneconomic in the project's CAD 180,000 subsurface budget.
By running a greedy fast-swap phase to converge each realization most of the way, then a brief annealing polish, the team builds all 50 realizations overnight. The resulting permeability uncertainty range narrows the recommended well spacing from a guessed 280 m to a data-supported 320 m, saving roughly one well per section across the block at over CAD 8 million per avoided well.