rebelwarrior

rebelwarrior

Genetic Algorithms in Elixir: Natural Selection Chp5(p.71)

Hi Sean,

Just go your book and looking it over.

Some bg on me, I’m a ecology and evolutionary major from Princeton, later self-taught programmer. I’ve been noticing a lot of confusion on natural selection related to genetic algorithms just in general.

In general genetic algorithms aren’t based on natural selection but on artificial (human) selection. The big difference is how fitness relates to the outcome. In artificial selection you determine “fitness” a priori, that is before selection, while in evolution “fitness” really is an emergent property. It’s a little weird and that’s why evolution took such a long time to understand.

Darwin’s later adoption of the phrase “survival of the fittest” (which he didn’t coin) is probably the source of this confusion but fitness is not the determinant factor for survival. What? I know. It sounds like the exact opposite of what you’ve heard. But fitness is a property that shows up only after survival. A better way to say it would be “those that survive, tend to be more fit” A tendency that is not deterministic. Can you have the less fit survive? Well technically yes, but more importantly you have no idea what “fit” is until after selection. Remember that natural selection explains the why of speciation. Why there are many species and why they evolve not fitness. Contrast this with artificial or human selection. We breed dogs for certain qualities, we grow plants and select the seed with the qualities we most desire. Here “fitness” is determined by humans before selection, in fact, selection is based on these factors. This seems to be more closely aligned with genetic algorithms to me.

Ok getting back to the book. The following phrase “The fittest individuals are the ones that are selected to reproduce because they can pass their strong genes to the next generation.” on page 71 is technically wrong when referring to natural selection; it is correct when referring to artificial selection.

Nicely this phrase just before it “Charles Darwin’s theory of evolution suggests that strong traits that are key to survival become more common in successive generations.” is correct.

This may seem like a small thing but this misunderstanding of Natural Selection has lead to it being used as a pseudoscientific justification for discrimination in the hands of Social Darwinist, which is really just a pseudoscientific excuse to not be a nice person.

Let me know if you have any questions, happy to discuss.

– David Acevedo

Marked As Solved

seanmor5

seanmor5

Author of Genetic Algorithms in Elixir

Hey David, thanks for the excellent feedback. I see exactly what you’re saying in the sense that using analogies like this can be misleading. Overall, my understanding is that biological/genetic underpinnings in genetic algorithms go little beyond their inspiration. Despite this, I decided it was best to try to use some of these analogies in the hopes that they may be useful in understanding GAs a little better.

To your point, I see exactly how the analogy I used in that circumstance is incorrect, and how that kind of misleading analogy can be harmful. While I won’t be able to fix it before the next beta ships, I will absolutely address it before the final version.

I appreciate your feedback. If you come across any misleading analogies/inconsistencies, feel free to message me or post in here! Thank you for taking the time to make the book better!

Where Next?

Popular Pragmatic Bookshelf topics Top

ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
jesse050717
Title: Web Development with Clojure, Third Edition, pg 116 Hi - I just started chapter 5 and I am stuck on page 116 while trying to star...
New
simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
rmurray10127
Title: Intuitive Python: docker run… denied error (page 2) Attempted to run the docker command in both CLI and Powershell PS C:\Users\r...
New
oaklandgit
Hi, I completed chapter 6 but am getting the following error when running: thread 'main' panicked at 'Failed to load texture: IoError(O...
New
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New
davetron5000
Hello faithful readers! If you have tried to follow along in the book, you are asked to start up the dev environment via dx/build and ar...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1143 25883 760
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
New
New
PragmaticBookshelf
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
New

Sub Categories: