Giter VIP home page Giter VIP logo

infoia's People

Contributors

jordi2105 avatar lambdara avatar meesf avatar mljinki avatar tklunder avatar

Watchers

 avatar  avatar  avatar

infoia's Issues

Replacable Weight with recipes

Each ingredient in a recipe should have a "ReplacableWeight" attribute which indicates how much you want to keep something. This should be added in the text files. A higher weight means that it will have a lower chance of being replaced. The format will be: ingredient weight. So for example: "Steak 3.0" means that the simularity will be: simularity^3.0.

Weight for being a replacer in a recipe

Some of us think this is a good idea, some of us have their doubts. Besides #25 there should also be a weight that indicates how well a certain ingredient can function as a replacer in the recipe. So for example, when there is a recipe with the ingredients (among other things): garlic, onion and tomato. Let' say we don't have onion. Since onion has a high simularity with garlic, onion will probably be replaced by garlic. This is (in my opinion) not what we want, since there already is garlic in the recipe. It could even be the case that the recipe will be end up with 3 garlic and a tomato for example. A solution to this could be that there is another weight. A high weight means that the ingredient will, instead of being replaced by an ingredient that is already in the recipe, be replaced by an ingredient that has a lower simularity but is not in the recipe already. This creates more variation in the recipes.

Create GUI for agent

Basic: A small UI to see your fridge and possible recipe.
Advanced:

  • Choose NEXT recipe
  • Add ingredients to fridge

Adjust pastas

We should add some more subclasses for the different pastas

Implement ontological tree in code

An ontological tree is a tree where all nodes are categories, and the leaves are ingredients. There is #2 on the implementation of ingredients.

Fix recipes

We have decided that for simplicity (for now) we will only use recipes/ingredients for different pasta's. The recipes need to change in such a way that is uses the exact names for the ingredients from the ontology.
So 2 things need to be done:

  • Create more pasta recipes
  • Make sure that the ingredients have the same name as in the ontology

Algorithm is suboptimal when shopping list is required

When a shopping list is required to hit the threshold, it will start with replacing all missing ingredients for all recipes, then taking the recipe with the highest utility, and creating a shopping list until it hits the threshold. This is how it works from #46 on.

This is not necessarily optimal; There could be recipes which would hit the threshold with a smaller shopping list, because of different values for the available replacements.

The proper way to do it is this: Go through all the recipes, replacing (sorted by smallest effect on utility) ingredients without getting under the threshold. If you are about to go under the threshold but there are still ingredients missing, you add them to the shopping list. This leaves you with a shopping list for every recipe. Now you just choose the recipe with the smallest shopping list; break ties based on utility. (This is important especially if there are multiple recipes without a shopping list).

Remove unused file

In the directory /ontologies there are 3 owl files. The one we use is PastaOntologyRDF.owl. PastaOntology.owl can be removed.

Implement Ingredient Portions

And Ingredient portion is some amount of some ingredient. It is at least an ingredient; a portion could perhaps be an extention of the ingredient class, or have some ingredient field (think about this). Perhaps we should have one superclass like this and several subclasses for the different ways of measuring

Learning the weights of the user

We added weights to the ingredients of every recipe, but this is of course very subjective. For example someone could value one ingredient in this recipe more then someone else.
We could add a simple form of learning: ask user if he wants to replace ingredient A with B, add/subtract the 0.05 from the weight of ingredient A in the recipe.

Compute recipe with shopping list

Compute a recipe by starting with a recipe we know, replace some ingredients up to some threshold of maximum dissimilarity, providing a shopping list of missing ingredients.

Compute most similar recipe

Given a recipe with missing ingredients, compute a list of ingredients that is most like this but where ingredients are available. Implement this using the similarity measure of ingredients.

Add labels in Protege

Perhaps start with 5 basic flavors: sweet, sour, bitter, salty and umami (savory).

Provide ontological tree data (using protege)

There should be some file that provides data for the ontological tree. There should also be code that reads this file and turns it into a tree in memory. The tree itself is implemented at #4

Implement labeling of ingredients.

This builds on #2. Ingredients should have lists of labels. These labels should perhaps just be strings, but maybe it would be nice to have a weight as well, to indicate how much this label says. ("flaky" is perhaps less important than "sour").

Add weights for leaving out ingredients & using them

Every ingredient has a weight. In the code, the following is happening:

If (similarityOfMostSimilarIngredient > certain treshold)
     ingredientValue = similarity
else
     ingredientValue = 1 - weight

The utility of a recipe is product of all values of ingredients. Pick the recipe with highest utility (or no recipe if it is too low). This way, if a certain ingredient is very important (has a high weight), its value will be very low, so the product of the utility will be very low as well.

Leave out ingredients

We should come up with a solution to make it possible to leave an ingredient out. This can be done by replacing an ingredient by "nothing". We have to add "nothing" to the ontology somehow.

EDIT: we decided to use the weights in the recipes instead of a nothing in the ontology

Create/Prepare the presentation

Presentation: Please aim for a presentation of 20 minutes. Be specific in explaining what you have done. Specify clearly which agent architecture you have used, how you have designed its various components, why this was better than alternative architectures. Describe your ontology and its usage by the agent. Give demonstrations of a few scenarios that demonstrate how your agent uses the ontology for reasoning.

Amounts

We could add amounts in the calculation for which ingredients we have.

Things to think about:

  • Do we also have units or do we generalize those in some way?
  • (Perhaps make a different issue for this) Do we allow slight deviations (use the only 85g pasta where 100g is in the recipe) with a slight fitness penalty?

The general idea is simple: You don't have ingredients (in the fridge) anymore, you have amounts of ingredients. A recipe doesn't just require an ingredient, but a certain amount of ingredient. Ingredients should only be replaced with similar amounts.

Provide recipe data

There should be some file that contains recipe with ingredients. There should also be some that reads this file and creates a list of recipes (with in each recipe a list of ingredients).

Implement Recipes

Recipes are just lists of ingredients, because we don't really care about how a dish is made. Therefore you should probably just extend ArrayList

Read ingredients from ontology

Now, the ingredient objects are created using the ingredients from the avaible recipes. But we want all ingredients from the ontology. So, read them from the ontology and create the objects.

Break similarity ties on amounts

For example, if multiple ingredients want to be replaced by the same one and they have the same similarity (onion and garlic by shallot, for example), the ties should break based on amount, where of course only ingredients which we don't have too much of are considered.

Add ingredients that are removed to shopping list

If the bestrecipe decides that an ingredient can be removed, whilst still being able to create a decent recipe, add the ingredient to the shopping list. Maybe only if there already is a shopping list.

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.