cfg

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitStringIndividualConfig added in v1.1.0

type BitStringIndividualConfig struct {
	Enabled    bool `toml:"enabled"`
	GenomeSize int  `toml:"genome_size"`
}

BitStringIndividualConfig holds configuration for bitstring individuals.

type Config

type Config struct {
	Evolution EvolutionConfig           `toml:"evolution"`
	BitString BitStringIndividualConfig `toml:"bitstring_individual"`
	Tree      TreeIndividualConfig      `toml:"tree_individual"`
	Metrics   MetricsConfig             `toml:"metrics"`
	Fitness   FitnessConfig             `toml:"fitness"`
}

Config holds the entire configuration for the evolutionary algorithm.

func LoadConfig

func LoadConfig(path string) (*Config, error)

type EvolutionConfig

type EvolutionConfig struct {
	PopulationSize      int     `toml:"population_size"`
	CrossoverPointCount int     `toml:"crossover_point_count"`
	CrossoverRate       float64 `toml:"crossover_rate"`
	MutationRate        float64 `toml:"mutation_rate"`
	Generations         int     `toml:"generations"`
	ElitismPercentage   float64 `toml:"elitism_percentage"`
	Seed                int64   `toml:"seed"`
}

EvolutionConfig holds configuration for the evolutionary algorithm.

type FitnessConfig added in v1.7.0

type FitnessConfig struct {
	TestCaseCount  int    `toml:"test_case_count"`
	TargetFunction string `toml:"target_function"`
}

type MetricsConfig added in v1.5.0

type MetricsConfig struct {
	CSVEnabled bool   `toml:"csv_enabled"`
	CSVFile    string `toml:"csv_file"`
}

MetricsConfig holds configuration for metrics output.

type TreeIndividualConfig added in v1.1.0

type TreeIndividualConfig struct {
	Enabled      bool     `toml:"enabled"`
	MaxDepth     int      `toml:"max_depth"`
	InitalDepth  int      `toml:"initial_depth"`
	PrimitiveSet []string `toml:"primitive_set"`
	TerminalSet  []string `toml:"terminal_set"`
}

TreeIndividualConfig holds configuration for tree individuals.

Jump to

Keyboard shortcuts

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