mwg API
    Preparing search index...

    Interface TrainingRules<State, Command, Event>

    interface TrainingRules<State, Command, Event> {
        observationVersion: string;
        rule: SimulationRule<State, Command, Event, Random.Generator>;
        command(state: State, actions: readonly (number | null)[]): Command;
        finished?(state: State): boolean;
        initial(random: Random.Generator): State;
        observe(state: State): readonly NeuralObservation[];
        rewards(
            before: State,
            command: Command,
            outcome: SimulationStep<State, Event>,
        ): readonly number[];
    }

    Type Parameters

    • State
    • Command
    • Event
    Index
    observationVersion: string

    Same rule used by the playable game; a command may advance a turn or fixed ticks.