A Detailed Introduction to Aion DS - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

A Detailed Introduction to Aion DS

Description:

Sourcing- during inference, determines how Aion DS uses system and user sources ... A Detailed Introduction to Aion DS. When to use Instance Methods ... – PowerPoint PPT presentation

Number of Views:203
Avg rating:3.0/5.0
Slides: 40
Provided by: CIE87
Category:

less

Transcript and Presenter's Notes

Title: A Detailed Introduction to Aion DS


1
A Detailed Introduction to Aion DS
  • Aion DS
  • Supports Modularised Knowledge Bases
  • Supports Forward chaining, Backward chaining and
    Mixed chaining rules
  • Supports the development of hybrid systems
  • Allows interfacing with other programs

2
A Detailed Introduction to Aion DS
  • Main Components of Aion DS
  • Classes
  • Data definitions
  • Methods to act on the data
  • States
  • Cohesive group of rules
  • Allow the definition of agenda statements
  • Provides a high level of control over the
    inference process (I.e. forward, backward or
    mixed chaining)
  • Vocabularies
  • Global variables, constants, data definitions,
    noise words and re-usable code

3
A Detailed Introduction to Aion DS
  • Terminology and Symbols

Main State
Sub State
Rules
Instance
Slots
Class
Methods
Function
Global Parameter
Global
Results
4
A Detailed Introduction to Aion DS
  • Useful Keys

F1 Displays help for an active window
F3 Opens an object
F4 Opens a property dialogue
F7 Saves changes to the current object
F8 Saves and closes the current object
F9 Opens a choice dialogue
F10 Highlights the menu bar
5
A Detailed Introduction to Aion DS
  • Classes
  • Slots - data definitions
  • Methods - procedures or behaviour that the
    individual classes or instances know how to
    perform
  • Instances
  • Static
  • Dynamic

6
A Detailed Introduction to Aion DS
  • Slots
  • A slot defines an attribute (data item) of a
    class
  • Slots represent descriptive data about various
    aspects of the class
  • Each slot has a unique name and defines one
    significant feature of the class
  • Each slot defines what kind of data values an
    instance of the class can contain
  • Each slot has only one data type and can contain
    only a certain, precisely defined kind of data

7
A Detailed Introduction to Aion DS
Slot Data Types
  • Simple
  • integer 1205 33691 -7898
  • real 98.6 2567.876 -000.02
  • boolean TRUE FALSE UNKNOWN
  • string red John Doe 0191 5153207
  • time 043001 43001 430PM
  • date 21/June/89 06-21-89 June21, 1989
  • Compound -
  • integer_set set of integer values
  • real_set set of real values
  • string_set set of string values
  • integer_list list of integer values
  • real_list list of real values

8
A Detailed Introduction to Aion DS
Slot Data Types
  • Simple
  • integer 1205 33691 -7898
  • real 98.6 2567.876 -000.02
  • boolean TRUE FALSE UNKNOWN
  • string red John Doe 0191 5153207
  • time 043001 43001 430PM
  • date 21/June/89 06-21-89 June21, 1989
  • Compound -
  • integer_set set of integer values
  • real_set set of real values
  • string_set set of string values
  • integer_list list of integer values
  • real_list list of real values
  • string_list list of string values

9
A Detailed Introduction to Aion DS
  • List
  • An ordered sequence of values which all have the
    same data type
  • Multiple elements can have the same value because
    they occupy different positions in the list
  • Use list data type when the order of elements is
    important or you need to store duplicate entries

10
A Detailed Introduction to Aion DS
  • Set
  • A collection of values which all have the same
    data type
  • Individual values must be unique
  • Used when the order of data elements is not
    important

11
A Detailed Introduction to Aion DS
  • Basic Properties of Slots
  • Name
  • Base Type
  • Facts- Manipulate and control the value stored in
    the slot
  • Default- assigns a value to a slot when it has
    exhausted all other means of assigning a value
  • Prompt- text that is displayed to a user when the
    inference engine requires a value
  • Sourcing- during inference, determines how Aion
    DS uses system and user sources to determine a
    value for a slot
  • Value can change- determines whether you can
    modify the value of a slot after the value is
    initially assigned

12
Slot Sourcing
Instance.slot
Facts
User System
No Value
System User
System
User
Default
User Unknown
13
A Detailed Introduction to Aion DS
  • Demons
  • Aion DS has built-in methods called DEMONS
  • Demons are event-driven methods, triggered when
    an event occurs
  • Two commonly used Demons are -
  • WhenModified
  • WhenSourced

14
A Detailed Introduction to Aion DS
  • WhenModified Demon

Assign new slot value
Is there a WhenModified method for this slot
Execute the WhenModified method
Y
N
Exit
15
A Detailed Introduction to Aion DS
  • There are two main types of Methods -
  • Instance Methods
  • Class Methods

16
A Detailed Introduction to Aion DS
Money Fund
Instance Methods
Show
Attached to Message
(Listinvestments)
Print
Attached to Report
(printinvestments)
Send (Print to moneyfund123)
Send (Print to moneyfund789)
Money Fund123
Money Fund456
Money Fund789
Show
Show
Show
Print
Print
Print
Send (Show to moneyfund456)
17
A Detailed Introduction to Aion DS
  • When to use Instance Methods -
  • To perform any sort of operation that requires
    procedural programming related to a single
    instance
  • Most likely uses will be -
  • Performing I/O operations
  • Performing calculations

