/books/genetic-algorithms-in-elixir
Active Threads:
Most Active This Week
Most Active This Month
Most Active This Year

@seanmor5
Genetic.run call on page 30 doesn’t match function signature defined on page 28.
Page 28
def run(genotype, fitness_function,...
New

Hi, the use of ^^^ is now deprecated
So, from this
$ iex
iex(1)> use Bitwise
Bitwise
iex(2)> key = 2491717835680677893
24917...
New

On page 151, the id for each new Chromosome struct is set via a default value like:
defmodule Types.Chromosome do
@enforce_keys :genes...
New
Most Active Last Three Years

Now working through chapter 2.
An underscore makes a better placeholder than …
Intialize is added above the two rum functions. We only ...
New

At the beginning of page 59, in chapter 4
alter the evolve function to track a generation parameter, like this:
def evolve(problem, g...
New

Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread):
Tit...
New

@seanmor5
On page 43, changes were made to the Genetic.crossover function to support a new shiny Chromosome struct.
On page 93, the cod...
New

The diagram of the generated child is incorrect.
Removing the sliced genes of parent one from the genes of parent two should give a list...
New

Provided source code has some problems when dealing with the reinsertions.
scripts/schedule.exs example has a default reinsertion strat...
New

Text reads:
“The :rand.uniform/1 function produces a uniform integer between 0 and N-1…”
I believe this should be:
“The :rand.uniform/...
New

The definition of evolve(…) on page 61 is missing the first population parameter.
New

The code of the run/4 function at the bottom of page 28 is not updated with the opts param in the inner function calls:
Finally, pass o...
New

Given the list [0, 2, 1, 3, 6, 4, 7, 5], and assuming the list index represents the chessboard row number, then the queen at index 4 (row...
New

At the top of page 25 is
Below initialize/2 , create a new function named evaluate:
At this point of the development the definition o...
New

When running the Cargo problem with
soln = Genetic.run(Cargo, population_size: 25)
we get an error due to an odd population size agains...
New

def fitness_function(chromosome) do
chromosome
|> Enum.map(fn {roi, risk} -> 2 * roi - risk end)
|> Enum.sum()
end
sh...
New

@seanmor5
On page 92: the order_one crossover type is declared as
def order_one_crossover(p1, p2) do
On page 94: The default is set to...
New

typo fitness.() → evaluate.() (page 13)
New
Book Info
Publisher:
Pragmatic Bookshelf
Are you this book's author? To be notified of all posts made about it, sign up an account then click here, then select 'watching' from the bell icon in the top right corner.
Get money off!

The Pragmatic Bookshelf
35% off any eBook
Simply use coupon code "devtalk.com" at checkout. See full details here.