pycellga.problems.single_objective.discrete.binary package
Submodules
pycellga.problems.single_objective.discrete.binary.count_sat module
- class pycellga.problems.single_objective.discrete.binary.count_sat.CountSat[source]
Bases:
AbstractProblem
CountSat function implementation for optimization problems.
The CountSat function is used for testing optimization algorithms, particularly those involving satisfiability problems.
- None
Notes
Length of chromosomes = 20 Maximum Fitness Value = 6860 Maximum Fitness Value (normalized) = 1
pycellga.problems.single_objective.discrete.binary.ecc module
- class pycellga.problems.single_objective.discrete.binary.ecc.Ecc[source]
Bases:
AbstractProblem
Error Correcting Codes Design Problem (ECC) function implementation for optimization problems.
The ECC function is used for testing optimization algorithms, particularly those involving error-correcting codes.
- None
Notes
Length of chromosomes = 144 Maximum Fitness Value = 0.0674
pycellga.problems.single_objective.discrete.binary.fms module
- class pycellga.problems.single_objective.discrete.binary.fms.Fms[source]
Bases:
AbstractProblem
Frequency Modulation Sound (FMS) function implementation for optimization problems.
The FMS function is used for testing optimization algorithms, particularly those involving frequency modulation sound.
- None
Notes
Length of chromosomes = 192 Maximum Fitness Value = 0.01 Maximum Fitness Value Error = 10^-2
pycellga.problems.single_objective.discrete.binary.maxcut100 module
pycellga.problems.single_objective.discrete.binary.maxcut20_01 module
- class pycellga.problems.single_objective.discrete.binary.maxcut20_01.Maxcut20_01[source]
Bases:
AbstractProblem
Maximum Cut (MAXCUT) function implementation for optimization problems.
The MAXCUT function is used for testing optimization algorithms, particularly those involving maximum cut problems.
- None
Notes
Length of chromosomes = 20 Maximum Fitness Value = 10.119812
pycellga.problems.single_objective.discrete.binary.maxcut20_09 module
- class pycellga.problems.single_objective.discrete.binary.maxcut20_09.Maxcut20_09[source]
Bases:
AbstractProblem
Maximum Cut (MAXCUT) function implementation for optimization problems.
The MAXCUT function is used for testing optimization algorithms, particularly those involving maximum cut problems.
- None
Notes
Length of chromosomes = 20 Maximum Fitness Value = 56.740064
pycellga.problems.single_objective.discrete.binary.mmdp module
- class pycellga.problems.single_objective.discrete.binary.mmdp.Mmdp[source]
Bases:
AbstractProblem
Represents the Massively Multimodal Deceptive Problem (MMDP).
The MMDP is designed to deceive genetic algorithms by having multiple local optima. The problem is characterized by a chromosome length of 240 and a maximum fitness value of 40.
- None
Notes
# Length of chromosomes = 240 # Maximum Fitness Value = 40
- f(x: list) float [source]
Evaluates the fitness of a given chromosome for the MMDP.
The fitness function is calculated based on the number of ones in each of the 40 subproblems, each of length 6.
- Parameters:
x (list) – A list representing the chromosome, where each element is a binary value (0 or 1).
- Returns:
The normalized fitness value of the chromosome, rounded to three decimal places.
- Return type:
float
pycellga.problems.single_objective.discrete.binary.one_max module
- class pycellga.problems.single_objective.discrete.binary.one_max.OneMax[source]
Bases:
AbstractProblem
Represents the OneMax problem.
The OneMax problem is a simple genetic algorithm benchmark problem where the fitness of a chromosome is the sum of its bits.
- None
- f(x) float [source]
Evaluates the fitness of a given chromosome for the OneMax problem.
The fitness function is the sum of all bits in the chromosome.
- Parameters:
x (list) – A list representing the chromosome, where each element is a binary value (0 or 1).
- Returns:
The fitness value of the chromosome, which is the sum of its bits.
- Return type:
float
pycellga.problems.single_objective.discrete.binary.peak module
- class pycellga.problems.single_objective.discrete.binary.peak.Peak[source]
Bases:
AbstractProblem
Represents the Peak problem.
The Peak problem evaluates the fitness of a chromosome based on its distance to a set of target peaks.
- None
Notes
# Length of chromosomes = 100 # Maximum Fitness Value = 1.0
- f(x: list) float [source]
Evaluates the fitness of a given chromosome for the Peak problem.
The fitness function calculates the distance between the given chromosome and a set of randomly generated target peaks.
- Parameters:
x (list) – A list representing the chromosome, where each element is a binary value (0 or 1).
- Returns:
The fitness value of the chromosome, normalized to a range of 0.0 to 1.0.
- Return type:
float