Let's Create And Train Digital Babies!


8/12/2019 - Category: ai, coding, research,

In my previous interactive posts related to artificial intelligence, you were able to train and understand a perceptron (artifical neuron) and a neural network (artifical brain)!

Now, let's make use of them! We will create and train 'digital babies' to reach a target!

Video games are some of the most used environments to test artifical intelligence.

In this specific example, we will create 100 digital creatures. They have a certain lifespan and all have their own digital brain (randomly initialized neural network). Therefore they will randomly navigate the labyrinth at first.

The goal is to have them evolve to understand how to reach the target before their life span is over.

Once their lifespan is over, a new generation of creatures is created by combining the genes of the smartest ones! In this example, the genes are the weights of the neural networks. We measure how smart they are by how close they get to the target (it is called a fitness function). This is based on Darwinism.

"Darwinism is a theory of biological evolution developed by the English naturalist Charles Darwin and others, stating that all species of organisms arise and develop through the natural selection of small, inherited variations that increase the individual's ability to compete, survive, and reproduce."

Go ahead and press the start button. You'll see that the digital babies are randomly moving at the beginning but getting smarter and closer to the target generations after generations.

If you press 'start' another time, it will reset the generation number. The digital babies might find a new way to reach the target with this new simulation...

It sometimes only takes 10 generations for most of the creatures to reach the target. Other times, many more generations are needed.

Fascinating, isn't it? This is called neuro-evolution.

As usual I shared the whole code on my Github page!


Number of generation:



Did you enjoy this article? Send a tip!

Bitcoin address: bc1q2wyvxgelyhvrunyrlzdennt4fnl5z2cu5vyny2

Ethereum address: 0x23568b37327dE6Be3f2A993B49fA6afD82f38f14

Share This Post!


Related Posts To Category "ai"

Let's Train A Perceptron!

Read

Let's Train A Neural Network!

Read

All Categories

ai, coding, cooking, drawing, grammys, outperformance, mentoring, music, research, socialmedia, strategy, trading, travelling