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

belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
johnp
Hi Brian, Looks like the api for tinydb has changed a little. Noticed while working on chapter 7 that the .purge() call to the db throws...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |> handle_event() |> render() but the correc...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
New
jgchristopher
“The ProductLive.Index template calls a helper function, live_component/3, that in turn calls on the modal component. ” Excerpt From: Br...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
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

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New

Sub Categories: