Documentation ¶
Overview ¶
Package util provides utility functions for building gogp models.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ MaxGen: 40, PopSize: 500, TournSize: 7, TargetFitness: 0.9999, Threads: runtime.NumCPU(), CrossoverProb: 0.5, MutateProb: 0.2, }
Functions ¶
func ParseFlags ¶
func ParseFlags(opts *Options)
ParseFlags reads command flags and sets no. of threads and random seed.
Types ¶
type Options ¶
type Options struct {
TournSize, MaxGen int
PopSize, Threads int
TargetFitness, CrossoverProb, MutateProb float64
Plot, Verbose bool
Seed int64
}
Options struct holds global configuration options
type Plot ¶
type Plot struct { *svg.SVG // contains filtered or unexported fields }
Plot structure represets a svgo plot
func (*Plot) AddGrid ¶
Grid method draws a grid with given size, callback function returns style for each cell
func (*Plot) AnimateMulti ¶
AnimateMulti method moves a set of objects
Click to show internal directories.
Click to hide internal directories.