5 ms·
I ended up building my own solution to this problem too (though mine is not open to public) The main thing I wanted to optimize was menu planning. So I wrote
by swalsh 7y ago
I ended up building my own solution to this problem too (though mine is not open to public)
The main thing I wanted to optimize was menu planning. So I wrote a genetic algorithm which will generate a menu, add the score, mutate the menu in some way, and iterate. In my database I have a rough price per ingredient, and my families enjoyment of the recipe (though I have kind of a lagging gradient which reduces the score per recipe to prevent duplication). I also have included in my algorithm what I call slots. So something like a lasagna will take 4 slots where as a stir fry will be 1 slot. I sync my schedule and break it down to slots. This allows the algorithm to fit the recipe to the time available. I dont score slots though otherwise short recipes always win.
Since the algorithm optimizes based on the week, but keeps a running inventory it's pretty good at maximizing my grocery bill and family enjoyment. My average grocery bill is between $40-$60 a week. And I cook 5 times a week.
- x86mitch 7y agoThis sounds like something I would use if it were public. It would be awesome If I could swap recipes from the plan. For example, if I didn't feel like having stir fry I could swap it out for a meal with similar points.
- swalsh 7y agoI've thought about making it public, but it's highly optimized for me... also therea no gui. It's just a command line app in python. I could make it open source though. It would be neat to see how other people modify it.
- swsieber 7y agoI would love to see it even if only to see how that algorithm works.
- x86mitch 7y agoWould love to see it. Please reach out to me if you do open source it.
- karanbhangui 7y agoAgree with the others, please consider making this open source. Would love to use and contribute to it!
- dba7dba 7y agoPlease make it open source if possible. I would love to be able to use it.
- ahnick 7y agoAdd me to the list of interested parties. :-)
- Sindrehan 7y agoI'm interested as well!
- Centaurefox 7y agoI would also love to see it ! Please make it opensource if you can, thanks
- workthrowaway 7y agokudos! i got similar problems with optimizing recipes & groceries, but i never got past google keep and apple reminder. anyway, a word of caution about open sourcing. people are quick to scream that you make the source available. but what about this? an article/blog describing in more details how you solved the problem instead? few people ever ask that. what i saw with open source is, once you put the code out there, people will start requesting features, making you carry the burden of maintenance, etc. but ofc there are good things too. i just haven't seen it with small niche projects. my 2 cents.
- inferiorhuman 7y agoI ended up building my own solution to this problem too (though mine is not open to public) Me too, although I'm solving a different problem: organization. I'm not so concerned with cost or nutritional value. In the end I went with a somewhat simpler route: LaTeX (well xelatex). I built a couple document classes, one creates a letter sized document and one creates a 4x6 index card sized document. I used the former to concatenate all the recipes into a master PDF as well. This "master" PDF contains the recipes as well as indexes (by author, by ingredient). I've tried tablets in the kitchen, but ultimately for me the most convenient thing was to just tape a printout onto a cabinet door and go from there. YMMV.
- roel_v 7y agoYou mind sharing? My home grown solution also focuses on generating physical documents, but I'm not so happy with my Markdown + custom formatting engine solution.
- koolba 7y agoHow many people can you feed on $60 a week? Is this in the USA?
- fouc 7y agoYou can feed a family of 4 on $60/week in the USA. Especially if you buy staples and raw ingredients and cook everything from scratch. Rice, flour, beans, lentils, etc should be the bulk of your staples. They are also dirt cheap. Remainder of the money can be used on fresh vegetables.
- swalsh 7y agoI live in MA. This is for 2 adults, 1 4-year-old, 1 almost 2-year-old. I should mention, this price does not include the cost of lunches (The school provides lunch, my wife buys lunch at work, and I usually snack throughout the day instead of eating lunch). Next, I don't buy processed or pre-made foods. So I'll snack on nuts instead of chips. It started as a health thing (they're always filled with sugar, and stuff) but i've found it's also saves a bunch of money. I make my own stocks, and sauces. I cook a lot of chicken, and usually I'll buy bone-in thighs. It started as a flavor thing (I find breast meat flavorless) but it's super cost effective. A family pack costs $.99 a pound, so for less than $5 I can get 2 meals worth of chicken, some bones for stock, and some fat for schmaltz. The rest of the savings come from efficiency. My program groups like ingredients, so I have less waste. A cart full of fresh vegetables, some dairy products, a couple family sized proteins, the occasional staple, and a few bonus treats for the kids is super cheap. My bill also doesn't include alcohol. I've given up drinking mostly to boost my night-time productivity, but I'll buy wine in bulk which I mostly use for cooking, though I might have a glass with dinner.
- dba7dba 7y agoI have been thinking about building something like this also. I work from home and so I open the fridge throughout the day for 3 meals, snack, lunch for kids etc. And I noticed how much is thrown out despite attempts to not do so, because different items have different shelf life.
- Elof 7y agoWould also love to check out an open source version.
- Mathnerd314 7y agoSounds like https://www.eatthismuch.com/ https://www.eatthismuch.com/ but with a different algorithm
- 0xfaded 7y agoI've done this as well using scraped recipes from a website that conveniently labeled all ingredients with data tags for their referral program. Although my goal was to find recipes that shared ingredients to cut back on wastage. I used a constraint solver (https://developers.google.com/optimization https://developers.google.com/optimization) and asked it to produce 5 recipes requiring the minimum number of ingredients, and was rather amused that the first run included such classics as "boiled egg", "butter potato" and "toast".
- fastturtle 7y agoThat sounds like a fun project, where did you get the data from?
- 0xfaded 7y agoDon't really want to say because of legality of scraping, but it was a big one with convenient data attributes on the ingredient elements. Shouldn't be too hard to figure out.
- KurtMueller 7y agoC'mon now... talking about data attributes on a html element is not illegal. allrecipes.com has data attributes on their ingredient list. seriouseats.com has css classes on their ingredients. those are two that i just checked on the spot.
- blue_devil 7y agoI've a different take. I use a voice diary app that I built (originally for hiking trips) - I take a picture of the ingredients, then record the cooking instructions, and replay this when cooking (the picture shows as background when you play the recording). I add notes about the ingredients, or tags to the recording. It's easier for me to "listen" to a recipe and pause as needed, vs. to look it up. It's a more casual approach though - no constraint optimisation, or anything like this, but I find it works great for me. Also I can share a recipe this way with someone else by just sharing the recording p2p.
- Hypergraphe 7y agoWow this looks like an app i could pay for. How do you score the candidates ? Manually ? How do you not end up with the same reciepies recommended all over again, i.e, do you always use a new mutation to try ?
- Infernal 7y agoI would love to use something like this, sounds incredible.