An experiment in writing a genetic evolution algorithm that runs in wasm in the browser.
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.
-
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
-
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 athttp://localhost:8080
. -
npm run build
-- Bundle the project (in production mode).