Learn R Programming

mcga (version 3.0.9)

Machine Coded Genetic Algorithms for Real-Valued Optimization Problems

Description

Machine coded genetic algorithm (MCGA) is a fast tool for real-valued optimization problems. It uses the byte representation of variables rather than real-values. It performs the classical crossover operations (uniform) on these byte representations. Mutation operator is also similar to classical mutation operator, which is to say, it changes a randomly selected byte value of a chromosome by +1 or -1 with probability 1/2. In MCGAs there is no need for encoding-decoding process and the classical operators are directly applicable on real-values. It is fast and can handle a wide range of a search space with high precision. Using a 256-unary alphabet is the main disadvantage of this algorithm but a moderate size population is convenient for many problems. Package also includes multi_mcga function for multi objective optimization problems. This function sorts the chromosomes using their ranks calculated from the non-dominated sorting algorithm.

Copy Link

Version

Install

install.packages('mcga')

Monthly Downloads

198

Version

3.0.9

License

GPL (>= 2)

Maintainer

Mehmet Satman

Last Published

December 10th, 2025

Functions in mcga (3.0.9)

arithmetic_crossover

Performs arithmetic crossover operation on a pair of two selected parent candidate solutions
TwoPointCrossOver

Two Point Crossover operation on the two vectors of bytes
TwoPointCrossOverOnDoublesUsingBytes

Two-point Crossover operation on the two vectors of doubles using their byte representations
byte_crossover_2p

Performs two-point crossover operation on a pair of two selected parent candidate solutions
UniformCrossOver

Uniform Crossover operation on the two vectors of bytes
UniformCrossOverOnDoublesUsingBytes

Uniform Crossover operation on the two vectors of doubles using their byte representations
byte_mutation

Performs mutation operation on a given double vector
unfair_average_crossover

Performs unfair average crossover operation on a pair of two selected parent candidate solutions
sbx_crossover

Performs sbx (simulated binary) crossover operation on a pair of two selected parent candidate solutions
SizeOfDouble

Byte-length of a double typed variable
linear_crossover

Performs linear crossover operation on a pair of two selected parent candidate solutions
multi_mcga

Performs multi objective machine coded genetic algorithms.
mcga2

Performs a machine-coded genetic algorithm search for a given optimization problem
mcga-internal

Internal mcga objects
flat_crossover

Performs flat crossover operation on a pair of two selected parent candidate solutions
byte_mutation_random_dynamic

Performs mutation operation on a given double vector with dynamic mutation probabilities
SizeOfInt

Byte-length of a int typed variable
SizeOfLong

Byte-length of a long typed variable
byte_crossover_1p

Performs one-point crossover operation on a pair of two selected parent candidate solutions
byte_crossover

Performs crossover operation on a pair of two selected parent candidate solutions
byte_mutation_dynamic

Performs mutation operation on a given double vector using dynamic mutation probabilities
byte_mutation_random

Performs mutation operation on a given double vector
blx_crossover

Performs blx (blend) crossover operation on a pair of two selected parent candidate solutions
mcga

Performs machine coded genetic algorithms on a function subject to be minimized.
mcga-package

Machine Coded Genetic Algorithms for Real-valued Optimization Problems
DoubleVectorToBytes

Byte representation of a vector of double typed variables
ByteCodeMutation

Mutation operator for byte representation of double values
ByteCodeMutationUsingDoublesRandom

Mutation operator for byte representation of double values
ByteVectorToDoubles

Converting p * sizeof(double) bytes to a vector of p double values
OnePointCrossOver

One Point Crossover operation on the two vectors of bytes
MaxDouble

Maximum value of a double typed variable
DoubleToBytes

Byte representation of a double typed variable
BytesToDouble

Converting sizeof(double) bytes to a double value
ByteCodeMutationUsingDoubles

Mutation operator for byte representation of double values
OnePointCrossOverOnDoublesUsingBytes

One-point Crossover operation on the two vectors of doubles using their byte representations
EnsureBounds

Altering vector of doubles to satisfy boundary constraints