FakeExecutor

class FakeExecutor(capsules: (RunConfig) -> Capsule? = { it.capsule }, problem: (RunConfig) -> String? = { null }, behave: (RunConfig, Int) -> RawTrial) : Executor(source)

A scripted executor for tests and offline demos. behave decides each trial from the arm and the trial index; capsules decides the capture (the arm's own capsule by default).

Constructors

Link copied to clipboard
constructor(capsules: (RunConfig) -> Capsule? = { it.capsule }, problem: (RunConfig) -> String? = { null }, behave: (RunConfig, Int) -> RawTrial)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun capture(arm: RunConfig): Capsule?

The capsule captured inside the arm's container, probes included; null if it cannot.

Link copied to clipboard
open override fun prepare(arm: RunConfig, dir: String): String?

Builds what arm needs under the directory dir; a problem text, or null when ready.

Link copied to clipboard
open override fun trial(arm: RunConfig, index: Int): RawTrial

Runs trial index (from 0) of arm.