Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouletteSelector ¶
type RouletteSelector struct {
SampleSize int
}
RouletteSelector implements roulette wheel selection
func NewRouletteSelector ¶
func NewRouletteSelector(sampleSize int) *RouletteSelector
NewRouletteSelector creates a new roulette selector
func (*RouletteSelector) Select ¶
func (rs *RouletteSelector) Select(population []individual.Evolvable) individual.Evolvable
Select performs roulette wheel selection
type Selector ¶
type Selector interface {
Select(population []individual.Evolvable) individual.Evolvable
}
Selector defines the interface for selection strategies
type TournamentSelector ¶
type TournamentSelector struct {
TournamentSize int
}
TournamentSelector implements tournament selection
func NewTournamentSelector ¶
func NewTournamentSelector(tournamentSize int) *TournamentSelector
NewTournamentSelector creates a new tournament selector
func (*TournamentSelector) Select ¶
func (ts *TournamentSelector) Select(population []individual.Evolvable) individual.Evolvable
Select performs tournament selection
Click to show internal directories.
Click to hide internal directories.