mel

package
v0.0.0-...-1b80cc6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MEL_COM_NEXT_EVENT       = iota // Go and to your things whateven they are
	MEL_COM_EXECUTE_OPERATOR        // Execute e genetic operator
	MEL_COM_COMPUTE_FITNESS         // Compute e fitness
)

Commands

View Source
const (
	MEL_RESP_EXECUTE_OPERATOR_DONE = iota // Execution of a genetic operator done
	MEL_RESP_COMPUTE_FITNESS_DONE         // Compute of a fitness function done
	MEL_RESP_EVEN_NEW                     // Trigger a new individual creation
)

Responses

View Source
const (
	LEFT = iota
	RIGHT
)
View Source
const (
	STATISTICS_NULL = iota
	STATISTICS_MAX
)

Variables

This section is empty.

Functions

func GetNthParamsInt

func GetNthParamsInt(param string, n int) (int, bool)

func GetNthParamsString

func GetNthParamsString(param string, n int) (string, bool)

func Init

func Init()

func SpaceSimulate

func SpaceSimulate(s vSpace)

Types

type Context

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

type DumpConfig

type DumpConfig struct {
	Numeric bool
	Types   bool
}

type EvolutionParameters

type EvolutionParameters struct {
	Pars map[string]string
}

func (*EvolutionParameters) GetInt

func (ep *EvolutionParameters) GetInt(param string) (int, bool)

func (*EvolutionParameters) GetMatchingList

func (ep *EvolutionParameters) GetMatchingList(match string) (map[string]string, bool)

func (*EvolutionParameters) GetValue

func (ep *EvolutionParameters) GetValue(param string) (string, bool)

func (*EvolutionParameters) SetValue

func (ep *EvolutionParameters) SetValue(param string, value string) error

type Fitness

type Fitness struct {
	Fitness_name    string
	FitnessFunction func([]Me3li) (float32, bool)
	Threads         int
}

type Me3li

type Me3li interface {
	MelInit(*MelConfig, *EvolutionParameters)
	MelCopy() Me3li
}

The main interface, it states: It is a mel object

type Me3liDump

type Me3liDump interface {
	MelDump(*DumpConfig)
}

type Me3liStringImport

type Me3liStringImport interface {
	MelStringImport(string) error
}

type MelConfig

type MelConfig struct {
	Debug bool
}

type OptimizerInfo

type OptimizerInfo map[string]OptimizerValues

Info on each generation

func (*OptimizerInfo) InsertOptimizerInfo

func (ri *OptimizerInfo) InsertOptimizerInfo(key string, value float32)

type OptimizerValues

type OptimizerValues []float32

type Plan

type Plan struct {
	Populations []Population
	Fitnesses   []Fitness
	ExitAt      int
}

func (*Plan) GetBest

func (plan *Plan) GetBest() (*Me3li, float32)

type PlanBasic

type PlanBasic struct {
	Plan
	GenerationNumber int
	PopulationSize   int
	DeathsRate       float32
	UnaryRate        float32
	BinaryRate       float32
	*RunInfo
}

func (*PlanBasic) Execute

func (plan *PlanBasic) Execute(ep *EvolutionParameters)

Execute the simple evolution plan

type PlanDynamicEvolving

type PlanDynamicEvolving struct {
	Plan
}

func (*PlanDynamicEvolving) Execute

func (plan *PlanDynamicEvolving) Execute(ep *EvolutionParameters)

Use Dynamic Evolving populations

type PlanSimple

type PlanSimple struct {
	Plan
	GenerationNumber int
	PopulationSize   int
	DeathsRate       float32
	UnaryRate        float32
	BinaryRate       float32
}

func (*PlanSimple) Execute

func (plan *PlanSimple) Execute(ep *EvolutionParameters)

Execute the simple evolution plan

type Population

type Population struct {
	Population_name   string
	PopulationHead    *individual
	NewbornHead       *individual
	GeneticGenerators []interface{}
	GeneticUnary      []interface{}
	GeneticBinary     []interface{}
	WeightGenerators  []float32
	WeightUnary       []float32
	WeightBinary      []float32
	WeightDeath       float32
	Threads           int
}

type RunInfo

type RunInfo map[string]RunInfoValues

Info on each generation

func (*RunInfo) InsertRunInfo

func (ri *RunInfo) InsertRunInfo(key string, value float32)

type RunInfoValues

type RunInfoValues []float32

Jump to

Keyboard shortcuts

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