neat

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Population         int
	Inputs, Outputs    int
	WeightMutationRate float64
	WeightMutationStd  float64
	AddConnRate        float64
	AddNodeRate        float64
	CompatThreshold    float64
	C1, C2, C3         float64
	ElitePerSpecies    int
	SurvivalThreshold  float64
	Seed               int64
}

func DefaultConfig

func DefaultConfig() Config

type Population

type Population struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Population

func (*Population) Act

func (p *Population) Act(s core.State) core.Action

func (*Population) All

func (p *Population) All() iter.Seq[core.Individual]

func (*Population) BestPolicy

func (p *Population) BestPolicy() func(obs []float64) []float64

func (*Population) EndEpisode

func (p *Population) EndEpisode(total core.Reward)

func (*Population) Evolve

func (p *Population) Evolve()

func (*Population) Generation

func (p *Population) Generation() int

func (*Population) Len

func (p *Population) Len() int

func (*Population) Observe

func (p *Population) Observe(s core.State, a core.Action, r core.Reward, next core.State, done bool)

Jump to

Keyboard shortcuts

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