paint-brush
How Genetic Algorithms Can Compete with Gradient Descent and Backpropby@thebojda
4,042 reads
4,042 reads

How Genetic Algorithms Can Compete with Gradient Descent and Backprop

by Laszlo FazekasMarch 4th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Evolutionary Algorithms are mimicking biological evolution and can be used for non-differentiable functions. When you are using a genetic algorithm, you need DNA that describes an instance and a fitness function that shows how close a given solution is to achieving the set aims. In this article, we will train a simple neural network to solve the OpenAI CartPole game. In the first row, we disable gradient calculation, because we don’t need gradients. The fitness function evaluates the solution, and the return value can be any number. We are generating an initial population with random DNAs with 10 initial solutions.
featured image - How Genetic Algorithms Can Compete with Gradient Descent and Backprop
Laszlo Fazekas HackerNoon profile picture
Laszlo Fazekas

Laszlo Fazekas

@thebojda

L O A D I N G
. . . comments & more!

About Author

Laszlo Fazekas HackerNoon profile picture
Laszlo Fazekas@thebojda

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite