GithubHelp home page GithubHelp logo

auto-soylent's Introduction

Auto-Soylent

Although there are many theories on the best way to automatically generate soylent recipes, so far only 1 has been attempted: https://github.com/nick/genetic-soylent

The purpose of this skeleton project is to provide a base from which developers can work on other ways to generate soylent recipes automatically.

This first version lets you access the ingredient and nutrient targets from any of the recipes on the DIY Soylent website. The base example is the popular "People Chow" recipe.

For a detailed discussion on generating soylent recipes automatically, see the thread on the Soylent forum:

http://discourse.soylent.me/t/genetic-algorithms-automatic-diy-soylent

Goals

A successful implementation would, given a list of ingredients, generate a recipe with close to 100% of each of the nutrients in a given profile.

The API should look something like this:

generateRecipe(ingredients, nutrientTargets) {

    // code to generate recipe

    // return an array of quantities in the same order the ingredients were provided in.
    return ingredientQuantities;
}

A nutrient profile looks like this:

var nutrientProfile = {
    "name": "U.S. government DRI, male 19-50, 2000 calories",

    "calories": 2000,
    "calories_max": 2100,
    "protein": 85,
    "protein_max": 90,
    "fat": 65,
    "fat_max": 70,
    "calcium": 1,
    "calcium_max": 2.5,
    "vitamin_c": 90,
    "vitamin_c_max": 2000,
    ...
}

Ingredients look like this:

var ingredients = [
    {
        "name": "Masa harina",
        "serving": 100,
        "unit": "g",
        "calories": 365,
        "protein": 9.3,
        "fat": 3.86,
        "calcium": 0.141,
        "vitamin_c": 0,
        ...
    },
    {
        "name": "Now Foods 100% Whey Protein Isolate",
        "serving": 100,
        "unit": "g",
        "calories": 110,
        "protein": 25,
        "fat": 0.5,
        ...
    },
    ...
]

Note that the 'serving' and 'unit' properties denote the quantity of an ingredient the nutrient amounts relate to. For example, in the ingredients above, 100g of Masa harina contains 365 calories and 9.3g protein.

Implementation

This project was implemented in Javascript so that, if a successful solution is found, it can be re-incorporated to the DIY Soylent website. The idea is that any user could automatically reconfigure a recipe to their nutrient profile.

Installation

  • This project depends on Node.js and Git.
  • Visit http://nodejs.org/ to install node.js.
  • Visit http://try.github.io/ for a quick intro to Git and GitHub
  • Once you have node and git installed, clone this repository to your local machine
  • Run npm install to download the dependencies
  • Type node app to run the app.

Example output

Example Auto-Soylent Output

Licence

MIT

auto-soylent's People

Contributors

alrecenk avatar connec avatar nick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auto-soylent's Issues

Looks like it's down?

Application error

An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.

Maximums for individual ingredients?

Is there a way to limit the amount of a particular ingredient?

I plugged in my recipe and it returned telling me to use over half a kilo of egg, i'd like to limit to about 5 eggs or whatever that equates to in grams?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.