mixle.task.outcome_decomposer module

Outcome-trained decomposer for exploration plans.

Candidate plans are proposed by sampling a fitted PlanModel, executing them in the explore_world

world, keep verifiably successful traces (score above a quantile of that round’s own scores), refit the plan model on successes, iterate a few rounds. Training signal is only world score – verifiable

by construction, never a proxy or a teacher’s opinion.

decomposer = train_outcome_decomposer(seed_worlds=40, n_cells=20, n_targets=3, budget=30) decomposer.plan_model.sample(rng) # a plan shaped by what actually worked, not just imitation evaluate_decomposer(decomposer, …) # mean score on held-out seeds

For a useful deployment, compare the outcome-refit model with both the imitation-only model (round 0, before any outcome refitting) and the greedy heuristic on held-out world seeds at matched budget.

class OutcomeTrainedDecomposer(plan_model, imitation_model, rounds=<factory>)[source]

Bases: object

Outcome-trained plan model, baseline imitation model, and per-round statistics.

Parameters:
  • plan_model (PlanModel)

  • imitation_model (PlanModel)

  • rounds (list[RoundStats])

class RoundStats(round, mean_score, n_candidates, n_kept)[source]

Bases: object

Candidate-generation statistics for one outcome-decomposition round.

Parameters:
evaluate_greedy_heuristic(*, seeds, n_cells, n_targets, budget)[source]

Return the mean score of the built-in greedy policy across held-out seeds.

Parameters:
Return type:

float

evaluate_plan_model(model, *, seeds, n_cells, n_targets, budget, rng_seed=0)[source]

Mean world score of model’s sampled plan, executed once per held-out seed.

Parameters:
  • model (PlanModel)

  • n_cells (int)

  • n_targets (int)

  • budget (int)

  • rng_seed (int)

Return type:

float

execute_plan(plan_types, *, n_cells, n_targets, budget, seed)[source]

Execute a plan (a sequence of action types, e.g. ["survey", "survey", "drill", ...]) in a fresh seeded world: at each step, “survey” targets the undrilled cell with the noisiest current read (most to gain), “drill” targets the undrilled cell with the highest current prospectivity read – the plan model decides the order and mix of action types; this fixed rule decides which cell, the same division of labor the plan/tool-name abstraction uses everywhere else in this plan. Returns the world’s final score.

Parameters:
Return type:

int

imitation_traces(policy, *, n_worlds, n_cells, n_targets, budget, seed_offset=0)[source]

Run policy over n_worlds seeded episodes and return each episode’s ACCEPTED action-type sequence used to fit the round-0 imitation model.

Parameters:
  • n_worlds (int)

  • n_cells (int)

  • n_targets (int)

  • budget (int)

  • seed_offset (int)

train_outcome_decomposer(*, seed_worlds, n_cells, n_targets, budget, k_candidates=30, success_quantile=0.6, rounds=3, seed=0)[source]

Train a plan model by sampling, executing, keeping high-outcome plans, and refitting.

Parameters:
  • seed_worlds (int)

  • n_cells (int)

  • n_targets (int)

  • budget (int)

  • k_candidates (int)

  • success_quantile (float)

  • rounds (int)

  • seed (int)

Return type:

OutcomeTrainedDecomposer