Image Reconstruction with Polygons

Project Description

Genetic algorithms can be used to generate computer art. The idea is to generate samples until the computer rendering closely matches the original image given to the computer. In this application, a collection of polygons of various sizes, colors, and transparencies are overlapped to create an image close to the original.

General Requirements

  • Use a collection of polygons to produce an image close to a chosen original image.
  • Use a genetic algorithm to find the best arrangement of polygons.
  • Graphically display the state of good fit genomes with appropriate statistics that show progress toward the goal.
  • The system should allow modification of parameters, operators, and probabilities.
  • Add your own parameters to the genome.
  • Explore various measures of "best" fit.
  • Save the best from some number of iterations.

What is a Genetic Algorithm?

A genetic algorithm is a search heuristic that is inspired by Charles Darwin's theory of natural evolution. This algorithm reflects the process of natural selection where the fittest individuals are selected for reproduction in order to produce offspring of the next generation.

The process of natural selection starts with the selection of fittest individuals from a population. They produce offspring which inherit the characteristics of the parents and will be added to the next generation. If parents have better fitness, their offspring will be better than parents and have a better chance of surviving. This process keeps on iterating and at the end, a generation with the fittest individuals will be found.

A fitness function determines how fit an individual is. It gives a fitness score to each individual. The probability that an individual will be selected for reproduction is based on its fitness score.

- Credit to Towards Data Science. Visit their website for more information on Genetic Algorithms.