Skip to content

bantic/image-evol

Repository files navigation

image-evol

An experiment in writing a genetic evolution algorithm that runs in wasm in the browser.

gif of image evoluation

Curious? There is a presentation covering my learnings while working on this, and a deployed site that hosts the various demos that show different points of progress.

todos

  • write the similarity code

  • write mutation code

  • write loop to mutate

  • try to make mutate faster -- mutate in-place (this worked -- way, way faster)

  • try to make mutate faster -- see how it changes with many more line segments -- no problem with even as many as 500 segments

  • add filled triangles

  • replace line segments with triangles

  • colors & transparency

  • implement population selection - mutation, tournament selection

  • create a pool of mutation candidates and select the best ones at each iteration -> improve the convergence

later todos

  • remove unneeded nalgebra crate?

  • load an image as a reference rather than random

  • UI controls to modify mutation rates

  • npm run start -- Serve the project locally for development at http://localhost:8080.

  • npm run build -- Bundle the project (in production mode).