Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Make sure this page is shown at the right time.

  2. Retrieve the following information by putting the appropriate predicates in the places indicated in the rule by comments and by using the variable names indicated below.

    1. We need to retrieve the chosen recipe from memory. Find the necessary predicate and name that variable Recipe.

    2. The previous step retrieves the Recipe ID, but we also need the recipe name. Use a variable called Name for this.

    3. Retrieve the time needed to complete the recipe in a variable named Minutes.

    4. Retrieve the number of servings in a variable called Persons.

  3. To retrieve a list of the recipe steps and a list of ingredients, two additional predicates need to be implemented. The predicates that we need to implement can be found in the recipe_selection.pl file and are labeled with a comment. the comment %For Visual Support to-do

    1. Find a built-in Prolog predicate (part of the Prolog language) that you can use for computing a list without duplicates using returning a set of a specific goal. Use this predicate to specify the ingredient rule.

    2. For ingredients use the function from above and to simplify your goal you can use the caret(^) by defining your goal with the following syntax:

...

  1. Find another built-in Prolog predicate to retrieve a list of the recipe steps without changing their order. There is no repetition, so this predicate does not need to remove duplicates (as in the previous step).

  2. Your rule for retrieving the steps needs to use the accompanying rule getStepString in your goal of the built-in Prolog predicate, so your goal should look as follows: ​​RecipeID^getStepString(RecipeID, Step).

  3. Go back to html.pl and to a50recipeConfirm

    1. Save the recipe steps as Steps

    2. Save the list of ingredients as Ingredients

  4. Figure out a way to add the recipe picture to this page wherever you would like.  You will have to look around or at some bootstrap documentation to complete this step.

Warning

Note that unless the corresponding a50recipeConfirm pattern and responses are done in pattern.pl and reponses.pl

...

your code will not work. Check with your

...

team members to make sure they are done with

...

their part. 

...

Closing Page (visuals for the c40 pattern)

Close the session in a nice waynicely. 

To test, go to dialog_init on line 24, put c40 into the agenda, and run your botagent. The line should look like this:  insert(agenda([c40])). Note that unless the corresponding c40 pattern and response are done in pattern.pl and reponses.pl it your code will not yet work. Check with your teammates team members to make sure they are done with this their part. 

Visual Support Extensions

If you fill in all the blanks described in these instructions on this instruction page, the visuals will function, but they are not yet very supportive or nor very pretty. This will If you have done this right, however, it will already give you a pass for the project (assuming other parts work well too!). If you would like to achieve more than a pass on this section go for a higher grade, you will need to get more creative. Add anything to any page that you think will support the user and the user’s Consider how you can redesign and extend the pages that you created above. Think about what will support your users and what will improve user experience. Try and make it visually appealing (though of course, that is relatively subjective!). You can use the things material in the visual support guide or any other documentation that you can find. Remember though that the visuals should support the conversation, not the other way around! Good luck!