Skip to content
a simple naive example of a basic genetic algorithm written in Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
README.md
mix.exs
mix.lock

README.md

Speller

Speller is an automated system that is responsible for spelling any word or phrase given. This goes with the the Blog post on Automating the Future called Automated Problem Solving with Genetic Algorithms. This algorithm has not been parallelized as of yet, so larger words or phrases will take a considerable amount of time to complete. The purpose of the project was to illustrate a easy to grasp example of Genetic algorithms. Feel free to download this code and play around and tweak it as you see fit. It is available to help users get the main concept behind genetic programs. For more information visit Genetic Programming site or Automating The Future

Example

#Start the system
~/source/speller (master)  ⅀  λ iex -S mix


# Tell Speller to spell a word
iex(1)> Speller.spell "Hi"
WORKING TOWARD GOAL: Hi
====================================
RESULT                       FITNESS

Hb                             1
Hi                             2
TARGET REACHED!!!!
Hi                             2

If you have a fast machine it should solve rather quickly, however, bigger words or phrases doesn't have a really good performance because the code has not been parallelized as of yet. That will perhaps be the next version of this project. For now, I believe it illustrates the point of the post quite well.

You can’t perform that action at this time.