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 (artificial neuron) and a neural network (artificial 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 artificial 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 lifespan 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 (this 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 generation after generation.

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...

Sometimes it 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 generations:



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 Neural Network!

Read

Let's Train A Perceptron!

Read

All Categories

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