Allocate restless bandit interventions

Allocate scarce recurring interventions across evolving Markov units with Whittle indices, explicit indexability checks, and paired policy simulation.

What it's for

Extends single-context LinUCB recommendations into portfolio-wide dynamic allocation when unattended teams or projects continue to evolve.

What you give it

Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
discount_factor number ≥ 0.5, ≤ 0.999 Your calibration Optional
evaluation_horizon integer ≥ 1, ≤ 250 Your calibration Optional
intervention_capacity integer ≥ 0 Your calibration Yes
max_detail_rows integer ≥ 1, ≤ 5000 Numerical control Optional
seed integer Numerical control Optional
simulations integer ≥ 200, ≤ 20000 Numerical control Optional
units array of objects (6 fields) Evidence Yes

Each units record

Field Type Required
active_transition_matrix array of array (≥ 2 items) Yes
current_state integer (≥ 0) Yes
id string (non-empty) Yes
intervention_cost number (≥ 0) Yes
passive_transition_matrix array of array (≥ 2 items) Yes
state_values array of number (≥ 2 items) Yes
Example input
{
  "evaluation_horizon": 12,
  "intervention_capacity": 1,
  "seed": 4,
  "simulations": 200,
  "units": [
    {
      "active_transition_matrix": [
        [
          0.1,
          0.9
        ],
        [
          0.05,
          0.95
        ]
      ],
      "current_state": 0,
      "id": "payments",
      "intervention_cost": 1,
      "passive_transition_matrix": [
        [
          0.9,
          0.1
        ],
        [
          0.3,
          0.7
        ]
      ],
      "state_values": [
        0,
        10
      ]
    },
    {
      "active_transition_matrix": [
        [
          0.1,
          0.9
        ],
        [
          0.05,
          0.95

Truncated for display — the full payload is 95 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "assumptions": [
    "Each unit follows the supplied stationary controlled Markov transitions, with state value and intervention cost measured on one additive utility scale.",
    "Whittle allocation is justified only when each relaxed single-unit problem is indexable; otherwise the function withholds a deployment recommendation.",
    "Units evolve even when passive, intervention effects occur through future-state transitions, and at most the declared capacity can be active in a period.",
    "This allocates reversible team- or project-level support under a governed model; it must not be used as an automated employment or individual-surveillance decision."
  ],
  "configuration": {
    "all_units_indexable": true,
    "detail_rows_returned": 3,
    "detail_rows_truncated": 0,
    "discount_factor": 0.95,
    "evaluation_horizon": 12,
    "intervention_capacity": 1,
    "selected_now_count": 1,
    "simulations": 200,
    "unique_unit_models": 1,
    "units": 3
  },
  "decision": "deploy_whittle_allocation",
  "intervene_now": [
    "data"
  ],
  "method": "discounted_whittle_index_restless_bandit_v1",
  "portfolio_evaluation": {
    "expected_discounted_value": 174.4525,
    "incremental_expected_discounted_value": 99.309,
    "incremental_value_interval": {
      "high": 157.3593,
      "low": 45.6107
    },
    "no_intervention_expected_discounted_value": 75.1435,
    "probability_beats_no_intervention": 1
  },
  "unit_indices": [
    {
      "current_state": 0,
      "current_state_value": 0,
      "indexable": true,
      "indices_by_state": [
        16.6744,
        1.4934
      ],
      "intervene_now": true,

Truncated for display — the full payload is 73 lines.

How it works

Sequential Bayesian & bandits — Learn while deciding — update beliefs as evidence arrives and choose where the next unit of effort is worth spending.

  1. 1 Allocate scarce recurring interventions across evolving Markov units with Whittle indices, explicit indexability checks, and paired policy simulation.
  2. 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • The likelihood or reward model, prior support, action logging, delayed outcomes, and any stationarity assumptions match the deployment process.
  • Posterior probability and adaptive selection are model-conditional; they are not substitutes for randomized propensities or guaranteed safety.

Minimum evidence

  • units: required and organization-defined
  • intervention_capacity: required and organization-defined

How to validate it

Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • discrete current state
  • passive transition matrix
  • active transition matrix
  • state utility values
  • intervention cost
  • concurrent intervention capacity

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "allocate scarce recurring interventions across evolving" }
  → finds "allocate_restless_bandit_interventions"

gitrevio_capability_describe
  { "capability_id": "allocate_restless_bandit_interventions" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "allocate_restless_bandit_interventions", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

Aggregate risk register copula

Aggregate risk-register occurrence and lognormal severity marginals through a validated Gaussian copula into expected loss, VaR, CVaR, dependence amplification, and tail shares.

Statistical audit & measurement

Attribute commercial dependency tail loss

Calculate expected loss, VaR and CVaR for commercial value concentrated in shared technical components, then allocate every modeled tail-loss dollar exactly once across components with normalized negative-log survival hazard rather than overlapping leave-one-out sensitivities.

Forecasting & survival

Audit commercial resilience claim integrity

Audit resilience ROI claims against a unique commercial-source to technical-component graph: recompute each action's avoided loss under joint failure scenarios, cap support at graph-derived value, detect duplicate effects, probability drift and weak evidence, and prevent overlapping component benefits from being sold twice.

Network & dependency analysis

Audit decision rank robustness smaa

Measure rank acceptability, regret, pairwise dominance, and central winning weights under uncertain criterion scores and bounded stakeholder weights.

Statistical audit & measurement

Audit extreme metric tail dependence

Detect extreme metric co-exceedances beyond independence with empirical tail coefficients, permutation inference, practical magnitude gates, and FDR control.

Statistical audit & measurement

Audit metric regime stability

Detect practical structural breaks across aggregate metric histories with recursive max-CUSUM search, moving-block null resampling, and familywise false-alarm control, then identify the defensible baseline regime.

Statistical audit & measurement

See every tool in Risk, tails & resilience →

Ready to See Your Engineering work clearly?

Request a free demo