Skip to content

P3RK4N/GeneticAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GeneticAlgorithm

Program in which user-built shapes learn how to walk using neural network brains while also evolving trough genetic algorithm. First implementation is in python with pytorch, not in real time. Second one is in C++ using OpenGL with compute shaders, in real time.

Performance:

  • 4.000.000 shapes drawn at 60FPS
  • 1.000.000 shapes drawn at 60FPS including physics calculation for each one
  • 100.000 shapes drawn at 60FPS including physics,neural network passes and evolution for each one. (n^3 matrix multiplication, could be much faster)

Examples

This is a visualization of generations of creatures. As time progresses they become better and better at going to the right.

Python - PyTorch

the left column is the best creature of the generation, the right column is the sample of the population

C++ - OpenGL

Spiders

Tigraf.-.Genetic.Algorithm.mp4

Bipeds

Tigraf.-.Genetic.Algorithm.-.Biped.mp4

About

Shapes learning to walk with neural network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published