Learning
simulo.Task is the RL contract you subclass to train a policy. simulo.LearningEnv and simulo.RLTrainer train a Task. See Authoring for what build(scene) populates the scene with.
Contracts
Section titled “Contracts”The six protocols your own code fulfils. Each is a mode-aware name — see the note on every page below — resolved lazily so importing your module never pulls in the GPU runtime.
simulo.Task— The RL task contract you subclass — observations, rewards, dones, actions, resets.simulo.PolicyCheckpoint— A named policy checkpoint injected into a play job.simulo.PolicyNetwork— Callable policy network loaded from a checkpoint.simulo.PolicyNetworkProtocol— The structural contract for a callable policy network.simulo.Trainer— Training orchestration withtrain,save, andload.simulo.LearningEnv— Gym-like vectorized environment —reset,step,close.simulo.Player— Trained-policy playback — episodes, steps, optional video.
Components
Section titled “Components”Tasks compose their observation/reward/termination spaces from small, reusable components. Each contract below is the shape one component fulfils.
simulo.ObservationComponent— One observation term —initialize,dim,compute.simulo.RewardComponent— One reward term —initialize,compute.simulo.TerminationCondition— One optionally named termination condition —name,initialize,check.
ObservationSet, RewardSet, and TerminationSet are the containers a Task builds once — typically in on_start — from a list of the component contracts it composes: ObservationComponent, RewardComponent, and TerminationCondition respectively. Call initialize(robot, device, num_envs) once, then compute() every step; TerminationSet.check() returns the dict keyed by each condition’s optional name (or its class name). Call them from get_observations() / get_rewards() / get_dones().
simulo.ObservationSet— Concatenates observations from a list ofObservationComponents into one tensor.simulo.RewardSet— Sums weighted rewards from a list ofRewardComponents into one tensor.simulo.TerminationSet— Returns a named boolean-tensor dictionary for itsTerminationConditions; an episode ends when any value is true.
Execution
Section titled “Execution”The Contracts section documents contracts. This section documents what actually fulfils them at runtime. Simulation is the sim clock every mode shares — timestep, physics stepping, seeds, device placement. simulo.RLTrainer is the Simulo-provided Trainer constructed in a training job body:
env = simulo.LearningEnv(task=CartpoleTask(), num_envs=512, device="cuda")trainer = simulo.RLTrainer(env=env, algorithm="PPO", device="cuda", seed=42)stats = trainer.train(max_iterations=20)trainer.close()env.close()In a train job, Simulo saves the best and latest checkpoints for you, so the job body never calls save().
simulo.Simulation— The simulation clock and lifecycle — timestep, physics stepping, seeds, device placement, reset/close.simulo.RLTrainer— Reinforcement learning trainer (skrl PPO/IPPO/MAPPO/AMP) — the concrete class a job constructs to fulfil theTrainercontract.simulo.RLPlayer— Runs a trained policy (skrl checkpoint or exported TorchScript/ONNX) without training — playback, video, and MCAP recording.simulo.preview— Check a task’s robot the way training will run it before training starts; returns a preview report and makes no policy.simulo.evaluate— Run a trained policy on numbered episodes, judge each with the eval file’s@app.successfunction, and return the evaluation report.simulo.RecordConfig— Recording configuration passed toplayer.play(record=...)— an output path, plus a profile and per-streaminclude_*overrides.