Genetic Drawing
github.com
github.com
It would probably be possible to use a brushstroke engine like say Krita's to do better, but I don't know how accessible that is outside the GUI, and the CPU implications might end up challenging (often many strokes need to be randomly generated before you get one that's an improvement worth keeping).
On the other hand, what's happening here is also slightly different to what people usually mean by genetic optimisation in that it looks like it's only the most recent brush stroke that's being randomised. Normally you'd keep the entire stack of strokes around as a genome and allow any of them to mutate, which means you'd need to do a full render at every generation, as opposed to just blitting a single stroke per generation.
With the genetic drawing method linked, you could start with the current frame, and add brush strokes to the regions that are different to make it more like the next frame. That way things that aren't changing would stay still and not flicker.
If you take a look at reddit.com/r/generative (and /r/proceduralgeneration) you can find interesting projects and ideas, and sometimes people also post their code.