Knowledgebased systems Tutorial - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Knowledgebased systems Tutorial

Description:

... knowledge ... Main components of G2 knowledge base. 7. Objects. representation of some ... saved as part of a knowledge base. 12. Rule types 1. If rules ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 30
Provided by: fmtV
Category:

less

Transcript and Presenter's Notes

Title: Knowledgebased systems Tutorial


1
Knowledge-based systemsTutorial
  • Introduction to G2
  • Rozália Lakner
  • University of Veszprém
  • Department of Computer Science

2
Contents
  • Main characteristics of G2
  • Main components of G2 knowledge base
  • Reasoning in G2
  • Development of knowledge base

3
Main characteristics of G2
4
G2 a real-time expert system
  • used for rapid prototyping and implementing
    expert systems
  • G2 possess features and properties of an expert
    system shell
  • user-friendly interfaces
  • well-structured natural language in a high-level
  • graphic-oriented environment
  • inference engine (and simulator)
  • forward and backward reasoning
  • elements of knowledge base (items)
  • objects, workspaces, connections, relations,
    variables, parameters, rules, procedures,
    functions
  • tools for developing knowledge base

5
(No Transcript)
6
Main components of G2 knowledge base
7
Objects
  • representation of some part of the application
  • water-tank, valve, coffee-machine
  • picture of each object icon
  • generated manually (permanent objects)
  • has a table of attributes (contains the knowledge
    about the object)
  • object classes
  • attributes, icon are inherited
  • own specific attributes
  • object hierarchy
  • actual application objects instances

8
(No Transcript)
9
Variables, parameters
  • built-in object classes
  • represent things that have changing values
  • temperature, level,
  • similarities
  • attributes, classes, icon, history keeping
  • differences
  • a value of a variable may expire
  • a parameter always has current value (initial
    value)
  • a variable has validity interval
  • data-seeking sources for variable value
  • internal data server
  • inference engine (backward changing)
  • G2 simulator

10
Workspaces
  • rectangular areas
  • can contain items (objects, connections, rules,
    )
  • workspace-hierarchy
  • enabling/disabling workspaces
  • permanent/temporary workspaces

11
Connections, relations
  • connection
  • relationship between objects (created manually)
  • graphically links two objects together
    (flow-pipe, electrical wire)
  • represents abstract relationship (partnership,
    ownership)
  • classes of connections
  • objects can be referred based on connection
  • possible to write generic rules (any tank
    connected to any valve)
  • relation
  • relationship between objects (created
    dynamically, conclude action)
  • classes of relations
  • has not graphical representation
  • doesnt saved as part of a knowledge base

12
Rule types 1
  • If rules (common rules)
  • for any valve V
  • if the state of V 1
  • then change the center stripe-color of every
    flow-pipe
  • connected to V to sky-blue
  • When rules (cannot be used in reasoning)
  • for any container-or-vessel CV
  • when the value of the inventory of CV 0
  • then conclude that the temperature of CV has no
    value
  • Initial rules (invoked when KB starts or
    restarts)
  • initially for any container-or-vessel CV
  • if the inventory of CV gt 0
  • then conclude that the temperature of CV 15

13
Rule types 2
  • Unconditional rules (rules without condition
    part)
  • initially for any valve V
  • unconditionally conclude that the state of V 0
  • Whenever rules (event-controlled rules)
  • whenever auto-manual-state receives a value and
  • when the value of auto-manual-state is auto
  • then start auto()

14
Main attributes of rules
  • options (how can use the rule)
  • scan interval (how often to invoke the rule)
  • rule priority (in case of overloading)
  • depth-first backward chaining precedence
    (conflict resolution)
  • timeout for rule completion (how long G2 may try
    to evaluate the condition part)

15
Procedures
  • sequence of operations executed by G2
  • like high-level procedural languages
  • main part of procedures
  • procedure header (name, typed argument list,
    return type)
  • local declarations
  • procedure body (begin, sequence of procedure
    statements, end)

