rustbreeder by nagi
- 2 Devlogs
- 5 Total hours
Takes given clones and calculates the best possible offspring produced from a combination of held clones.
Takes given clones and calculates the best possible offspring produced from a combination of held clones.
First I found that finalizing anything over 5 plants would freeze my Mac for over 10 seconds. I looked over the vibe code and realized it was using permutations and generating every single outcome and running each outcome through the scoring system.
I used AI to switch from a brute force engine to a much more optimized engine. It implemented memoization (cache) which eliminated duplicates. It also implemented hill climbing sorting and random restarts, which helped find the best outcome much faster. (86% decrease)
Now that I’m starting to understand Stardance and Hack Club I’m pivoting from heavy vibe-coding to having Claude walk me through the code instead (in tandem with the tutorials). I’ll pitch the ideas, fixes, next steps, and ask Claude when I’m stuck on the technical aspects.
Made it exist:
Manually wrote the base of the engine that took a user’s given plant (berry) genes and weighed its worth based on its six traits. [rust (the game) genetics, iykyk]
Manually wrote code to predict the resultant trait(s) in each of the six gene slots when two plants are crossbred.
Vibe-coded a GUI with input for the user’s plant genes. Created a nice finalize button and separated the “instructions” (aka where to plant the plants you have) and the “resultants” (aka the plants you’ll breed).
Added edit/delete feature in case of a fat-finger when inputting plant genes.