Paper · 2026-10-01 · cs.AI
Mimir: Physics-Grounded LLM Agents for Long-Horizon Irrigation Control
Mimir is an LLM agent for daily irrigation. The LLM proposes a depth, a soil-water simulator checks and revises it, a deterministic selector ranks nearby candidates, and a physical bound caps actuation. Slow memory of recurring failures changes only prompts. In retrospective replays it reaches control cost 100.94 with 2.58 mm irrigation, against 790.51 and 5.32 mm for historical replay.
LLM agentAgent memorySelf-refinement (draft, critique, rewrite loop)irrigationagriculturephysical-controlruntime-assurance
AI-compiled by claude-haiku-5-5 on 2026-11-21, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Watering a field is a decision repeated every day. Give too little and the crop runs short of water; give too much and water is wasted and drains below the root zone. Mimir uses a language model as one part of the decision-maker. The model suggests an amount and says why. A simple model of the soil then works out what that amount would do, and the suggestion is revised if the numbers show a problem. A fixed rule picks the best option from a small set of nearby amounts, and a hard limit keeps the amount physically possible before it is sent to the hardware.
Over a season the system also writes short notes about mistakes that keep coming back, and gives those notes to the language model in later decisions. The soil model, the scoring rule and the limits are never changed by these notes. The idea is that the language model can learn from experience in how it reasons, but never gets to rewrite the physics or have the final say over the valve.
TL;DR
Mimir is an LLM-based irrigation controller that keeps the physical model, the scoring rule and the actuator limits outside the language model. Each day the LLM proposes an irrigation depth, which is checked and revised against a deterministic water-balance rollout, then chosen by a deterministic selector and gated by a feasibility bound §4.1 §4.2. A slow loop writes contextual principles from recurring patterns and does not touch the model or the constraints §4.3. On retrospective replays of field-observed data from Michigan, Texas and Colorado, the authors report the lowest control cost among their reference controllers and about 51% less irrigation than historical replay §6.1.
Problem
The authors look at long-running physical control. Actions change later states, errors compound across decisions, and an agent should learn from experience without being allowed to rewrite the physical rules that keep execution safe §1. Their question is which parts of such a controller may be adaptive when an LLM is one of its reasoning components, and which must stay explicit, numerical and enforced from outside §1.
They frame control as minimising expected cumulative physical cost over a horizon T, subject to state dynamics with exogenous forcing and a feasible action set §3, eqs. 1–3. For irrigation, the state is root-zone water, the forcing is precipitation and atmospheric demand, and the action is irrigation depth §3.
The controller uses a lightweight water balance. Reference evapotranspiration comes from FAO-56 Penman–Monteith where the required meteorological variables exist, otherwise from a deterministic fallback fixed before evaluation app. A.
Method
The design has two repair loops. The fast loop runs once per day and handles one decision. The slow loop runs at episode or season boundaries and changes only the persistent context given to the LLM §4.
Physical interface §4.1
- The controller state contains root-zone storage S, field capacity FC, wilting point, crop stage, evapotranspiration, and the decision-time precipitation forecast §4.1 app. A.
- Storage evolves as S(t+1) = S(t) + P(t) + I(t) − ET(t) − D(t) eq. 7. Drainage is the excess above field capacity, D(t) = max(0, S + P + I − ET − FC) app. A.
- Forecast precipitation is converted to retained input by a fixed piecewise transform, P_eff = P(125 − 0.2P)/125 for P ≤ 250 mm and 125 + 0.1P for P > 250 mm app. A.
- The maximum legal irrigation is I_max = max(0, FC − S − P̂_eff), where P̂_eff is the anticipated retained precipitation for the next interval eq. 8. The legal interval is [0, I_max].
- The executed value is the proposal projected into that interval, which is min(max(0, proposal), I_max) eq. 9 app. A.
- The LLM cannot widen this interval, change units, or change the transition parameters §4.1.
Simulator-grounded decision repair §4.2 app. G
- Propose. The LLM receives the structured context and returns a proposal and a rationale eq. 10 app. G.
- Verify. Programmatic tools roll the proposal forward and return structured physical feedback eq. 11.
- Revise. The LLM revises the proposal using that feedback eq. 12.
- Steps 2–3 repeat until verification no longer changes the proposal or three rounds have run §5.4 app. G. The paper names the proposal and verification roles "Farmer" and "Physicist"; it says the contribution is the separation of generation from programmatic verification, not the role names app. G.
- The final proposal is an anchor, not the action. A deterministic selector builds a finite candidate set around the anchor and keeps reference candidates such as zero irrigation and the refill bound §4.2 app. G.
- Each candidate is rolled out over the control horizon, and the rollout gives a count of modelled physical violations and a cost J(a) eq. 13.
- The selector minimises, lexicographically, the violation count and then J(a) eq. 14 app. G.
- The chosen candidate passes runtime assurance and a trusted fallback, and then the final projection eq. 9 §4.2.
Pseudocode of the fast loop, from the steps above:
# Mimir daily decision [§4.2] [app. G]
# Input: state (structured physical state), forecast, principles
# Output: executed irrigation depth (mm)
def decide_irrigation(state, forecast, principles):
# 1. Build the structured context the LLM sees [§4.1] [§5.4]
context = physical_context(state, forecast, principles)
# 2. Compute the legal interval from the physics [§4.1] [eq. 8]
upper = max(0, FC - state.storage - effective_forecast(forecast))
# 3. Propose a depth with rationale [§4.2] [eq. 10]
proposal = llm_propose(context) # malformed output -> fallback
# 4. Verify and revise, at most three rounds [§5.4] [app. G]
for round_index in range(3):
evidence = verify(state, proposal) # numerical rollout [eq. 11]
revised = llm_revise(context, proposal, evidence) # [eq. 12]
if revised == proposal: # equality test not defined in paper
break
proposal = revised
# 5. Candidate set around the anchor, always with 0 and the upper bound
# [§4.2] [app. G]
candidates = bounded_candidates(proposal, upper) # span/step not stated
# 6. Roll out every candidate over the 24 h horizon [§4.2] [eq. 13]
violations = {}
costs = {}
for action in candidates:
violations[action] = count_violations(state, action, forecast)
costs[action] = rollout_cost(state, action, forecast)
# 7. Pick fewest violations, then lowest rollout cost [§4.2] [eq. 14]
best = min(candidates, key=lambda a: (violations[a], costs[a]))
# 8. Runtime assurance, fallback, then the actuation gate [§4.2] [eq. 9]
checked = runtime_assurance(best)
return min(max(0, checked), upper) # projection into [0, I_max]Bounded experience-driven adaptation §4.3 app. H
- The slow loop converts recurring evidence (deliberation traces, repeated verifier corrections, control-cost patterns, runtime interventions) into persistent contextual principles §4.3.
- The update is triggered by an evidence condition. When the trigger is not met, memory stays as it is eq. 6 eq. 15 app. H. Writing this as a function, m(e+1) = G(m(e), τ(e)) if q(e) = 1 and m(e) if q(e) = 0, the trigger q(e) is set by configuration eq. 15.
- The authors implement G with Agentic Context Engineering, which the paper cites as zhang2025agentic §4.3. Each stored principle records where it came from, what sets it off, which way it nudges the action, when it does not apply, the evidence behind it, a version number, and whether it is active app. H.
- The model weights, the physical parameters and transition equations, the evaluator, the action bounds and the runtime assurance are fixed. Memory cannot use future held-out outcomes, relax a bound, change the scoring rule or skip the selector §4.3 app. H.
# Slow loop: persistent context update [§4.3] [app. H]
# Input: memory (principles), season_record (finished season)
# Output: memory for the next season
def end_of_season(memory, season_record):
# 1. Test the recurrence trigger on the finished season [eq. 6]
if not recurrence_trigger(season_record):
return memory # no update unless the trigger fires
# 2. Distil principles with ACE; only the LLM context changes [§4.3]
candidate = ace_update(memory, season_record)
# 3. Store each principle with source, trigger, exception, evidence
# [app. H]
return candidateLLM interface app. F
- Main configuration: DeepSeek-14B, frozen, served locally through Ollama §5.4 app. F.
- Decoding: greedy with temperature zero where applicable, a fixed software seed, reasoning mode off, JSON output format, and a 2048-token prediction limit app. F.
- Only the designated action fields are parsed. Malformed responses take a deterministic fallback path that cannot bypass selection, assurance or the gate app. F.
- No weight update, fine-tuning or gradient step happens during control or across seasons app. F.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| LLM backbone | DeepSeek-14B via Ollama | §5.4 app. F | "unless stated otherwise" in the text |
| Fast-loop rounds | 3 (proposal, verification, revision) | §5.4 app. G | fixed budget |
| Decision interval | every 24 h | §5.1 app. C | |
| History window | 168 h | §5.1 app. C | |
| Forward horizon | 24 h | §5.1 app. C | |
| Physical integration | hourly | §5.1 app. C | |
| Calibration / evaluation split | first 60% / last 40% of each segment, no shuffling | §5.1 app. C | |
| Root-zone depth Z_root | 600 mm | app. A | "reported configuration" |
| Effective-precipitation transform | piecewise, breakpoint at 250 mm | app. A | fixed heuristic |
| Decoding | temperature 0 where applicable, fixed seed, think=False, format=json, num_predict=2048 | app. F | |
| Cost weights w_W, w_S, w_R, w_L | not stated | app. D | the appendix says they should be copied from the frozen configuration in the final version |
| Stress threshold S_stress | not stated | app. D | |
| Field capacity and wilting point per site | not stated; FC = 71.8 mm appears only in an illustrative trace | app. G | |
| Soil parameters | calibrated on the calibration portion, values not stated | app. B | |
| Candidate span and step size | not stated | app. M | |
| Memory trigger, memory budget, reset rule | not stated | app. H | |
| Repeats, seeds, sample count n | not stated | app. D app. M | |
| LLM training | none; the LLM is frozen | app. F |
Results
Author-reported. Retrospective closed-loop replay of field-observed weather and records for Michigan potato, Texas maize and Colorado maize, under a common evaluator §5.1 §6.1. The nine-season Colorado sunflower sequence is analysed separately §6.4. Values are mean ± standard deviation over the repeated evaluation units; the unit and n are not stated app. D.
Aggregate over the main sites tab. 2 §6.1:
| Controller | Control cost ↓ | Irrigation (mm) |
|---|---|---|
| Mimir | 100.94 ± 1.80 | 2.58 ± 0.12 |
| MAD-50 | 134.33 ± 3.10 | 10.58 ± 0.44 |
| ET-Replace | 440.74 ± 12.48 | 12.70 ± 0.31 |
| DRLIC | 924.47 ± 27.50 | 0.35 ± 0.00 |
| Historical irrigation replay | 790.51 ± 17.76 | 5.32 ± 0.57 |
Per environment for Mimir §6.1 app. I: Michigan 152.25 ± 5.91 cost and 1.54 ± 0.38 mm; Texas 129.16 ± 2.71 and 3.80 ± 0.31 mm; Colorado 59.82 ± 4.07 and 3.43 ± 0.19 mm. The authors do not rank the environments by cost §6.1 fig. 3.
Paired component ablations tab. 3 §6.2 §6.3 §6.4. Each row has its own matched slice, so the full-system values differ between rows:
| Removed component | Full cost | Full water (mm) | Ablated cost | Ablated water (mm) |
|---|---|---|---|---|
| Persistent context (ACE) | 103.0 | 3.40 | 157.5 | 4.41 |
| Decision repair | 109.1 | 2.47 | 180.5 | 3.19 |
| Execution shield | 147.2 | not reported | 259.9 | "approximately unchanged" |
| Forward simulator | 149.5 | 3.29 | 730.5 | 0.45 |
Nine-season Colorado sunflower sequence §6.4 app. L: the largest annual cost is 272.15 in Year 5, followed by lower values with no sustained divergence. The authors describe this as operational stability, not as year-on-year learning §6.4 app. L.
Model scale and family app. K: DeepSeek-14B 96.23 ± 12 cost at 2.585 mm; DeepSeek-8B 103.54 ± 18 with lower irrigation; 32B and 70B in a comparable range. The family sweep covers DeepSeek, Qwen, Llama, Gemma and Granite; the DeepSeek entry gives 101.92 cost and 4.26 mm, and the other families fall in the same broad range. The authors report no monotonic gain with model size.
Paper vs code
No official code.
I searched in this order and found nothing that belongs to the authors:
- The arXiv abstract page: no code, repository or project link, and no comments field.
- The LaTeX source: no repository URL. The appendix says the source code is intended for public release upon publication app. M.
- GitHub repository search via the API: "mimir" (no irrigation match in the results read), "mimir irrigation", "Mimir LLM irrigation", "long-horizon irrigation control", and "physics-grounded LLM agents". The only plausible hit is a vineyard advisory repository from an unrelated owner with no link to the paper, so it was not used.
- GitHub user search for "zhichao cao" with "michigan": no match.
Every default value in this card therefore comes from the paper alone, and none has been checked against an implementation.
Pitfalls
- Two different 14B numbers. The main result for DeepSeek-14B is 100.94 cost at 2.58 mm tab. 2. The model-scale sweep reports 96.23 ± 12 cost at 2.585 mm for the same checkpoint app. K. The text does not explain the gap. Treat the 2.58 mm water figure as consistent, and the cost figures as not reconciled.
- Family sweep and size. The DeepSeek entry in the family sweep (101.92 cost, 4.26 mm) does not say which DeepSeek size was used app. K.
- Ablations are not ranked. The four rows use four different matched slices, and the full-system value changes from row to row (103.0, 109.1, 147.2, 149.5). Compare cost change within a row only. The paper says so too §6.2 app. C.
- Cost cannot be reproduced from the text. The weights for the four cost terms and the stress threshold are not given, and the appendix defers them to a frozen configuration app. D. Any cost you compute will differ from the paper unless you recover those values.
- Notation drift. The problem section writes the proposal as z(t) and the executed action as a(t) §3. The design section uses the tilde-a proposal and an irrigation value I(t) §4. The reader must map one onto the other.
- Repair stopping rule. The loop stops when verification "no longer changes" the proposal. The text does not say whether this is exact equality, a tolerance, or a comparison of decisions. Each stopping rule changes the number of LLM calls per day, and the number of calls is not reported.
- Candidate set. The anchor's neighbourhood is described as bounded, but the span, the step size and the tie-break rule are not stated app. M §4.2.
- Controller model vs evaluator. The controller uses a lightweight balance, and the physical process is integrated hourly for the evaluation. The text does not say whether the controller's rollout runs hourly or daily, or whether it uses the same parameters as the evaluator §4.1 §5.1.
- Forecast construction. The appendix refers to a "precipitation-persistence construction where that forecast rule is used", but does not define it app. C. Reproducing the causal forecast input needs this.
- Fallbacks are unspecified. The ET fallback path and the malformed-output fallback are only described as deterministic and fixed in advance app. A app. F.
- Memory details are missing. The trigger, the memory budget, the reset rule and the ACE prompts and roles are not given in the paper app. H. The slow loop cannot be reimplemented from the text alone.
- Uncertainty. The paper reports mean ± standard deviation without a significance test or confidence interval, and it does not state n app. D. It explicitly makes no significance claim app. D.
- Evidence scope. The evaluation is retrospective replay, not a field deployment §1 §5. The authors do not claim that the memory improves every year or is immune to forgetting §6.4 app. N.
- Reference controllers. The historical replay is a management reference, not a yield comparison §5.2 app. E. The DRLIC reference is the authors' own reproduction; its training details are not given app. E. Its low water use with the highest cost shows that the cost weights decide the ranking §6.1.
- Cost of the decision. Latency and total token cost per day are not reported, although the loop can make several LLM calls per decision.
- Figures. Figure 1 is a teaser for the physical-embedded control loop, Figure 2 is the two-timescale system diagram, and Figure 3 shows regional cost and irrigation fig. 1 fig. 2 fig. 3. The appendix figures show model scale and family sensitivity and the nine-season curves app. K app. L.
Lineage
- Builds on: FAO-56 for reference evapotranspiration and crop-water relations §2 app. A; model predictive control and learning-based irrigation as control references §2; Agentic Context Engineering (cited as zhang2025agentic) for the slow loop §4.3.
- Related: Self-Refine and multi-agent debate, which revise LLM output through critique or debate, and VIRF, which couples a planner to a logic checker §2. The paper argues that language agreement is not physical evidence, so it does not treat these as equivalents §1.
- Compared against: MAD-50, ET-Replace, DRLIC, historical replay, zero irrigation, a fixed-threshold controller and a deterministic physics-search reference used as a diagnostic §5.2 app. E.
- Superseded by: not stated.
Source and license
Adapted from “Mimir: Physics-Grounded LLM Agents for Long-Horizon Irrigation Control” by Yimeng Liu, Mi Zhang, Younsuk Dong, Zhichao Cao (arXiv:2610.02038), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.