Learn R Programming

⚠️There's a newer version (3.2.4) of this package.Take me there.

GA

An R package for optimization using genetic algorithms. The package provides a flexible general-purpose set of tools for implementing genetic algorithms search in both the continuous and discrete case, whether constrained or not. Users can easily define their own objective function depending on the problem at hand. Several genetic operators are available and can be combined to explore the best settings for the current task. Furthermore, users can define new genetic operators and easily evaluate their performances. Local search using general-purpose optimisation algorithms can be applied stochastically to exploit interesting regions. GAs can be run sequentially or in parallel, using an explicit master-slave parallelisation or a coarse-grain islands approach.

Installation

Get the released version from CRAN:

install.packages("GA")

Or the development version from github:

# install.packages("devtools")
devtools::install_github("luca/GA")

How to Use This Package

See the papers in the references section below. A quick intro vignette is also available, which can be accessed using

vignette("GA")

References:

Scrucca, L. (2013) GA: A Package for Genetic Algorithms in R. Journal of Statistical Software, 53(4), 1-37. URL http://www.jstatsoft.org/v53/i04/.

Scrucca, L. (2016) On some extensions to GA package: hybrid optimisation, parallelisation and islands evolution. Submitted to R Journal. Pre-print available at http://arxiv.org/abs/1605.01931.

Copy Link

Version

Install

install.packages('GA')

Monthly Downloads

6,927

Version

3.0.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Luca Scrucca

Last Published

June 7th, 2016

Functions in GA (3.0.2)

GA-package

Genetic Algorithms
binary2decimal

Binary encoding of decimal numbers and viceversa.
binary2gray

Gray encoding for binary strings
persp3D

Perspective plot with colour levels
plot.ga-method

Plot of Genetic Algorithm search path
gaisl-class

Class "gaisl"
gaisl

Islands Genetic Algorithms
gaControl

A function for setting or retrieving defaults genetic operators
ga

Genetic Algorithms
plot.gaisl-method

Plot of Islands Genetic Algorithm search path
summary.ga-method

Summary for Genetic Algorithms
palettes

Colors palettes
parNames-methods

summary.gaisl-method

Summary for Islands Genetic Algorithms
gaSummary

Summarize genetic algorithm evolution
numericOrNA-class

Virtual Class "numericOrNA" - Simple Class for subassignment Values
ga-class

Class "ga"
ga_Mutation

Mutation operators in genetic algorithms
ga_Crossover

Crossover operators in genetic algorithms
ga_Selection

Selection operators in genetic algorithms
ga_Population

Population initialization in genetic algorithms
ga_pmutation

Variable mutation probability in genetic algorithms
GA-internal

Internal GA functions
gaMonitor

Monitor genetic algorithm evolution