Why Elixir?

Get to know why Elixir is an excellent choice for working on genetic algorithm design.

How does Elixir fit in?

You’re likely wondering two things before you begin this course:

  • Why would we do this in Elixir?

  • How does Elixir fit in the bigger picture of genetic algorithm design?

Elixir is certainly not a popular choice for genetic algorithm design; however, that does not mean it is not a good choice. Let’s take a look at the advantages that it brings.

Advantages of Elixir

Firstly, as you will see in the upcoming chapters, parallelism in Elixir is a straightforward task. The BEAM is specially optimized for running numerous processes at once, so writing and running parallel code is easy. Genetic algorithms are, by nature, very parallel. A portion of research into genetic algorithms takes advantage of the parallelism offered by Erlang to experiment with parallel genetic algorithms.

In addition, Elixir’s syntax and design patterns lend themselves nicely to writing idiomatic genetic algorithms. As you will see throughout this course, Elixir offers a number of useful features for creating a general framework for genetic algorithm design. This is not only excellent for learning, but also for rapid prototyping of new ideas.

You might not choose to implement a production-level genetic algorithm in Elixir, but using Elixir to prototype and experiment can save you significant amounts of time and effort.

Now, it’s time to get started writing your first genetic algorithm.