cli

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Demo added in v0.5.0

func Demo(spec DemoSpec, log *slog.Logger) error

Demo records one documentation clip without opening a window. It wires the environment exactly as the matching command does, then hands the run to the software renderer, so the media matches what a player sees and needs no display.

Environments that must learn before there is anything to watch — cube trains a policy, chess evolves a population — do that first, so a clip can take a while.

func DemoEnvs added in v0.5.0

func DemoEnvs() []string

DemoEnvs lists the environments Demo can record, in the order the documentation presents them.

func Execute

func Execute(version string) error

Types

type DemoSpec added in v0.5.0

type DemoSpec struct {
	// Env names the environment: race, cartpole, maze, cube, flappy or chess.
	Env string
	// Agent overrides the environment's default agent when set.
	Agent string
	// Opponent overrides the chess opponent when set; other environments
	// ignore it.
	Opponent string
	// Seed makes the run reproducible.
	Seed int64
	// Rec says where to write the recording and how long it runs.
	Rec record.Options
}

DemoSpec is one documentation clip: which environment to wire up, which agent drives it, and the seed that makes the run reproducible. Everything else — population sizes, episode lengths, training budgets — comes from the same defaults the command registers, so the media shows what a reader gets by running the command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL