2082 12

BIT252 ยท 2082 ยท 5 marks

How knowledge is represented using scripts? Support your answer with example. [3+2]

How knowledge is represented using scripts? Support your answer with example. [3+2]

Artificial IntelligenceChapter 4: Knowledge RepresentationScripts and conceptual dependency

Quick answer

A script is a structured representation of knowledge about a stereotyped sequence of events in a particular context. Scripts were introduced by Roger Schank and Robert Abelson (1977) to represent common, everyday situations that follow a predictable pattern.

Knowledge Representation Using Scripts

What is a Script?

A script describes a causally ordered sequence of events that are expected to occur in a specific situation. It allows an AI system to make inferences about what happened even when information is incomplete.


Components of a Script

A script consists of the following components:

ComponentDescription
Entry ConditionsConditions that must be true before the script can begin
RolesPeople/agents involved in the situation
PropsObjects used during the events
TrackSpecific variation of the general script
ScenesSequence of events that occur
ResultsConditions that are true after the script ends

Example: Restaurant Script

Script:    RESTAURANT
Track:     Coffee Shop
Entry Conditions:
           - Customer is hungry
           - Customer has money
Roles:
           - Customer (C)
           - Waiter (W)
           - Cook (K)
           - Cashier (Ca)
Props:
           - Tables, Menu, Food, Bill, Money

Scene 1: ENTERING
    - Customer enters restaurant
    - Customer looks for a table
    - Customer sits down

Scene 2: ORDERING
    - Waiter brings menu
    - Customer reads menu
    - Customer orders food
    - Waiter takes order to cook

Scene 3: EATING
    - Cook prepares food
    - Waiter brings food to customer
    - Customer eats food

Scene 4: LEAVING
    - Waiter brings bill
    - Customer pays bill
    - Customer leaves restaurant

Results:
    - Customer is no longer hungry
    - Customer has less money
    - Restaurant has more money

How Scripts Help in Inference

Consider the following story:

"John went to a restaurant. He ordered a burger. He left a tip."

Using the restaurant script, the AI system can infer the following facts that were never explicitly stated:

  • John sat at a table
  • A waiter brought him a menu
  • John paid the bill before leaving
  • John was hungry when he entered

This ability to fill in missing information is called script-based inference.


Advantages of Scripts

  1. Allows inference about unstated events
  2. Handles incomplete information effectively
  3. Represents real-world common sense knowledge
  4. Useful in natural language understanding systems

Limitations

  1. Scripts are rigid and do not handle unexpected events well
  2. Requires a large number of scripts to cover real-world situations
  3. Difficult to handle novel situations not covered by existing scripts

Note: Scripts are a form of frame-based knowledge representation where knowledge is organized around a central concept or situation, making them suitable for AI systems dealing with natural language processing and story understanding.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.