Skip to main content
Use confirmed_execution to test changes to executions Adapt-1 has already acquired. Your application runs the returned candidates on repeatable contexts; Adapt-1 uses their measured objectives to retain a selected execution. Each intervention has its own Domain in this example, so its input, comparisons, and selected result remain inspectable. Use the shared request helper. This guide continues the two-axis example in Configuration. It uses the same post, trajectory, and create_stage helpers, ACQUISITION_DOMAIN, and PREFIX. The application observes [x, y, vx, vy], accepts two normalized command values in [-1, 1], and holds each command for 0.5 seconds.

Export the acquired executions

Finish pending acquisition observations and stop acquisition writes before exporting. Retrieve every page, retain the API-generated record IDs, and carry the returned incumbent_id into the next configuration.
The export response fields used here are records, total, and incumbent_id. Each execution carries id, actions, initial_state, and its initial measurement validity (initial_valid). Preserve these fields during transfer. Do not replace the returned IDs with array positions or manufacture a new incumbent. These later Domains start with the acquired executions explicitly transferred into them. Create a separate Domain for each intervention so that each stage’s configuration and selected result remain inspectable.

Configure a structural stage

For each intervention, execute the returned candidates and report their outcomes before accepting the stage’s selected execution. Use the complete returned action matrix, including any row-count change produced by ordering. Preserve the declared command budget, duration, and padding rule while checking the returned shape. Count the returned candidates before scheduling the comparison. Each nomination or confirmation request needs all of its candidate/context executions; a fixed budget chosen before proposal generation may be too small. Carry the service’s selected execution into the next stage even when it retains the incumbent.
Structural configuration receives the acquired execution records. Apply the same action width, adapter, and bounds used during acquisition.

Make contexts repeatable

Your application maps each context_id to a reproducible scenario, including its initial position, velocity, target, and relevant environment randomness. Reset that scenario before every candidate execution. Implement reset_from_context_id and the returned environment object’s methods in your simulator or device adapter. Use the same timing convention across acquisition and structural comparisons. In this example, each trial has eight command slots, and a shorter candidate spends the remaining slots under the declared neutral command.
For hardware, the adapter also owns fixed command limits and termination handling. Apply the same declared rules to every candidate. Preserve the declared observation window when a command is removed. Use the completion definition from Schemas and configuration: distance at most 0.05 metres and speed at most 0.1 metres/second at the declared assessment time, with safety stops returning False. hold_command must stop physical actuation after a terminal event; further calls must not restart the device or simulator.

Run nomination and confirmation

Use one set of contexts for nomination, then a separate set for confirmation. For each proposal, evaluate every returned candidate on every supplied context. The candidate count can change between proposals; derive it from the response each time.
The shared propose request requires state and goal. For these structural comparisons, this example sends an exported execution’s initial_state and the placeholder goal [0.0]; measured objectives supply the comparison outcome. Each reset context supplies the environment’s actual target. request_id labels the proposal for application tracking. Complete the first proposal’s observation before requesting the confirmation comparison. Use candidate_index for the position in the current proposal’s candidates array. Execution record id identifies the retained execution. Attach the returned decision_id to the complete candidate/context result batch. Each outcome requires candidate_index (integer, 0–4095), context_id (a nonblank string of at most 128 characters), and objectives (a numeric vector). Send one objective per configured name, in that exact order. The request schema allows 1–32768 outcome rows; numeric values must be finite and within [-1e12, 1e12]. The single completion objective in this example is 0.0 or 1.0. If execution is interrupted, preserve the proposal and measurements so that you can finish the batch. If you abandon it, cancel the pending decision using trajectory(domain, "cancel", {"decision_id": decision_id}); cancellation supplies no learning outcome.

Carry the selected execution into the next stage

Register the context IDs below in your application before running this loop. Each ID must resolve to its own saved scenario. The nomination and confirmation sets are disjoint, and the next intervention starts in a new Domain.
Transfer Adapt-1’s selected_execution unchanged and preserve it as base_execution for Contextual refinement.

Keep a useful result even when a stage makes no change

A confirmed stage may return the same execution it received. Keep that native result and move on according to your run plan. A shorter sequence is useful only if it preserves the measured task behavior under the declared timing rules. Reconcile pending work and seal the acquired source before these comparisons. If you later add acquisition and change that source, create a new downstream lineage from the new export. Preserve the earlier selected base and refinement state for comparison. Count the actual work from the returned candidates multiplied by the supplied contexts. Selection, reduction, ordering, and later refinement all execute the environment; they are additional learning work beyond initial acquisition.