Documentation
¶
Index ¶
- func AsMulti(mk func() core.Environment) core.MultiEnvironment
- func EvaluateParallel(newEnv EnvFactory, members []core.Individual, maxSteps int, seed int64) []float64
- func GenRNG(seed int64, gen int) *rand.Rand
- func MasterRNG(seed int64) *rand.Rand
- func MemberRNG(seed int64, idx int) *rand.Rand
- func Pace(steps int, interval time.Duration, step func())
- func RunEpisode(env core.Environment, agent core.Agent, maxSteps int, rng *rand.Rand) core.Reward
- func RunGeneration(env core.MultiEnvironment, pop core.PopulationAgent, maxSteps int, seed int64, ...) []float64
- func TrackRNG(seed int64) *rand.Rand
- func TrainAgent(env core.Environment, agent core.Agent, episodes, maxSteps int, seed int64) []core.Reward
- func TrainHeadless(newEnv EnvFactory, pop core.PopulationAgent, cfg RunConfig, tel *Telemetry)
- type EnvFactory
- type GenStats
- type Live
- type LiveEpisode
- type RunConfig
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsMulti ¶
func AsMulti(mk func() core.Environment) core.MultiEnvironment
func EvaluateParallel ¶
func EvaluateParallel(newEnv EnvFactory, members []core.Individual, maxSteps int, seed int64) []float64
func RunEpisode ¶
func RunGeneration ¶
func RunGeneration(env core.MultiEnvironment, pop core.PopulationAgent, maxSteps int, seed int64, onStep func()) []float64
func TrainAgent ¶
func TrainHeadless ¶
func TrainHeadless(newEnv EnvFactory, pop core.PopulationAgent, cfg RunConfig, tel *Telemetry)
Types ¶
type EnvFactory ¶
type EnvFactory func() core.MultiEnvironment
type Live ¶
type Live struct {
// contains filtered or unexported fields
}
func NewLive ¶
func NewLive(env core.MultiEnvironment, pop core.PopulationAgent, maxSteps int, seed int64) *Live
func (*Live) NextGeneration ¶
func (l *Live) NextGeneration()
func (*Live) Regenerate ¶
type LiveEpisode ¶
type LiveEpisode struct {
// contains filtered or unexported fields
}
func NewLiveEpisode ¶
func NewLiveEpisode(env core.Environment, agent core.Agent, maxSteps int, seed int64) *LiveEpisode
func (*LiveEpisode) Env ¶
func (l *LiveEpisode) Env() core.Environment
func (*LiveEpisode) Episode ¶
func (l *LiveEpisode) Episode() int
func (*LiveEpisode) NextEpisode ¶
func (l *LiveEpisode) NextEpisode()
func (*LiveEpisode) Regenerate ¶
func (l *LiveEpisode) Regenerate(seed int64)
func (*LiveEpisode) Return ¶
func (l *LiveEpisode) Return() core.Reward
func (*LiveEpisode) Step ¶
func (l *LiveEpisode) Step() (finished bool)
func (*LiveEpisode) StepCount ¶
func (l *LiveEpisode) StepCount() int
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
func (*Telemetry) BestSeries ¶
Click to show internal directories.
Click to hide internal directories.