Swizec Teller - a geek with a hatswizec.com

    A random deterministic process

    People often look at me with disbelief in their eyes when I start going on about determinism in random events. I'm not exactly certain why people at large have such a difficult time understanding that a series of random events can amount to a measurable and predictable outcome.

    Let's take evolution as an example. There are many reasons as to why it's deterministic because there's obviously many similiraties between living organisms. For example all vertebraes have a heart and such. Why? Well because the heart is the ultimate blood pumping device for this kind of animal. Why does everyone have ears based on the same principles (thin vibrating membrane and so on)? Because it just works.

    But then, if evolution is random as so many people tend to believe, how is it that time and again it comes to the same solutions to similar problems? Wouldn't a completely random process create MUCH more variation? Well yes, so evolution cannot be random.

    But isn't it that mutations are random you say? Well yes, they are. So how is it that evolution can be deterministic then?

    It's really quite simple. Evolution isn't a process, it's actually two intetwined processes. There's mutation, which is random and then there's natural selection, which is selective. Together they form a process that through random events reaches a perfect solution.

    Because people still had a hard time understanding me I created a short algorithm that displays a dumbed down process of evolution on real numbers. It's based on units with ten children each. The way it works is actually fairly simple. It starts with a single unit that is a number 1. Then produces its ten children by applying adding a random number between -0.300 and 0.300. There is a 50% chance of this delta being negative. Once the ten children are produced it applies the same "breed" function to those that are nearer the ideal number (1000.000 in my case). This is to display natural selection which favors those that are better to those that are worse. Within 6600 generations this algorithm became such that all still living units were within 0.3 from the ideal and if I kept it running for long enough the population would probably die out as it couldn't improve anymore. Real evolution solves this by always changing the ideal.

    So you see, a random process, by help of a selective process, can easily become deterministical and move towards a "goal".

    Did you enjoy this article?

    Published on March 29th, 2008 in intrigues

    Learned something new?
    Want to become an expert?

    Here's how it works 👇

    Leave your email and I'll send you thoughtfully written emails every week about React, JavaScript, and your career. Lessons learned over 20 years in the industry working with companies ranging from tiny startups to Fortune5 behemoths.

    Join Swizec's Newsletter

    And get thoughtful letters 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.

    "Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"

    ~ Ashish Kumar

    Join over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

    Ready to Stop copy pasting D3 examples and create data visualizations of your own?  Learn how to build scalable dataviz components your whole team can understand with React for Data Visualization

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️

    Created by Swizec with ❤️