18
A Detailed Introduction to Aion DS
Investment
Class Methods
Show
Attached to Message
(Listinvestments)
Print
Send (Show to class(moneyFund))
Send (Print to class(StocksAndBonds))
Attached to Report
(printinvestments)
MoneyFund
StocksAndBonds
Show
Show
Attached to Message
(ListFunds)
Attached to Message
(ListStocks)
Print
Print
Attached to Report
(printinvestments)
Attached to Report
(printStocks)
19
A Detailed Introduction to Aion DS
  • When to use Class Methods -
  • To create new instances of the class
  • To manipulate slot values for more than one
    instance of the class
  • To reference/reason with multiple instances of
    the class

20
A Detailed Introduction to Aion DS
  • Structures to Support Methods -
  • Messages
  • Definable on-screen text
  • Reports
  • Can be sent to a printer or written to a file
  • Graphs
  • Display business graphics
  • Functions
  • Perform special pre-defined functions
  • Processes
  • Invoke, send retrieve data from external
    software

21
A Detailed Introduction to Aion DS
  • Invoking Instance Methods -
  • send(methodname to instance)
  • instance.methodname
  • Invoking Class Methods -
  • send(methodname to class(classname))
  • class(classname).methodname

22
A Detailed Introduction to Aion DS
  • States
  • Used to store knowledge in the form of rules
  • Contain agendas
  • High level instructions that direct the inference
    engine
  • States consist of agenda statements and rules

23
A Detailed Introduction to Aion DS
  • States

ClassifyCustomer
Determine Investment Category for which customer
qualifies
Display Category on screen
Print Report
24
A Detailed Introduction to Aion DS
  • The Main State

ClassifyCustomer
Determine Investment Category for which customer
qualifies
Main
Display Category on screen
State (ClassifyCustomer)
Print Report
If Investment category determined
then
RecommendInvestment
State (RecommendInvestment) end
Determine which Investments to show customer
Display Investments on screen
Print Investment Report
25
A Detailed Introduction to Aion DS
  • Agendas typically contain statements to perform
    functions such as -
  • Call other states
  • Invoke methods on classes or instances
  • Initiate forward or backward chaining using the
    rules in a state
  • Initiate database access
  • Display user friendly messages and menus
  • Query the user for information

26
A Detailed Introduction to Aion DS
  • Agenda statements give the high-level
    instructions for inference
  • Rules process the bulk of the information
  • Rules that are relevant to solving the same
    problem or achieving the same goal are normally
    grouped together in a single state
  • Typical rule consists of two parts
  • Premise
  • Action

27
A Detailed Introduction to Aion DS
  • Agenda statements
  • state
  • Invokes all the children states of the current
    state in any order
  • state(state)
  • Invokes the state state
  • send(method to instance) or instance.method
  • Calls the method method for an instance
  • send(method to class(class)) or
    class(class).method
  • Calls the method method for class class
  • forwardchain
  • Initiates forward chaining using the rules in the
    current state

28
A Detailed Introduction to Aion DS
  • Agenda statements
  • slot(instance.slot)
  • Initiates backward chaining using the rules in
    the current state with the value of slot in
    instance as the goal
  • if condition then action(s) end
  • Executes the statements in actions if the
    condition is true
  • Comments
  • Delimited by /text/
  • I.e. / Open the application window/

29
A Detailed Introduction to Aion DS
Refrigerator Diagnosis Application
DiagnoseProblem
Send (GetBasicData to Fridge1)
Slot (Fridge1.Problem)
Main
Message (Welcome)
State (Diagnose Problem)
State (Recommend Action)
RecommendAction
Send (Display results to Fridge1)
forwardchain
30
A Detailed Introduction to Aion DS
Scheduling KBS
Schedule Shifts
state
ScheduleAM
SchedulePM
ScheduleSwing
forwardchain
forwardchain
forwardchain
31
A Detailed Introduction to Aion DS
Example Agendas
ScheduleShifts
ScheduleShifts
State (ScheduleAM)
State (SchedulePM)
state (ScheduleAM)
If project is incomplete
state (SchedulePM)
then
state (ScheduleSwing)
state (ScheduleSwing)
end
32
A Detailed Introduction to Aion DS
  • There are two basic alternatives when specifying
    control logic -
  • 1 The agenda of each statement contains
    conditionals that decide whether or not to
    activate that states rules/agenda
  • 2 The agenda of a state that is invoking
    additional states contains conditionals that
    govern whether or not to enter those states

33
A Detailed Introduction to Aion DS
Invoking and controlling states
A
If condition1 then
forwardchain end
InvokingState
State (A)
State (B)
B
If condition2 then
forwardchain end
34
A Detailed Introduction to Aion DS
Invoking and controlling states
A
forwardchain
InvokingState
if condition1
B
then state (A)
elseif condition2
forwardchain
then state (B) end
35
A Detailed Introduction to Aion DS
  • Besides the main state, additional states can be
    defined for the following reasons -
  • To represent the modules of a problem
  • To represent the major tasks within a problem
  • To organise rule-based inferencing
  • To isolate non-inferencing operations such
    as I/O

36
A Detailed Introduction to Aion DS
  • State Hierarchies
  • States can be defined independently or arranged
    into hierarchies
  • Hierarchies are useful for -
  • organising rules into logical groups for
    procedural control
  • easier development and understanding

37
A Detailed Introduction to Aion DS
  • Invoking States
  • A state can be invoked by using the KDL command
    state
  • States can be invoked from another state, or from
    parts of an application such as a rule

38
A Detailed Introduction to Aion DS
  • Controlling State Execution
  • Agendas of states should be defined so that the
    flow of control is as explicit as possible
  • Knowledge can be defined in agendas to prevent
    improper execution of the state

39
A Detailed Introduction to Aion DS
  • Benefits of Using States
  • Clearly define the logic of your application
    (inference)
  • Organise the knowledge of your application
    (rules)
  • The inference process can be adapted for each
    state (set to FC / BC or Mixed)
Write a Comment
User Comments (0)
About PowerShow.com