Skip to content

kirakiseki/GoGA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoGA

An implementation of genetic algorithm in Golang

Usage

run in Bash(Linux/macOS)/CMD(Windows). It would print optimized value in each generation and generate a GIF(GA.gif) in the same folder to visualized the evolve process.

Preview

GA.gif

GA

Windows

Windows

macOS

macOS

Linux

Linux

Release

You can get pre-build binary release at GoGA/releases, which contains various packages for different targets.

Command-line Arguments

Param Type Default Value Description
min Float64 -5.0 minimum x value
max Float64 5.0 maximum x value
g Int 30 maximum generation
s Int 100 population size
m Float64 0.1 MutationProbability
c Float64 0.6 CrossoverProbability
p Float64 0.01 Precision
f String r function to select individuals (r for Roulette, t for Tournament)

You can get this usage sheet in command line using '-h'

CLi Args

Dev

Environment

Go 1.19.3

Build

go build main.go

Run

./main <CLI Args>

About

An implementation of genetic algorithm in Golang

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages