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

selection compares acquired executions. deletion tests removing commands. ordering tests command order. In all three cases, execute the returned candidates and report their outcomes before accepting the stage’s selected execution. Use the complete returned action matrix. An ordering result need not be a pure permutation with an unchanged row count. Preserve the declared command budget, duration, and padding rule while checking the returned shape.
The structural configuration does not take state_dimensions, action_dimensions, or action-bound fields. It receives the actual acquired execution records. Keep the action adapter and its bounds consistent with acquisition.

Make contexts repeatable

A context_id is an application identifier, not a state vector or a command to reset the environment. Your application must map it to a reproducible scenario, including its initial position, velocity, target, and relevant environment randomness. Reset that scenario before every candidate execution. The following adapter illustrates the required boundary. reset_from_context_id and the returned environment object’s methods are application hooks, not Adapt-1 SDK methods. Implement them for your simulator or device. The neutral-padding rule shown here must also be used during acquisition: 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. A command being removed does not imply an arbitrary change to the trial’s observation window. 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, the client pattern uses an exported execution’s initial_state and the placeholder goal [0.0]; measured objectives supply the comparison outcome. The placeholder is not the environment’s target. The target is part of each reset context. request_id identifies the proposal. Calling it nomination-v1 does not set a phase flag: there is no phase field in this request. Complete the first proposal’s observation before requesting the confirmation comparison. The candidate_index is the position in that proposal’s candidates array. It is distinct from an execution record’s id. Keep the returned decision_id attached to the entire result batch. Do not submit only a winner, an average, or a partial candidate/context matrix. 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.
The application transfers Adapt-1’s selected_execution unchanged. It does not sort candidates by its own aggregate metric and choose a replacement. Keep base_execution available for the next stage: 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.