Showing posts with label Genetic Soylent. Show all posts
Showing posts with label Genetic Soylent. Show all posts

Saturday, October 12, 2013

Genetic Soylent Does Ratios

I've just pushed code to github to support comparison of ratios of nutrients. You will find the data at the bottom of the middle column.

The defaults are the optimal ratios discussed here, but as with other nutrients, you can modify them based on your own theories and beliefs.

Some recipes to play with:

http://2potatoes.github.io/genetic-soylent/?recipe=2potatoes-hacker-school-not-modified
http://2potatoes.github.io/genetic-soylent/?recipe=simplecheapvegannosoy-soylent-low-carb
http://2potatoes.github.io/genetic-soylent/?recipe=donals-complete-soylent-sedentary-1800

Tuesday, October 8, 2013

Genetic Soylent Can Now Optimize Cost

I just pushed an update to github that treats daily cost as yet another nutrient for genetic soylent recipes. You can use this to help minimize the cost of your recipe (or, I suppose, to help maximize the cost of your recipe if you want some Soylent Bling.)

A few thoughts:

  • Remember that if the cost falls anywhere between the minimum and maximum value for the nutrient that it is scored the same--as 0 deviance. If you want to get the cheapest soylent possible, set the maximum value lower than you'd like to pay and the genetic algorithm will prefer to lower the value whenever possible.
  • I recommend setting the priority on the cost "nutrient" down to .3 or .1 as a way of telling the algorithm that, all-other-things-being-equal, you'd prefer a cheaper soylent. The priority is a multiplier for the cost function, so a value of .1 means that you'd rather have less than a 1 unit difference in a nutrient than a $0.10 difference in cost.

Some recipes to play with:

http://2potatoes.github.io/genetic-soylent/?recipe=2potatoes-hacker-school-not-modified
http://2potatoes.github.io/genetic-soylent/?recipe=simplecheapvegannosoy-soylent-low-carb
http://2potatoes.github.io/genetic-soylent/?recipe=donals-complete-soylent-sedentary-1800

Tuesday, October 1, 2013

Loading your recipe from diy.soylent.me

Those interested can now use a link to directly load a recipe for testing to play with the genetic soylent algorithm.

To create a link that will load your recipe do the following:

  1. Go to your recipe on diy.soylent.me.
  2. When you are on your recipe's page, the url bar of your web browser will be: http://diy.soylent.me/recipes/[recipe name]
  3. Copy the [recipe name]
  4. Append it after the following: http://2potatoes.github.io/genetic-soylent/?recipe=[recipe name]
A correct link will look like these:

Monday, September 30, 2013

Genetic Soylent

I've been playing around with nickp's genetic soylent code. The results have been fascinating, and anyone interested can play with my modifications to the code here. (And view the code itself on my github repository here.)

To show the kind of optimization that one can obtain, compare the nutrients in the original hacker school recipe with the genetically optimized one that I've posted on diy.soylent.me. Looking at the completeness graphs, we've gone from 86% complete on the original recipe to 94% complete for the optimized recipe--all using the same ingredients. Of course, an optimized recipe does not necessarily mean a tasty recipe and, looking at all the brown sugar from the best result I found, it certainly doesn't mean a low glycemic index.

My findings so far:

  • Running the genetic algorithm multiple times is a good idea. It will sometimes find a local minima that it can't climb out of. Running a few times will help you see a larger picture.
  • Apparently milk and brown sugar are a good way to get a lot of nutrients.
  • Watching the deviation counter drop as the recipe continues is a lot of fun.
  • Usually a recipe has "settled" after somewhere between 300 and 500 generations.
  • Imposing more constraints can be helpful for getting a recipe to settle more quickly. Additionally, adding a minimum of certain ingredients (like cocoa power or sugar) can help ensure that the result will taste good.

Words of warning:
  • Min/Max on the ingredients still have some bugs. The recipe won't always respect the minimum value for an ingredient.
  • Not all recipes from diy.soylent.com work yet, so there are still some issues to be tracked down.
  • As with all soylent recipes, you should really know what you are doing before you start consuming one regularly.