Skip to content

Interactive example of a simple genetic algorithm in R shiny.

License

Notifications You must be signed in to change notification settings

DavidASmith/shiny-ga-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Genetic Algorithm Example

Overview

This is a an R Shiny application using Luca Scrucca's GA package.

The optimisation example searches for optimum values for two dimensions to minimise the Rastrigin function. A plot of this function is shown below:

.

Note that optimum value for both dimensions is zero, and that many local minima are present.

Users can explore the impact of different values for:

  • population size
  • mutation probability
  • crossover probability
  • elitism
  • number of generations.

Implementation

The application makes use of the future package to allow the GA to run asynchronously, and the ipc package for passing messages between the GA and Shiny.

Give it a try

This application is deployed at https://shiny-ga-demo.azurewebsites.net (assuming the hosting doesn't cost me too much).

About

Interactive example of a simple genetic algorithm in R shiny.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages