Esempio n. 1
0
 def agent(self):
     #Check to make sure this is reasonable
     if use_physical_object == False:
         return None
     return PhysicalObject(prism_from_point(1, 6, 1, 2),
                           lcmId=State.AGENT_ID,
                           tags=['Robot'])
Esempio n. 2
0
 def __init__(self, temperature, empty, physicalObject=None):
     self.temp = temperature
     self.empty = empty
     if use_physical_object:
         if physicalObject == None:
             self.phyObj = PhysicalObject(prism_from_point(11, 3, 1, 2),
                                          lcmId=21,
                                          tags=['Oven'])
         else:
             self.phyObj = physicalObject
     else:
         self.phyObj = None
Esempio n. 3
0
 def __init__(self, contains, onTable, isCooked, physicalObject=None):
     self.contains = list(contains)
     self.onTable = onTable
     self.cooked = isCooked
     self.name = "pan"
     if use_physical_object:
         if physicalObject == None:
             self.phyObj = PhysicalObject(prism_from_point(1, 1, 1, 2),
                                          lcmId=23,
                                          tags=['Pan'])
         else:
             self.phyObj = physicalObject
     else:
         self.phyObj = None
Esempio n. 4
0
 def __init__(self, contains, homogenous, amount, physicalObject=None):
     self.contains = contains
     self.homogenous = homogenous
     self.amount = amount
     if use_physical_object:
         if physicalObject == None:
             #generate a random lcmID for each ingredient
             randomID = random.randint(5, 1000)
             self.phyObj = PhysicalObject(prism_from_point(1, 5, 1, 2),
                                          lcmId=randomID,
                                          tags=contains)
         else:
             self.phyObj = physicalObject
     else:
         self.phyObj = None
Esempio n. 5
0
 def __init__(self, contains, onTable, isHomogenous, physicalObject=None):
     #Is this deep copied?
     self.contains = list(contains)
     self.homogenous = isHomogenous
     self.onTable = onTable
     self.name = "bowl"
     if use_physical_object:
         if physicalObject == None:
             self.phyObj = PhysicalObject(prism_from_point(1, 3, 1, 2),
                                          lcmId=22,
                                          tags=['Mixing Bowl'])
         else:
             self.phyObj = physicalObject
     else:
         self.phyObj = None
Esempio n. 6
0
def test_dijkstra_simple():
    model_fname = "kitchenModel_1.5.pck"
    training_set = pickle_util.load("training.pck")
    rm = recipeManager.RecipeManager(model_fname)

    ingList = [("1/2 cup flour",
                kitchenState.Ingredient(contains=["flour"],
                                        homogenous=True,
                                        amount="1/2 cup",
                                        physicalObject=PhysicalObject(
                                            prism_from_point(3, 1, 1, 2),
                                            lcmId=5,
                                            tags=['Flour'])))]
    instList = [("Mix flour into mixing bowl.", "pour(flour), mix(flour)"),
                ("Preheat the oven to 350 F.", "preheat(350)"),
                ("Bake for 30 minutes.", "bake(30)")]
    ar = annotatedRecipe.AnnotatedRecipe("Temp Name", "Temp Source", ingList,
                                         instList)
    #result = rm.find_beam_plan(annotatedRecipeObject.instruction_text, annotatedRecipeObject.start_state)
    result = rm.find_dijkstra_plan(annotatedRecipeObject.instruction_text,
                                   annotatedRecipeObject.start_state)
    print result.cost
#Combine flour, cocoa, baking powder and salt in medium bowl; stir into sugar
#mixture. Stir in nuts. Spread into prepared baking pan.
#3. BAKE for 18 to 25 minutes or until wooden pick inserted in center comes out
#slightly sticky. Cool completely in pan on wire rack. Sprinkle with powdered sugar. Cut into bars.

recipeName = "Chewy Cocoa Brownies"
recipeSource = "http://allrecipes.com/recipe/chewy-cocoa-brownies/"

#TODO need to fix the prisms
ingredientsList = [
    ("1 2/3 granulated sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 2/3 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 3, 1, 2),
                                 lcmId=1,
                                 tags=['sugar']))),
    ("3/4 cup butter or margarine, melted",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="3/4 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['butter']))),
    ("2 tablespoons water",
     kitchenState.Ingredient(contains=["water"],
                             homogenous=True,
                             amount="2",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 3, 1, 2),
Esempio n. 8
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject


recipeName = "Quick and Easy Meatloaf"
recipeSource = "http://www.cooks.com/rec/view/0,1941,152172-241204,00.html"


ingredientsList = [("1 lb. ground beef", kitchenState.Ingredient(contains=["beef"], homogenous=True, amount="1 pound",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['beef']))),
                   ("1/4 c. chopped onions", kitchenState.Ingredient(contains=["onions"], homogenous=True, amount="1/4 cup",
                                                           physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 1, 1, 2), lcmId=2, tags=['onions']))),
                   ("1 slice white bread", kitchenState.Ingredient(contains=["bread"], homogenous=True, amount="1 slice",
                                                                  physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 1, 1, 2), lcmId=3, tags=['bread']))),
                   ("1 egg, beaten", kitchenState.Ingredient(contains=["eggs"], homogenous=True, amount="1",
                                                      physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 3, 1, 2), lcmId=4, tags=['egg']))),
                   ("Ketchup", kitchenState.Ingredient(contains=["ketchup"], homogenous=True, amount="",
                                                                   physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 3, 1, 2), lcmId=5, tags=['ketchup']))),
                   ("Salt and pepper", kitchenState.Ingredient(contains=["salt", "pepper"], homogenous=True, amount="",
                                                                   physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 3, 1, 2), lcmId=5, tags=['salt_and_pepper']))),
                   ]

instructionsList = [("Preheat oven to 325 degrees.", "preheat(325)"),
                    ("Combine ground beef and chopped onions.", 
                     "pour(beef), pour(onions), mix()"),
                    ("Soak bread in beaten egg.", "pour(bread), pour(eggs), mix()"),
                    ("Combine with beef and onion.", "mix()"),
                    ("Shape into loaf.", "scrape()"),
                    ("Top with ketchup, salt, and pepper.", 
                     "pour(ketchup), (pour(salt) or pour(pepper))"),
                    ("Bake at 350 degrees for 1 hour.", "bake(60)")]
Esempio n. 9
0
#2. Cream together the butter, white sugar, and brown sugar until smooth. Beat in the
#eggs one at a time, then stir in the vanilla. Dissolve baking soda in hot water. Add to batter along with salt. Stir in flour, chocolate chips, and nuts. Drop by large spoonfuls onto ungreased pans.
#3. Bake for about 10 minutes in the preheated oven, or until edges are nicely browned.

recipeName = "Best Chocolate Chip Cookies"
recipeSource = "http://allrecipes.com/recipe/best-chocolate-chip-cookies/"

#replace None with Physical Objects
#TODO: fix the prism positions
ingredientsList = [
    ("1 cup butter, softened",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['butter']))),
    ("1 cup white sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['sugar']))),
    ("1 cup packed brown sugar",
     kitchenState.Ingredient(contains=["brown_sugar"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
Esempio n. 10
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Strassburgare"

recipeSource = "http://allrecipes.com/recipe/strassburgare/detail.aspx"

#replace None with Physical Objects
ingredientsList = [("1 cup butter, softened", kitchenState.Ingredient(contains=["butter"], homogenous=True, amount="1 cup",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['butter']))),
                   ("1/2 cup confectioners' sugar", kitchenState.Ingredient(contains=["confection_sugar"], homogenous=True, amount="1/2 cup",
                                                           physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 1, 1, 2), lcmId=2, tags=['confectionsugar']))),
                   ("1 1/2 tablespoons vanilla sugar", kitchenState.Ingredient(contains=["vanilla_sugar"], homogenous=True, amount="1 1/2 tablespoon",
                                                                  physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 1, 1, 2), lcmId=3, tags=['vanillasugar']))),
                   ("1 cup all-purpose flour", kitchenState.Ingredient(contains=["flour"], homogenous=True, amount="1 cup",
                                                      physicalObject=PhysicalObject(kitchenState.prism_from_point(9, 1, 1, 2), lcmId=4, tags=['flour']))),
                   ("1/2 cup potato flour", kitchenState.Ingredient(contains=["potato_flour"], homogenous=True, amount="1/2 cup",
                                                                   physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 3, 1, 2), lcmId=5, tags=['potatoflour']))),
                   ("1 drop red food coloring", kitchenState.Ingredient(contains=["food_coloring"], homogenous=True, amount="1 drop",
                                                                         physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 3, 1, 2), lcmId=6, tags=['foodcoloring'])))
                   ]



#What should we do about the last 2 instructions? They are both unsupported/invalid.
#Will eventually move from strings to actual actions - NOT. We will pass the string to the compileAnnotation method in PlanningLanguage
instructionsList = [("Preheat oven to 325 degrees F (165 degrees C).", "preheat(325)"),
                    ("With an electric mixer, beat the butter and confectioners' sugar together in a bowl until smooth and creamy.", "pour(butter), pour(confection_sugar), mix()"),
                    ("beat in the vanilla sugar.", "pour(vanilla_sugar), mix()"),
                    ("In a separate bowl, whisk the flour with potato flour.", "pour(flour), pour(potato_flour), mix()"),
                    ("Stir the flour mixture into the butter mixture, about 1/4 cup at a time, until all the flour is mixed in.", "mix()"),
Esempio n. 11
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "CAKE MIX COOKIES"
recipeSource = "http://www.cooks.com/rec/view/0,1610,130188-253193,00.html"
ingredientsList = [
    ("1 package of cake mix (any flavor)",
     kitchenState.Ingredient(contains=["cake_mix"],
                             homogenous=True,
                             amount="1 package",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['cake', 'mix']))),
    ("1 large egg",
     kitchenState.Ingredient(contains=["eggs"],
                             homogenous=True,
                             amount="1",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['eggs']))),
    ("1/4 cup of oil",
     kitchenState.Ingredient(contains=["oil"],
                             homogenous=True,
                             amount="1/4 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['oil']))),
    ("1/4 cup of water",
Esempio n. 12
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Easy Bread Pudding"
recipeSource = "http://www.cooks.com/rec/view/0,1740,149185-250203,00.html"


ingredientsList = [("4 slices buttered toast", kitchenState.Ingredient(contains=["bread"], homogenous=True, amount="3",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['bread']))),
                   ("1 (20 oz.) can peaches", kitchenState.Ingredient(contains=["peaches"], homogenous=True, amount="1 can",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['peaches']))),

                   ("3 eggs, beaten", kitchenState.Ingredient(contains=["eggs"], homogenous=True, amount="3",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['eggs']))),
                   ("1/3 c. sugar",  kitchenState.Ingredient(contains=["sugar"], homogenous=True, amount="1/3 cup",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['sugar']))),
                   ("Dash of salt", kitchenState.Ingredient(contains=["salt"], homogenous=True, amount="dash",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['salt']))),
                   ("1/2 tsp. nutmeg", kitchenState.Ingredient(contains=["nutmeg"], homogenous=True, amount="1/2 tsp",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['nutmeg']))),

                   ("1 tsp. vanilla", kitchenState.Ingredient(contains=["vanilla_extract"], homogenous=True, amount="1 tsp",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['vanilla']))),
                   ("3 c. milk", kitchenState.Ingredient(contains=["milk"], homogenous=True, amount="3 cups",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['milk']))),
]

instructionsList = [("Place toast in bottom of deep baking dish.", 
                     "pour(bread)"),
                    ("Drain peaches and save juice.", "noop()"),
                    ("Put peaches over top of toast.", "pour(peaches)"),
#
#1 cup peanut butter (your choice, smooth or chunky)
#1 cup granulated sugar
#1 large egg
#
#1 Mix peanut butter, sugar, and egg together until smooth.
#2 Drop by teaspoon onto cookie sheet two inches apart.  
#3 Press with fork; press again in opposite direction
#4 Bake 10 to 12 minutes at 350 degrees Fahrenheit.
#5 Do not brown; do not over bake.

recipeName = "Impossible Peanut Butter Cookies"
recipeSource = "http://www.food.com/recipe/impossible-peanut-butter-cookies-15411"

#replace None with Physical Objects
ingredientsList = [("1 cup peanut butter (your choice, smooth or chunky)", kitchenState.Ingredient(contains=["peanut_butter"], homogenous=True, amount="1 cup peanut butter",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['peanutbutter']))),
                   ("1 cup granulated sugar", kitchenState.Ingredient(contains=["sugar"], homogenous=True, amount="1 cup",
                                                           physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 1, 1, 2), lcmId=2, tags=['sugar']))),
                   ("1 large egg", kitchenState.Ingredient(contains=["eggs"], homogenous=True, amount="1",
                                                      physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 3, 1, 2), lcmId=3, tags=['eggs'])))]

instructionsList = [("1 Mix peanut butter, sugar, and eggs together until smooth.", "pour(peanut_butter), pour(sugar), pour(eggs), mix()"),
                    ("2 Drop by teaspoon onto cookie sheet two inches apart.", "scrape()"),
                    ("3 Press with form; press gain in opposite direction.", "noop()"),
                    ("4 Bake 10 to 12 minutes at 350 degrees Fahrenheit", "preheat(350), bake(10)"),
                    ("5 Do not brown; do not over bake.", "noop()")]

annotatedRecipeObject = annotatedRecipe.AnnotatedRecipe(recipeName, recipeSource, ingredientsList, instructionsList)

Esempio n. 14
0
#ingredients.
#3 Add the liquids and stir just until blended.
#4 Bake for 25 minutes.
#5 Frost with your favorite frosting, cake is extremely moist so care must be taken that you don't tear up the top of the cake.

recipeName = "Pan Fudge Cake"
recipeSource = "http://low-cholesterol.food.com/recipe/1-pan-fudge-cake-2(35"

#TODO check the prism locations
ingredientsList = [
    ("1 1/2 cups sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 1/2 cups",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=1,
                                 tags=['sugar']))),
    ("1/2 cup cocoa",
     kitchenState.Ingredient(contains=["cocoa_powder"],
                             homogenous=True,
                             amount="1/2 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['cocoa']))),
    ("1 1/2 teaspoon baking soda",
     kitchenState.Ingredient(contains=["baking_soda"],
                             homogenous=True,
                             amount="1 1/2 teaspoon",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 3, 1, 2),
Esempio n. 15
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Almond Crescent Cookies"

recipeSource = "http://simplyrecipes.com/recipes/almond_crescent_cookies/"

#replace None with Physical Objects
ingredientsList = [("1 cup butter", kitchenState.Ingredient(contains=["butter"], homogenous=True, amount="1 cup",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['butter']))),
                   ("2/3 cup sugar", kitchenState.Ingredient(contains=["sugar"], homogenous=True, amount="2/3 cup",
                                                           physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 1, 1, 2), lcmId=2, tags=['sugar']))),
                   ("1 teaspoon vanilla extract", kitchenState.Ingredient(contains=["vanilla_extract"], homogenous=True, amount="1 teaspoon",
                                                                  physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 1, 1, 2), lcmId=3, tags=['vanilla_extract']))),
					("1 teaspoon almond extract", kitchenState.Ingredient(contains=["almond_extract"], homogenous=True, amount="1 teaspoon",
                                                                  physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 1, 1, 2), lcmId=3, tags=['almond_extract']))),
                   ("1 cup almond flour", kitchenState.Ingredient(contains=["almond_flour"], homogenous=True, amount="1 cup",
                                                      physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 3, 1, 2), lcmId=4, tags=['almond flour']))),
                   ("1/4 cup powdered sugar", kitchenState.Ingredient(contains=["powdered_sugar"], homogenous=True, amount="1/4 cup",
                                                                   physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 3, 1, 2), lcmId=5, tags=['powdered sugar']))),
                   ("2 1/2 cup flour", kitchenState.Ingredient(contains=["flour"], homogenous=True, amount="2 1/2 cup",
                                                                         physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 3, 1, 2), lcmId=6, tags=['flour'])))]
#"all-purpose flour" vs "flour"



#What should we do about the last 2 instructions? They are both unsupported/invalid.
#Will eventually move from strings to actual actions - NOT. We will pass the string to the compileAnnotation method in PlanningLanguage
instructionsList = [("Cream the butter and the sugar together until light and fluffy.", "pour(butter), pour(sugar), mix()"),
                    ("Add the extracts and mix.", "pour(vanilla_extract), pour(almond_extract), mix()"),
                    ("Add the flour and almond flour.", "pour(almond_flour), pour(flour)"),
Esempio n. 16
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Easy Banana Bread"
recipeSource = "http://www.cooks.com/rec/view/0,174,144187-255202,00.html"

ingredientsList = [
    ("1 1/2 c. self-rising flour",
     kitchenState.Ingredient(contains=["flour"],
                             homogenous=True,
                             amount="1 1/2 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['flour']))),
    ("3 bananas, mashed",
     kitchenState.Ingredient(contains=["bananas"],
                             homogenous=True,
                             amount="3",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['bananas']))),
    ("2 eggs",
     kitchenState.Ingredient(contains=["eggs"],
                             homogenous=True,
                             amount="2",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['eggs']))),
Esempio n. 17
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Quick'N Easy Sugar Cookies"
recipeSource = "http://www.cooks.com/rec/view/0,1841,151163-255203,00.html"

#TODO check the prism locations
ingredientsList = [
    ("2 eggs",
     kitchenState.Ingredient(contains=["eggs"],
                             homogenous=True,
                             amount="2",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=1,
                                 tags=['eggs']))),
    ("2/3 c. vegetable oil",
     kitchenState.Ingredient(contains=["oil"],
                             homogenous=True,
                             amount="2/3 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['oil']))),
    ("2 tsp. vanilla",
     kitchenState.Ingredient(contains=["vanilla_extract"],
                             homogenous=True,
                             amount="2 tsp",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=3,
Esempio n. 18
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Quick and Easy Bread Pudding"
recipeSource = "http://www.cooks.com/rec/view/0,1940,155168-242204,00.html"


ingredientsList = [("3 eggs", kitchenState.Ingredient(contains=["eggs"], homogenous=True, amount="3",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['eggs']))),
                   ("2 cups milk or skim milk", kitchenState.Ingredient(contains=["milk"], homogenous=True, amount="2 cups",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['milk']))),

                   ("1/2 pound light brown sugar", kitchenState.Ingredient(contains=["sugar"], homogenous=True, amount="1/2 pound",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['sugar']))),
                   ("4 slices wheat or white bread",  kitchenState.Ingredient(contains=["bread"], homogenous=True, amount="4 slices",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['bread']))),
                   ("2 Tbsps. butter", kitchenState.Ingredient(contains=["butter"], homogenous=True, amount="2 tbsps",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=1, tags=['butter']))),]

instructionsList = [("Beat eggs lightly.", "pour(eggs), mix()"),
                    ("Add milk, sugar, crumbled bread and pour into a 1 quart baking dish.", "pour(milk), pour(sugar), pour(bread), scrape()") ,
                    ("Dot with butter and bake 40-45 minutes until firm and brown at 350 degrees.", "preheat(350), bake(40)"),
                    ("Serves 6.", "noop()")]

annotatedRecipeObject = annotatedRecipe.AnnotatedRecipe(recipeName, recipeSource, ingredientsList, instructionsList)
Esempio n. 19
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Simple Brownie Recipe"

recipeSource = "http://www.squidoo.com/simple-brownie-recipe"

#replace None with Physical Objects
ingredientsList = [
    ("1 cup vegetable oil",
     kitchenState.Ingredient(contains=["oil"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['vegetable_oil']))),
    ("2 cups sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="2 cups",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['sugar']))),
    ("2 teaspoons vanilla extract",
     kitchenState.Ingredient(contains=["vanilla_extract"],
                             homogenous=True,
                             amount="2 teaspoons",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 20
0
#
#1. Preheat oven to 350 degrees F (175 degrees C). Grease and flour a 9x5 inch loaf pan.
#2. In a large bowl, stir together cake mix and gelatin mix. Make a well in the center and pour in eggs, oil and water. Mix well and pour into a 9x5 inch loaf pan.
#3. Bake in the preheated oven for 60 minutes, or until a toothpick inserted into the center of the cake comes out clean. Allow to cool.

recipeName = "Easy Party Cake"
recipeSource = "http://allrecipes.com/recipe/easy-party-cake/detail.aspx"

#TODO chekc the prism locations
ingredientsList = [
    ("1 (18.25 ounce) package yellow cake mix",
     kitchenState.Ingredient(contains=["cake_mix"],
                             homogenous=True,
                             amount="1 (18.25 ounce) package",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['cake']))),
    ("1 (3 ounce) package orange flavored gelatin mix",
     kitchenState.Ingredient(contains=["gelatin"],
                             homogenous=True,
                             amount="1 (3 ounce) package",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['gelatin']))),
    ("4 eggs, beaten",
     kitchenState.Ingredient(contains=["eggs"],
                             homogenous=True,
                             amount="4",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 21
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Super Easy Salad"

recipeSource = "http://allrecipes.com/recipe/super-easy-salad/"

#replace None with Physical Objects
ingredientsList = [
    ("2 medium cucumbers, quartered and thinly sliced",
     kitchenState.Ingredient(contains=["cucumbers"],
                             homogenous=True,
                             amount="2",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['cucumbers']))),
    ("1 medium onion, chopped",
     kitchenState.Ingredient(contains=["onions"],
                             homogenous=True,
                             amount="1",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['onion']))),
    ("1 bunch radishes, thinly sliced",
     kitchenState.Ingredient(contains=["radishes"],
                             homogenous=True,
                             amount="1 bunch",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 22
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Cucumber Slices with Dill"

recipeSource = "http://allrecipes.com/Recipe/Cucumber-Slices-With-Dill/Detail.aspx"

#replace None with Physical Objects
ingredientsList = [
    ("4 large cucumbers, sliced",
     kitchenState.Ingredient(contains=["cucumbers"],
                             homogenous=True,
                             amount="4",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['cucumbers']))),
    ("1 onion, thinly sliced",
     kitchenState.Ingredient(contains=["onions"],
                             homogenous=True,
                             amount="1",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['onions']))),
    ("1 tablespoon dried dill weed",
     kitchenState.Ingredient(contains=["dill_weed"],
                             homogenous=True,
                             amount="1 tablespoon",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 23
0
#Cream first 3 ingredients with a mixer.
#Blend in cocoa, flour and eggs.
#Bake at 350F for 25 to 30 minutes.
#Frost with your favorite icing or mix icing sugar, butter and cocoa.
#Cut into 15-20 small squares (it's pretty rich!).

recipeName = "Simple Fudge Brownies"
recipeSource = "http://www.food.com/recipe/simple-fudge-brownies-141647"

ingredientsList = [
    ("2 cup butter",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="2 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['butter']))),
    ("1 cup sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['sugar']))),
    ("1 teaspoon vanilla",
     kitchenState.Ingredient(contains=["vanilla_extract"],
                             homogenous=True,
                             amount="1 teaspoon",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 24
0
from esdcs.groundings import PhysicalObject

#Raisin Cookies #1
#http://www.cooks.com/rec/doc/0,1610,151175-255201,00.html

recipeName = "Raisin Cookies #1"

recipeSource = "http://www.cooks.com/rec/doc/0,1610,151175-255201,00.html"

ingredientsList = [
    ("1 c. raisins",
     kitchenState.Ingredient(contains=["raisins"],
                             homogenous=True,
                             amount="1 c.",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['raisins']))),
    ("1 c. sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 c.",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['sugar']))),
    ("1 c. shortening",
     kitchenState.Ingredient(contains=["shortening"],
                             homogenous=True,
                             amount="1 c.",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 25
0
from kitchen import kitchenState, annotatedRecipe
from esdcs.groundings import PhysicalObject

recipeName = "Easiest Brownies Ever"

recipeSource = "http://allrecipes.com/Recipe/Easiest-Brownies-Ever/Detail.aspx"

#replace None with Physical Objects
ingredientsList = [
    ("1 cup butter",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="1 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['butter']))),
    ("2 cups brown sugar",
     kitchenState.Ingredient(contains=["brown_sugar"],
                             homogenous=True,
                             amount="2 cups",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['brown_sugar']))),
    ("2 teaspoons vanilla extract",
     kitchenState.Ingredient(contains=["vanilla_extract"],
                             homogenous=True,
                             amount="2 teaspoons",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 26
0
# Dump Cake #1
# where did you get this from?

recipeName = "Dump Cake #1"
recipeSource = "http://www.internet.com/recipe.html"

# what is prism from point?
# how do I deal with the (pecans OR almonds)
ingredientsList = [
    ("1 20 ounce can crushed pineapple",
     kitchenState.Ingredient(contains=["pineapple"],
                             homogenous=True,
                             amount="1 20 ounce can",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['pineapple']))),
    ("1 21 ounce can cherry pie filling",
     kitchenState.Ingredient(contains=["filling"],
                             homogenous=True,
                             amount="1 21 ounce can",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['filling']))),
    ("1 box dry yellow cake mix",
     kitchenState.Ingredient(contains=["cake_mix"],
                             homogenous=True,
                             amount="1 box",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 27
0
#Sift flour into a large bowl, add cornflakes, coconut and cocoa powder and stir to combine. Stir flour mixture into butter mixture until well combined.
#For each biscuit, place one tablespoon of mixture onto prepared baking trays about 3cm apart. Bake for 10-12 minutes until starting to brown. Cool on baking trays for 5 minutes then transfer to wire rack.
#
#(I truncated the recipe a bit)

recipeName = "Chocolate Afghans"
recipeSource = "http://www.kidspot.co.nz/recipes-for+1644+20+Cakes-&-Baking+Chocolate-afghans.htm"

#replace None with Physical Objects
ingredientsList = [
    ("180g butter, melted",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="180g",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['butter']))),
    ("1/3 cup castor sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1/3 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['sugar']))),
    ("1 1/2 cups plain flour",
     kitchenState.Ingredient(contains=["flour"],
                             homogenous=True,
                             amount="1 1/2 cups",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 1, 1, 2),
Esempio n. 28
0
#1 teaspoon baking powder
#1 (3.9 ounce) package instant chocolate pudding mix 
#1 3/4 cups peanut butter chips
#
#1. Preheat oven to 350 degrees F (175 degrees C).
#2. In a large bowl, cream together the butter, white sugar and brown sugar until
#smooth. Beat in the eggs one at a time, then stir in the vanilla. Combine the flour, baking powder and instant pudding mix; stir into the creamed mixture. Fold in the peanut butter chips. Drop by rounded spoonfuls onto ungreased cookie sheets.
#3. Bake for 8 to 10 minutes in the preheated oven. Allow cookies to cool on baking sheet for 5 minutes before removing to a wire rack to cool completely.


recipeName = "Chocolate Peanut Butter Pudding Cookies"
recipeSource = "http://allrecipes.com/recipe/chocolate-peanut-butter-pudding-cookies/detail.aspx"

#replace None with Physical Objects
ingredientsList = [("1 cup butter, softened", kitchenState.Ingredient(contains=["butter"], homogenous=True, amount="1 cup",
                                                                   physicalObject=PhysicalObject(kitchenState.prism_from_point(5, 3, 1, 2), lcmId=1, tags=['butter']))),
                   ("1/4 cup white sugar", kitchenState.Ingredient(contains=["sugar"], homogenous=True, amount="1/4 cup",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=2, tags=['sugar']))),
                   ("3/4 cup packed brown sugar", kitchenState.Ingredient(contains=["brown_sugar"], homogenous=True, amount="3/4 cup",
                                                              physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 1, 1, 2), lcmId=3, tags=['brownsugar']))),
                   ("1 teaspoon vanilla extract", kitchenState.Ingredient(contains=["vanilla_extract"], homogenous=True, amount="1 teaspoon",
                                                                  physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 1, 1, 2), lcmId=4, tags=['vanilla']))),
                   ("2 eggs", kitchenState.Ingredient(contains=["eggs"], homogenous=True, amount="2",
                                                      physicalObject=PhysicalObject(kitchenState.prism_from_point(3, 3, 1, 2), lcmId=5, tags=['eggs']))),
                   ("2 1/4 cups all-purpose flour", kitchenState.Ingredient(contains=["flour"], homogenous=True, amount="2 1/4 cups",
                                                                         physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 3, 1, 2), lcmId=6, tags=['flour']))),
                   ("1 teaspoon baking powder", kitchenState.Ingredient(contains=["baking_powder"], homogenous=True, amount="1 teaspoon",
                                                                         physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 3, 1, 2), lcmId=8, tags=['bakingpowder']))),
                   ("1 (3.9 ounce) package instant chocolate pudding mix", kitchenState.Ingredient(contains=["pudding"], homogenous=True, amount="1 (3.9 ounce) package",
                                                                         physicalObject=PhysicalObject(kitchenState.prism_from_point(7, 3, 1, 2), lcmId=9, tags=['pudding']))),
                   ("3/4 cups peanut butter chips", kitchenState.Ingredient(contains=["pb_chips"], homogenous=True, amount="3/4 cups",
Esempio n. 29
0
#2. In a medium bowl, stir together the cake mix and baking powder. Add eggs and oil,
#then mix until well blended. Stir in chocolate chips, or your choice of additions.
#Drop by rounded spoonfuls onto cookie sheets.
#3. Bake for 8 to 10 minutes in the preheated oven.

recipeName = "Cake Mix Cookies VII"
recipeSource = "http://allrecipes.com/recipe/cake-mix-cookies-vii/detail.aspx"

#TODO need to fix the prisms
ingredientsList = [
    ("1 (18.25 ounce) package yellow cake mix",
     kitchenState.Ingredient(contains=["cake_mix"],
                             homogenous=True,
                             amount="1 (18.25 ounce) package",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=1,
                                 tags=['cake']))),
    ("1 teaspoon baking powder",
     kitchenState.Ingredient(contains=["baking_powder"],
                             homogenous=True,
                             amount="1 teaspoon",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=2,
                                 tags=['bakingpowder']))),
    ("2 eggs",
     kitchenState.Ingredient(contains=["eggs"],
                             homogenous=True,
                             amount="2",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 3, 1, 2),
Esempio n. 30
0
#1 tsp. baking soda (sifted with flour)
#
#Preheat oven to 350F.
#Mix with hands -- form small balls and flatten on ungreased pan. Bake for 8-12 minutes (depends on size of cookies made).

recipeName = "Easy Oatmeal Cookies"
recipeSource = "http://www.cooks.com/rec/view/0,1710,146184-243203,).html"

#replace None with Physical Objects
ingredientsList = [
    ("1 c. sugar",
     kitchenState.Ingredient(contains=["sugar"],
                             homogenous=True,
                             amount="1 c.",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(5, 1, 1, 2),
                                 lcmId=1,
                                 tags=['sugar']))),
    ("1 c. butter",
     kitchenState.Ingredient(contains=["butter"],
                             homogenous=True,
                             amount="1 c.",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(3, 1, 1, 2),
                                 lcmId=2,
                                 tags=['butter']))),
    ("1 c. flour",
     kitchenState.Ingredient(contains=["flour"],
                             homogenous=True,
                             amount="1/2 cup",
                             physicalObject=PhysicalObject(
                                 kitchenState.prism_from_point(7, 3, 1, 2),