Installing and Compiling ALEx

The ALE, and subsequently ALEx, requires libsdl1.2[10] and cmake.[11] If you don’t have either, you can install them like this:

 $ ​​sudo​​ ​​apt-get​​ ​​install​​ ​​libsdl1.2-dev​​ ​​libsdl-gfx1.2-dev​​ ​​\
  ​​libsdl-image1.2-dev​​ ​​cmake

The easiest way to build ALEx on Windows is by installing the Windows Subsystem for Linux (WSL) and running your project in the WSL.

Next, you need to add ALEx to your dependencies in mix.exs:

 defp​ deps ​do
  ...
  {​:alex​, ​"​​~> 0.3.2"​}
  ...
 end

Now, run mix deps.get. After your dependencies are downloaded, run mix deps.compile. You should see something like this:

 $ ​​mix​​ ​​deps.compile
 Compiling ALE. This will take some time.

As the output says, ...

Get Genetic Algorithms in Elixir now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.