Documentation ¶
Overview ¶
Package model provides the complete representation of the model for a given GEP problem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generation ¶
type Generation struct { Genomes []*genome.Genome Funcs []gene.FuncWeight ScoringFunc genome.ScoringFunc }
Generation represents one complete generation of the model.
func New ¶
func New(fs []gene.FuncWeight, funcType functions.FuncType, numGenomes, headSize, numGenesPerGenome, numTerminals, numConstants int, linkFunc string, sf genome.ScoringFunc) *Generation
New creates a new random generation of the model. fs is a slice of function weights. funcType is the underlying function type (no generics). numGenomes is the number of genomes to use to populate this generation of the model. headSize is the number of head symbols to use in a genome. numGenesPerGenome is the number of genes to use per genome. numTerminals is the number of terminals (inputs) to use within each gene. numConstants is the number of constants (inputs) to use within each gene. linkFunc is the linking function used to combine the genes within a genome. sf is the scoring (or fitness) function.
type Model ¶ added in v2.1.0
type Model interface { Evaluate(obs gym.Obs, action interface{}) error Evolve(reward float64) error }
Model represents a GEP model.