Skip to content
Roberto Aldera edited this page Jun 3, 2021 · 4 revisions

Notes

Meal container

  • Thinking of using a map where each meal has a UUID key and some sort of struct as a value, where that struct will then have attributes of the meal.
  • Struct could contain name of dish, and perhaps individual attributes (or another struct which holds just attributes), and perhaps the date the dish was last used

Database for meals

  • SQLite seems to be the simplest solution to use for now to create and then interface with a meal database
  • Great tool DB Browser for SQLite for viewing and modifying database very easily
  • VSCode extension SQLite is also useful for quickly viewing and doing other simple things with databases

Ideas

  • Produce many (10000?) meal plans for 1 week, and then pick the "best" one (with a scoring system)
  • Generate scores for a week plan, first using handwritten rules. Each week starts with say 100 points, and then is penalised for poor combinations like having more than one dish in a certain category, or putting dishes that take a long time to make on a week night
  • Add in current date which can be used to coarsely infer season - no soups in August please (later this could be expanded if I can find a way to bring in a weather forecast through some publically available API somewhere)
  • Ban meals from the week before (score of zero for that week as a quick implementation?), and penalise repeated meals from 2 weeks before that - requires some sort of history to be maintained (probably in a separate database table?) - might make more sense to record the date last used, because of the proximity of Sunday - Monday as opposed to something had on Monday then Sunday for example.
  • Identify winning combinations - these can be handwritten. Examples are Ragu and anything containing celery, or roast chicken and then chicken sandwiches to use up the leftovers. Reward plans that include these.
  • Allow some meals to be fixed and a partial plan passed as an input. This is useful - often we want a particular dish or two, and figuring out the rest is the difficult part.
Clone this wiki locally