Skip to content

Utilizing Stack Genetic Programming to solve a symbolic regression problem

Notifications You must be signed in to change notification settings

farooqkz/stack-gp-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack genetic programming test

This is an exercise to use Stack GP for a simple symbolic regression task. If you want to get familiar with Genetic Programming in a few minutes, read GP.md

Crates used

  • rand is used as an RNG
  • rayon is used to use multiple threads and thus higher performance
  • clap is used to parse command line arguments. You can specify the population and other hyper parameters

Known issues

  • It seems that on some computers, rayon detect 2 processors rather than 4. There are actually 2 processors but the CPU supports 4 threads. This technology is known as hyper threading. To overcome this, you might want to specify number of processors used manually in the code.

What SR problem does it solve?

f(x) = 2 * x * x

Since this software is written in Rust, is it idiomatic?

I've tried but I'm not a Rust expert, yet.

License

The MIT License. Copyright (C) 2023 Farooq Karimi Zadeh

fkz@riseup.net