ea

package
v0.0.0-...-938ee2d Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCrossover

func GetCrossover(rnd *rand.Rand, file *oo.File, parent1, parent2 *oo.Individual) (*oo.Individual, *oo.Individual)

Putting together the used non-terminals but not throwing any out for the first child and doing the opposite for the second child

func GetMutation

func GetMutation(rnd *rand.Rand, file *oo.File, parent *oo.Individual) *oo.Individual

Mutation by flipping bits with a probability depending on the input size

func GetParent

func GetParent(rnd *rand.Rand, maxScore int, generation []*oo.Individual, scoreSum int) *oo.Individual

Simple roulette wheel selection

func Reproduce

func Reproduce(rnd *rand.Rand, pos int, maxScore int, generation []*oo.Individual, newGeneration []*oo.Individual,
	scoreSum int, file *oo.File)

Generates two new children by using crossover and mutation

func Run

func Run(file *oo.File, initialSolution *oo.Individual, rnd *rand.Rand, handleSolution func(*oo.File, *oo.Solution), startTime time.Time, localSearchActive, csv bool, number int)

A classical EA combined with local searches running concurrently

Types

This section is empty.

Jump to

Keyboard shortcuts

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