16
Reasoning in G2
17
Real-time inference engine 1
  • functions of inference engine (IE)
  • reasons about the current state of the
    application
  • communicates with the end-user
  • iniciates other activity based upon what it has
    inferred
  • IE operates on the following sources of
    information
  • the knowledge contained in the knowledge base
  • simulated values
  • values received from sensors and other external
    sources

18
Real-time inference engine 2
  • abilities of IE
  • scan rules repeatedly invoke a rule at regular
    time interval (scan interval)
  • wakeup rules when a variable receives a value,
    the inference engine wakes up the rule that was
    waiting for the value of the variable
  • data seeking get value from the specified data
    server (when the value of the variable is
    expired)
  • chaining the rules (reasoning)
  • backward chaining IE infers the value of a
    variable with the help of rules (when the value
    of a variable is not given by a sensor or a
    formula)
  • forward chaining IE invoke a rule when its
    condition part is satisfied by another rule

19
G2 simulator
  • special data server in G2

20
Development of knowledge-base
21
Developer interface 1
  • graphic-oriented environment
  • creating the model of the application graphically
    (schematic)
  • objects are represented by icons
  • objects are placed in workspaces
  • objects are connected graphically
  • pop-up menus for objects (attribute table,
    delete, change size and colour, move, )

22
Developer interface 2
  • well-structured natural language in a high-level
  • referring to an item
  • by name coffee-machine
  • by class name the vessel
  • as an instance of a class is nearest to another
    item on schematic the level-icon nearest to
    coffee-machine
  • as an instance of a class that is connected to an
    object by an input or output connection the
    valve connected at the output of coffee-machine

23
Developer interface 3
  • interactive text editor
  • text-edit workspace
  • inserting text from other items or scrapbook
  • syntax-checking
  • marking incorrect text
  • warning message
  • suggestion for correction

24
Developer interface 4
  • interactive icon editor
  • graphic tool
  • design icons graphically
  • converting into G2 grammar
  • layers, regions
  • main parts of icon editor
  • icon view
  • buttons for creating graphic elements
  • icon size display
  • cursor location display
  • layer pad and layer display

25
Developer interface 5
  • tools for managing large KBs
  • clone objects and statements
  • operate on a group of objects
  • inspect utility (browse KB) finding items easy
  • describe facility (informations about item)
    data server, rules
  • organize knowledge hierarchically (workspaces,
    subworkspaces, activate/ deactivate)
  • merge KBs

26
Developer interface 6
  • documentation in KB free texts (only for
    documentation, is not part of KB)
  • tracing and debugging facilities
  • warning messages (errors, unusual conditions)
  • trace messages
  • current value of variable, expression (each time
    it receives one)
  • starting and finishing time of evaluating of
    variable, formula, rule, procedure, function
  • set breakpoints
  • highlight invoked rules
  • access control facilities
  • restrict the choices a user has on the menus
  • restrict moving items, making connections,
  • restrict accessing to the attribute table
  • restrict editing of attributes
  • mode of operation (specify restrictions)
    operator, administrator, developer,

27
User interface 1
  • displays
  • screen items showing the value of variable,
    parameter, expression
  • end-user controls
  • control an application by the user
  • messages, message board
  • items that display text
  • are used for communication

28
User interface 2
  • displays
  • readout table
  • variable, parameter and its value
  • chart
  • plots of one or more variables
  • history of values change over time
  • meter
  • value of variable in a vertical display
  • dial
  • value of variable in a round scale
  • freeform table
  • tabular form of variables values

29
User interface 3
  • end-user controls
  • action buttons
  • execute an action (start, conclude, show, )
  • radio buttons
  • assign a predefined value for variable or
    parameter
  • check box
  • assign on or off value for variable or
    parameter
  • slider
  • enter numeric value for variable or parameter by
    sliding a pointer
  • type-in box
  • enter a value for variable or parameter from
    keyboard
Write a Comment
User Comments (0)
About PowerShow.com