1 / 14

Reaction System

Reaction System. To ‘bag’ groceries. It does the following: Checks to see if a ‘cross-sale’ can be made. Bags the large items, ensuring bottles are the first items to be bagged. Then bags the medium items, putting frozen items in an insulated bag as necessary.

Download Presentation

Reaction System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reaction System To ‘bag’ groceries. It does the following: Checks to see if a ‘cross-sale’ can be made. Bags the large items, ensuring bottles are the first items to be bagged. Then bags the medium items, putting frozen items in an insulated bag as necessary. NOTE: The system uses a Rule Ordering conflict resolution strategy!

  2. Items to be Bagged: These items are placed in the working memory (WM)

  3. Working Memory • Step is check order • Bag is Bag 1 • Beef to be bagged • Cornflakes to be bagged • Ice Cream to be bagged • Crisps to be bagged • Pepsi to be bagged

  4. Rule 1 • Crisps are to be bagged • Pepsi is to be bagged • RULE DOES NOT FIRE!

  5. Rule 2 • Step is Check Order • RULE FIRES! • WM: • Step is bag large items • Bag is Bag 1 • Beef to be bagged • Cornflakes to be bagged • Ice Cream to be bagged • Crisps to be bagged • Pepsi to be bagged

  6. Rule 3 • Step is bag large items • There is a large item to bag • There is a bottle to bag • The bag has less than 6 large items • RULE 3 FIRES! • WM: • Step is bag large items • Bag is Bag 1 • Beef to be bagged • Cornflakes to be bagged • Ice Cream to be bagged • Crisps to be bagged

  7. Rule 4 (1) • Step is bag large items • There is a large item to bag • The bag has less than 6 large items • WM: • Step is bag large items • Bag is Bag 1 • Beef to be bagged • Ice Cream to be bagged • Crisps to be bagged NOTE: This rule may fire several times if there are several large items!

  8. Rule 4 (2) • Step is bag large items • There is a large item to bag • The bag has less than 6 large items • WM: • Step is bag large items • Bag is Bag 1 • Ice Cream to be bagged • Crisps to be bagged

  9. Rule 5 • Step is bag large items • There is a large item to bag • The current bag is full • An empty bag is available • WM: • Step is bag large items • Bag is Bag 2 • Ice Cream to be bagged • Crisps to be bagged

  10. Rule 6 • Step is bag large items • WM: • Step is bag medium items • Bag is Bag 2 • Ice Cream to be bagged • Crisps to be bagged

  11. Rule 7 • Step is bag medium items • The medium item is frozen & not in insulated bag • WM: • Step is bag medium items • Bag is insulated bag • Crisps to be bagged

  12. Rule 8 • Step is bag medium items • The current bag is insulated • There is a bag available • WM: • Step is bag medium items • Bag is Bag 3 • Crisps to be bagged

  13. Rule 9 • Step is bag medium items • The current bag empty • A medium item is to be bagged • WM: • Step is bag medium items • Bag is Bag 3 NOTE: The antecedent is disjunctive, so we don’t need to check the other antecedents as the first antecedent is satisfied!

  14. Rule 10 • Step is bag medium items • WM: • Step is done • END!

More Related