04 Apr 2017
courses, documentation, noc
This week's assignment was to do something with genetic algorithms (GA). Genetic algorithms help solve "optimization problems based on a natural selection process that mimics biological evolution" [citation]. In thinking about other things passed on through the generations, I realized I could have some fun with family recipes. So I made a thing that mutates your treasured family recipes. Thought you had the perfect peanut butter cookie recipe? You need to adapt to the times, try this one instead:
While the idea has enormous potential, I did run into some trouble. All of the subsequent lines run the GA on the first line, thus all four lines are trying to come up with '1 cup peanut butter.' So something needs to be fixed with the object constructor.
Code is at https://gist.github.com/coblezc/0a4598b796907c71ea0acc9305c4771d.