Ontologies and Agent Oriented Knowledge Representation Jacques Robin
Ontologies and Agent Oriented Knowledge Representation Jacques Robin Ontologies Reasoning Components Agents Simulations
Outline E E History of object-oriented languages UML 2 as a domain knowledge representation language Ontologies and object-oriented knowledge reuse A UML 2 profile for agent-oriented knowledge representation
History of Object-Oriented Languages Software Engineering Programming Databases 1965 Knowledge Representation Distributed Systems Simula Sketchpad Semantic Networks Smalltalk Frames C++ Java OQL Description Logics UML 1 MOF 1 OCL 1 SQL’ 99 C# Semantic Web Frame Logics MOF 2 UML 2 OWL OCL 2 SWSL 2006 CHORD
UML as KR Language E Class diagram: E Modern, well-founded version of semantic networks E Activity diagram E Modern, well-founded version of flow charts E Graphical syntax for procedures E Class diagrams + Activity diagrams : E Graphical syntax of expressive power approximately equivalent to that of Frames E Strengths: E Universal standard, well-thought, well-known and well-tooled (CASE) E Facilitates convergence between software and knowledge engineering E Limitations: E Lack of full UML compilers to executable languages E Lack of inference engine to automatically reasoning with knowlege represented only as UML models E No mathematically defined formal semantics yet E Thus: E Only useful at the knowledge level E Need to be used in conjunction with other language(s) that provide the formalization and/or implementation level
What is an Ontology? E Explicit, formal (or semi-formal) specification of a shared conceptualization E Conceptualization: model of entities, relations, constraints and rules of a given domain or field; E Formal: machine-processable, allowing automated reasoning, with declarative semantics; E Shared: by a knowledge community, allowing common understanding and effective communication of largely implicitly specified content, completed by inference based on the shared explicit knowledge in the ontology E Knowledge base reusable across AI applications E Independent from any specific application requirement E Linguistic ontology: ontology based on vocabulary and deep syntactic roles of one or several natural languages (ex, http: //wordnet. princeton. edu/) E Domain conceptual ontology: ontology common core of KB from application family in a given domain E Common-sense conceptual ontology: ontology domain-independent, high-level concepts from one or several common sense knowledge aspects
Elements of an Ontology: Concept Generalization Hierarchy E Entity Classes: E Each entity class defined by a set of slot-facet-value triple E Correspond to: E Classes of OO models E Entities of relational models E Terms of logical models E Property slots x relational slots E Filled by atomic values (primitive data types) x by other concepts E Epistemological status of the value (defined by the facet) E Precisely known, default, possibilistic, plausibilistic, probabilistic E Generic Relations: E With or without generalization hierarchy running parallel to concept generalization hierarchy E Correspond to: E Associations, aggregations, compositions and complex object filled attributes of OO models E Relations of relational model E Predicates of logical models
Elements of an Ontology: Constraints and Derivation Rules E Constraints: E On the domain values of attributes from E One concept (type constraints) E Several related concepts (integrity constraints) E To prohibit semantically invalid concepts instances or semantically inconsistent concept instance set E Correspond to: E Class signatures and invariants in OO models E Typing predicates, sorts (partition of constant symbol alphabet) and integrity constraints in logical models E Typing and integrity constraints in database schemas E Rules to derive: E The value of attribute concepts from set of other such values E The existence of concept instances from the existence of other such instances E Correspond to: E Declarative methods in OO models E Implicative clauses of logical models E Database views
Elements of an Ontology: Constraints x Derivation Rules EAs a constraint, the formula: E C, person(C) ! M, person(M) mother(M, C) E prohibits the creation of person concept instances with zero or multiple mothers; EAs a derivation rule, this same formula allows inferring: - From the existence of each instance C of the person concept the existence of another instance M of that concept, related to C by an instance of the mother relation; - From the existence of two instances M and M’ of the person concept, both related to the same third instance C of that concept by the mother relation, that M = M’ E Concept instances generally not part of an ontology E Exception: special values that correspond to constant value declaration in programming language as opposed to variable binding
Cross-Disciplinary History of Ontologies Expert Systems since 1980 Organization Knowledge Management since 1990 Cognitive Psychology since 1960 Philosophy since 350 A. C. Data Integration since 1995 Software Engineering (Business Modeling) since 1990 Ontologies Multi-Agent Systems since 1995 Linguistics since 1960 Natural Language Processing since 1980 Web Information Retrieval since 2000
Top-Level Common Sense Conceptual Ontology Domain or Task Specific Ontology
MAS Simulation Specification Class Diagram <<interface>> Simulation +run() +stop() <<subject component>> Simulation +state: Sim. State. Kind <<enumeration>> Sim. State. Kind running stopped
MAS Simulation Specification Composite Structure Diagram Simulation Sim <<subject component>> : Simulation
MAS Simulation Realization Class Diagram <<subject component>> Simulation <<use>> <<interface>> Sim. Ag <<enumeration>> Ag. State. Kind Communication. Channel <<use>> <<enumeration>> Env. Pub. State. Kind +send 1(ac: Action 1) +create() +send 2(ac: Action 2) empty +terminate() +receive 1(): Percept 1 initialized +receive 2(): Percept 2 percept. Received percepts. Sent +send 1(p: Percept 1, ag: Agent) actions. Received action. Sent +send 2(p: Percept 2, ag: Agent) +receive 1(ag: Agent): Action 1 <<component>> Percept +receive 2(ag: Agent): Action 2 Action Environment +create() +terminate() <<component>> Agent +state: Ag. State. Kind Percept 1 Percept 2 <<use>> <<interface>> Sim. Env Action 1 Action 2 +state: Env. State. Kind <<use>> <<interface>> Ag. Effectors <<interface>> Ag. Sensors <<interface>> Env. Sensors +receive 1(): Percept 1 +receive 2(): Percept 2 +receive 1(ag: Agent): Action 1 +receive 2(ag: Agent): Action 2 +send 1(ac: Action 1) +send 2(ac: Action 2) <<interface>> Env. Effectors +send 1(p: Percept 1, ag: Agent) +send 2(p: Percept 2, ag: Agent)
<<enumeration>> Ag. State. Kind empty initialized percept. Received action. Sent MAS Simulation Realization Class Diagram <<enumeration>> Env. Pub. State. Kind empty initialized percepts. Sent actions. Received <<subject component>> Simulation <<use>> [2. . *] Communication. Channel <<interface>> Sim. Ag +create() +terminate() Percept [2. . *] <<component>> Agent +state: Ag. State. Kind +send 1(ac: Action 1) +send 2(ac: Action 2) +receive 1(): Percept 1 +receive 2(): Percept 2 +send 1(p: Percept 1, ag: Agent) Action +send 2(p: Percept 2, ag: Agent) +receive 1(ag: Agent): Action 1 +receive 2(ag: Agent): Action 2 Percept 1 Percept 2 <<use>><<interface>> Sim. Env +create() +terminate() <<component>> Environment Action 1 +state: Env. State. Kind Action 2 <<use>> [2. . *] <<use>> <<interface>> Ag. Effectors <<use>> [2. . *] <<interface>> Ag. Sensors <<interface>> Env. Sensors +receive 1(): Percept 1 +receive 2(): Percept 2 +receive 1(ag: Agent): Action 1 +receive 2(ag: Agent): Action 2 +send 1(ac: Action 1) +send 2(ac: Action 2) <<use>> <<interface>> Env. Effectors +send 1(p: Percept 1, ag: Agent) +send 2(p: Percept 2, ag: Agent)
MAS Simulation Realization Composite Structure Diagram <<subject component>> : Simulation : Communication. Channel Ag. Sensors [2. . *] Ag. Effectors [2. . ¨¨] Env. Effectors Ag. Sensors Env. Sensors <<component>> : Agent [2. . *] Sim. Ag <<component>> : Environment Ag. Effectors Sim. Ag [2. . *] Env. Effectors Sim. Env
Agent Specification Class Diagram <<interface>> Sim. Ag +create() +terminate() <<enumeration>> Ag. State. Kind empty initialized percept. Received action. Sent <<subject component>> Agent +state: Ag. State. Kind <<use>> Action <<use>> <<interface>> Ag. Effectors Action 1 +send 1(ac: Action 1) Action 2 +send 2(ac: Action 2) Percept <<interface>> Ag. Sensors +receive 1(): Percept 1 +receive 2(): Percept 2 Percept 1 Percept 2
Agent Specification Composite Structure Diagram Ag. Sensors <<subject component>> : Agent Sim. Ag Ag. Effectors
Environment Specification Class Diagram <<interface>> Sim. Env +create() +terminate() <<enumeration>> Ag. State. Kind empty initialized percept. Received action. Sent Action 1 <<component>> Agent <<subject component>> Environment +state: Ag. State. Kind +state: Env. State. Kind <<interface>> Env. Sensors +receive 1(ag: Agent): Action 1 Action 2 +receive 2(ag: Agent): Action 2 Percept <<use>> <<interface>> Env. Effectors +send 1(p: Percept 1, ag: Agent) Percept 1 Percept 2 +send 2(p: Percept 2, ag: Agent) <<enumeration>> Env. Pub. State. Kind empty initialized percepts. Sent actions. Received
Environment Specification Composite Structure Diagram Env. Sensors <<subject component>> : Environment Env. Ag Env. Effectors
Agent Realization Class Diagram <<subject component>> Agent <<use>> <<interface>> update. Model. From. Percept +update. Ag. Sim. Model(p: Percept) <<component>> Percept. Interpretation Sim. Model <<use>> <<component>> Model. Update <<interface>> update. Model. From. Direct. Change. Laws +update. Ag. Sim. Model() <<component>> Model. Update. Ramification <<interface>> ramify. Direct. Changes +Ramify. Ag. Sim. Model() Ag. Sim. Model Goal <<interface>> update. Model. From. Predicted. Action. Effect +update(a: Action) <<component>> Action. Effect. Predictor <<component>> Goal. Update <<component>> Action. Chooser <<interface>> update. Goal +update. Goal() <<interface>> choose. Action +choose(): Action
Agent Realization Composite Structure Diagram <<subject component>> : Agent Ag. Sensors <<delegate>> <<component>> : Percept. Interpretation : Ag. Sim. Model Sim. Ag update. Model. From. Direct. Change. Laws <<component>> : Model. Update. Ramification : Goal Ag. Effectors <<component>> : Model. Update update. Model. From. Percept <<component>> : Goal. Update ramify. Direct. Changes goal. Update <<delegate>> <<component>> : Action. Chooser choose. Action <<component>> : Action. Effect. Predictor update. Model. From. Predicted. Action. Effect
Environment Realization Class Diagram <<subject component>> Environment <<use>> <<interface>> update. Model. From. Agent. Actions +update. Env. Sim. Model(p: Percept) <<component>> Update. From. Actions Sim. Model <<component>> Env. Self. Update <<use>> <<interface>> update. Model. From. Direct. Change. Laws <<component>> Model. Update. Ramification +update. Ag. Sim. Model() <<interface>> ramify. Direct. Changes +Ramify. Ag. Sim. Model() Env. Sim. Model <<interface>> derive. Agent. Percepts +percept(ag: Agent): Percept <<use>> <<component>> Derive. New. Percepts <<use>>
Environment Realization Composite Structure Diagram <<subject component>> : Agent Env. Sensors <<delegate>> <<component>> : Update. From. Actions : Env. Sim. Model Sim. Env. Effectors <<component>> : Env. Self. Update update. Model. From. Agent. Actions update. Model. From. Direct. Change. Laws <<component>> : Model. Update. Ramification ramify. Direct. Changes <<delegate>> <<component>> : Derive. Agent. Percepts Derive. New. Percepts
UML 2 Profiles E Self-extension mechanism to customize UML 2 towards: E Specific application families (i. e. , multi-agent simulations) E Specific implementation platforms (i. e. , EJB, . net, web services) E A profile is a set of stereotypes E Concrete syntax: <<string>> and/or icon E Stereotypes are specializations of meta-classes from the UML 2 meta-model UML 2 Superstructure Meta-Model UML 2 Extension/Customization Language Meta-Model Profile. Application * Package * Profile Class * meta-class Stereotype * * Extension. End Extension Property Association icon Image
MOF Meta-Model of a Simple Multi-Agent Simulations Modeling Language (MASML) MAS Reflex. Agent Reasoning. Component 1. . * Percept 1. . * 2. . * Agent MAS Environment Agent Reasoning. Component 1. . * Sensor Actuator Sensor 1. . * Agent. Action Automata. Agent Reflex. Component 1. . * Goal. Based. Agent Automata. Agent 1. . 4. . * Sensor Environment. State. Model * Reasoning. Component Percept. Interpretation. Component Goal. Based. Agent Goal Automata. Agent 3. . * Reasoning. Component Environment. State. Model. Initialization. Component Goal. Initialization. Component Ramification. Component Goal. Update. Component Model. Based. Behavior. Strategy. Component Goal. Based. Behavior. Strategy. Component Actuator Model. Based. Behavior. Strategy. Component
MOF Meta-Model of a Simple Multi-Agent Simulations Modeling Language (MASML) KBAgent Reflex. KBAgent Reasoning. Component. Knowledge. Base KBAgent 1. . * KBSentence 1. . * KBComponent Persistent. KB Volatile. KB Reflex. Agent Reflex. Component Reflex. KBAgent Reflex. KBComponent Reflex. KB KBAgent KBComponent Persistent. KB 0. . * context Reflex. KBComponent inv Volatile. KB. is. Empty() Goal. Based. KBAgent Automata. KBAgent Goal. Based. KBAgent 6. . * Automata. Agent KBComponent 3. . * 4. . * Automata. KBAgent 4. . * KBComponent 4. . * KBAgent Volatile. KB Goal. KBEnvironment. State. Model. KB Goal Environment. State. Model KBAgent Environment. State. Model. KB Volatile. KB Environment. State. Model
UML 2 Profile for MAS E MASML Meta-Model E UML 2 Meta-Model MAS Component Environment is. Active = true Agent Reasoning. Component Sensor Component Port Actuator Percept Signal Agent. Action Environment. State. Model Knowledge. Base KBSentence Model Package Packagable. Element Typed. Element *
- Slides: 27