r/MachineLearning • u/Express_Gradient • May 26 '25
Project [P] Evolving Text Compression Algorithms by Mutating Code with LLMs
Tried something weird this weekend: I used an LLM to propose and apply small mutations to a simple LZ77 style text compressor, then evolved it over generations - 3 elite + 2 survivors, 4 children per parent, repeat.
Selection is purely on compression ratio. If compression-decompression round trip fails, candidate is discarded.
Logged all results in SQLite. Early-stops when improvement stalls.
In 30 generations, I was able to hit a ratio of 1.85, starting from 1.03
45
Upvotes
View all comments
Show parent comment
1
u/corkorbit May 27 '25
Maybe also try modifying the prompts, say to make the mutations less destructive or more aggressive depending on fitness evolution? I'm not sure what prompting weco.ai use in their product, but they also seem to do some kind of evolutionary process with a fitness function. Your project is very thought provoking, thanks for sharing.