roulettewheel

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouletteWheel

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

The `RouletteWheel` scheme updates operator weights as a convex combination of the current weight, and the new score.

func NewRouletteWheel

func NewRouletteWheel(
	scores [4]float64,
	decay float64,
	numDestroy int,
	numRepair int,
	opCoupling [][]bool,
) (RouletteWheel, error)

func (*RouletteWheel) Select

func (s *RouletteWheel) Select(rnd *rand.Rand, best, current alns.State) (int, int, error)

func (*RouletteWheel) Update

func (s *RouletteWheel) Update(candidate alns.State, deleteOpIndx int, repairOpIndx int, outcome alns.Outcome) error

Jump to

Keyboard shortcuts

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