GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jbytecode/mccga.rs: Machine-coded compact genetic algorithm in Rust

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

mccga.rs

Machine-coded compact genetic algorithm in Rust

In-short

The package implements the Machine-coded compact genetic algorithm defined in

Satman, M. H. & Akadal, E. (2020). Machine Coded Compact Genetic Algorithms for Real Parameter Optimization Problems . Alphanumeric Journal , 8 (1) , 43-58 . DOI: 10.17093/alphanumeric.576919 Link

Example

Suppose that the objective function is to minimize

fn f(x: &Vec<f64>) -> f64 {
    return (x[0] - 3.14159265).powf(2.0) + (x[1] - 2.71828).powf(2.0);
}

so the package allows to type

let mins: Vec<f64> = vec![-10000.0_f64; 2];
let maxs: Vec<f64> = vec![10000.0_f64; 2];

let result = mccga(f, &mins, &maxs, 0.001, 100000);

to minimize the objective function where result is a 2-element vector. One can test the result using

assert!(isequal(&result[0], 3.14159265, 0.001));
assert!(isequal(&result[1], 2.71828, 0.001)); 

Other implementations

  • Python (https://github.com/jbytecode/mccga.py)
  • Julia (https://github.com/jmejia8/Metaheuristics.jl)
  • Java (https://github.com/jbytecode/mccga.java)

About

Machine-coded compact genetic algorithm in Rust

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.