Artificial Intelligence Knowledge engineering - PowerPoint PPT Presentation

About This Presentation
Title:

Artificial Intelligence Knowledge engineering

Description:

Title: Inteligencia Artificial Author: Luigi Ceccaroni Last modified by: Luigi Ceccaroni Document presentation format: On-screen Show (4:3) Other titles – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 47
Provided by: LuigiCe8
Learn more at: https://www.cs.upc.edu
Category:

less

Transcript and Presenter's Notes

Title: Artificial Intelligence Knowledge engineering


1
Artificial IntelligenceKnowledge engineering
  • Fall 2008
  • professor Luigi Ceccaroni

2
Knowledge engineering
  • A knowledge engineer is someone who
  • Investigates a particular domain
  • Learns what concepts are important in that domain
  • Creates a formal representation of the objects
    and relations in the domain
  • Knowledge engineering is a process for developing
    special-purpose knowledge bases
  • whose domain is carefully circumscribed and
  • whose range of queries is known in advance.

3
The software engineering process waterfall model
3
4
The software engineering process spiral model
4
5
The knowledge engineering process general
methodology
6
Identify the task
  • Feasibility of the construction of the KBS
  • Search for the sources of knowledge (experts,
    books, Internet)
  • Specification of necessary data to solve the
    problem
  • Specification of the goals (solutions) or of the
    criteria which define the solution

7
Assemble the relevant knowledge
  • Specification of the basic elements to
    characterize the domain (relevant facts) and
    their relations
  • Distinction between evidences, hypotheses and
    actions to be carried out
  • Specification of the different hypotheses and
    goals
  • Decomposition of the problem into sub-problems
  • Characterization of the reasoning flow

8
Vocabulary of predicates, functions and constants
  • Translation of the important domain-level
    concepts into logic-level names
  • Questions of knowledge engineering style
  • Should pits be independent objects or a unary
    predicate on square objects?
  • Should the agents orientation be a function or
    a predicate?
  • Should the agents location depend on time?
  • Once the choices have been made, the result is a
    vocabulary that is known as the ontology of the
    domain.

9
Formalize and encode the knowledge about the
domain
  • Determination of the necessary reasoning schemas
  • classification
  • diagnosis
  • temporal planning
  • causal structures
  • Identification of the search space and the type
    of search
  • Identification of the resolution methodology
  • heuristic classification
  • constructive problem-solving
  • hierarchical hypothesize and test

10
Formalize and encode the knowledge about the
domain
  • Analysis of inaccuracy (uncertainty, imprecision)
    and completeness
  • Implementation of the representation
  • Facts base
  • Modular structure of the knowledge base
  • Inference rules of each module
  • Decisions on the control of the resolution
  • Meta-rules associated to the modules
  • Other meta-rules

11
Encode a description of the specific problem
instance
  • Problem instances are supplied by the sensors or,
    in general, they are generic input data with a
    certain structure and semantics.
  • It involves writing simple atomic sentences about
    instances of concepts that are already part of
    the ontology.

12
Pose queries to the inference procedure and get
answers
  • Let the inference procedure operate on the rules,
    axioms and problem-specific facts to derive the
    facts we are interested in knowing.

13
Debug the knowledge base
  • Specification of a set of test cases
  • Evaluation of the functioning of the system
    (prototype)
  • accuracy
  • completeness
  • credibility (explanations)

14
Types of KBSs (Clancey, 1985)
  • Analysis tasks interpretation of a system
  • control
  • prediction (simulation)
  • identification (monitoring, diagnosis)
  • Synthesis tasks construction of a system
  • design (planning, configuration)
  • assemblage (modification)
  • specification

14
15
Analysis-oriented KBSs
  • Diagnosis oriented
  • Medical diagnosis, failures diagnosis
  • Classification oriented
  • User profiling, species identification
  • Supervision oriented
  • Real-time process supervision
  • Prediction oriented
  • Meteorology, stock-market prediction

16
Synthesis-oriented KBSs
  • Planning oriented
  • Robot course planning
  • Design oriented
  • Architectural design
  • Configuration oriented
  • Computer networks configuration

17
Practical problem-solving methods
  • Heuristic classification
  • Constructive problem-solving
  • Helping expert-systems builders to make the right
    design decisions with respect to the methods and
    representations most suitable for their
    application will do much to prevent the
    frustration and disillusion that often accompany
    bad decisions. (Peter Jackson, Introduction to
    expert systems, 1990)

18
Heuristic classification
  • Heuristic classification has been identified as a
    widespread problem solving method.
  • It is comprised of three main phases
  • abstraction from a concrete, particular problem
    description to a problem class
  • heuristic match of a general solution (method) to
    the problem class
  • refinement of the general solution to a concrete
    solution for the concrete problem
  • To be applied, a finite set of solutions needs to
    be identified a priori.

19
Heuristic classification
  • HC can be applied in analysis tasks
  • classification
  • diagnosis
  • identification
  • monitoring
  • ...
  • It is used for complex problems.
  • If the problem is simple, a direct association
    between data and solutions is enough.

20
Heuristic classification
heuristic association
refinement and adaptation
data abstraction
21
Heuristic classification
  • Data abstraction
  • Data of the specific case are abstracted to
    obtain a more general case
  • Types of abstraction/generalization
  • Based on taxonomy
  • From quantitative to qualitative measures
  • Temperature de Q 38 ºC
  • If Temperature gt 37.5 ºC then Temperature is high

22
Heuristic classification
  • Heuristic association (matching)
  • Determining the relation between abstract cases
    and abstract solutions
  • If Temperature is high then has-fever
  • Refinement and adaptation of the solution
  • Identifying specific solutions from abstract
    solutions and complementary data
  • If has-fever and other data then
  • Q has flu

23
Heuristic classification example
MYCIN
24
Heuristic classification example
  • Concesión de créditos para fundar una nueva
    empresa
  • Atributos (ejemplos)
  • Apoyo financiero (tiene avales, es-rico...)
  • Petición (106 ...)
  • Bienes (cuentas-corrientes, casas, coches,
    yates...)
  • Fiabilidad-de-la-devolución (morosidad,
    cheques-sin-fondos...)
  • Compromiso (créditos-anteriores...)
  • Soluciones
  • Denegación
  • Aceptación
  • Aceptación con rebaja
  • Aceptación con interés preferente

25
Heuristic classification example
  • Reglas de abstracción
  • Bienes lt 10 petición ? Bienes insuficientes
  • Bienes 10 petición ? Bienes lt 20 petición ?
    Bienes suficientes
  • Bienes 20 petición ? Bienes excelentes
  • Avales 10 petición ? Es-rico ?
    Apoyo-financiero bueno
  • Avales lt 10 petición ? Avales petición ?
    Apoyo-financiero
  • moderado
  • Avales lt petición ? Apoyo-financiero bajo
  • Cheques-sin-fondos ? Moroso ? Fiabilidad-de-la-dev
    olución baja
  • Empresa es churrería ? Empresa es tienda de roba
    ? Viabilidad buena
  • Empresa es hamburguesería cerca de universidad ?
    Viabilidad buena
  • Empresa es Corte-Inglés ? Empresa es proveedor
    Internet vía cable ?
  • viabilidad muy buena
  • Crédito lt petición ? Compromiso bajo
  • Crédito petición ? Crédito lt 10 petición ?
    Compromiso mediano
  • Crédito 10 petición ? Compromiso alto

26
Heuristic classification example
  • Reglas de asociación heurística
  • Apoyo-financiero bajo ? Bienes insuficientes ?
    Denegación
  • Fiabilidad-de-la-devolución baja ? Denegación
  • . . .
  • Apoyo-financiero moderado ? Bienes suficientes ?
  • Viabilidad buena ? Aceptación con rebaja
  • . . .
  • Apoyo-financiero bueno ? Bienes suficientes ?
    Compromiso mediano
  • ? Viabilidad buena ? Aceptación
  • . . .
  • Apoyo-financiero bueno ? Bienes excelentes ?
    Compromiso alto ?
  • Viabilidad muy buena ? Aceptación con interés
    preferente
  • . . .

27
Heuristic classification example
  • Regles de refinamiento/adaptación de las
    soluciones
  • Aceptación con rebaja ? Petición lt 107 ? Bienes lt
    5 Petición ?
  • Rebaja a 0.6 Petición
  • . . .
  • Aceptación con interés preferente ? Petición
    107 ? Bienes 10 Petición ? Interés
    preferente 1 inferior al del mercado

28
Heuristic classification example
29
Constructive problem-solving
  • Solutions can be infinite and do not need to be
    identified a priori.
  • Solutions are constructed and not selected among
    various possibilities.
  • Constructive problem-solving is applicable in
    synthesis tasks
  • planning
  • design
  • ...

30
Constructive problem-solving
  • Solutions are combinations of certain elements,
    which satisfy some constraints
  • Planning
  • Elements are actions.
  • Solutions are sequences of actions accomplishing
    a certain goal.
  • Design
  • Elements are components.
  • Solutions are combinations of components forming
    a complex object.

31
Constructive problem-solving
  • The construction of the solution implies knowing
  • a model of the structure of the complex object
  • a model of the behavior of the complex object
  • a set of constraints on the complex object

31
32
Constructive problem-solving
  • Constraints can be
  • On the configuration of the components of the
    solution
  • Physical/spatial constraints
  • How to hold an object
  • An object cannot be placed in a certain place
  • Temporal constraints
  • Which action is carried out first
  • On the pre- and post-conditions of
    operator/actions
  • On the interaction between the previous ones

32
33
Constructive problem-solving example 1
  • Planning of the (optimal) path of a robot exit a
    room with obstacles
  • Operators/actions
  • go forward (m) turn (degrees) go backward (m)
  • Constraints
  • The robot cannot touch any obstacle.
  • At the and the robot has to be at the exit.
  • Only the movements indicated by the operators are
    allowed.

R
33
34
Constructive problem-solving example 2
  • Configure/place a set of furniture/objects in a
    room
  • Operators/actions
  • place-furniture (furniture, position)
    remove-furniture (furniture) swap-furniture
    (furniture-1, furniture-2) move-furniture
    (furniture, position)
  • Constraints
  • Doors and windows cannot be blocked
  • All furniture has to be placed
  • Only the operations indicated by the operators
    are allowed.

Wii
34
Sofa
35
Constructive problem-solving sub-methods
  • Propose and apply
  • The problem needs to be decomposed into tasks
    (sub-problems) with clear spatial/temporal
    relations among them.
  • Operations, with their constraints and effects,
    need to be clearly defined.
  • Least commitment
  • Partial solutions are needed to start, and are
    then improved to get to the final solution.

35
36
Propose and apply
  • The method starts from an empty or incomplete
    initial state.
  • Each step contributes to the completion of the
    solution.
  • The best operator is chosen at each step.

37
Propose and apply
  • Exhaustive knowledge is needed about
  • Operators, and their effect on the solution
  • Constraints and relations among components of the
    solution
  • Quality of the solution
  • Resolution can be through
  • Sequential construction (It needs a lot of
    knowledge to be efficient.)
  • Hierarchical task-decomposition (It is more
    efficient, but needs decomposition operators.)

38
Propose and apply resolution process
  1. Goal initialization (task to be carried out)
    necessary elements to identify the initial state
    are created.
  2. Operator proposal all operators that can actuate
    on the current state are considered.
  3. Operator elimination some operators are
    eliminated according to global criteria (e.g.,
    predefined preference order).
  4. Operator evaluation the effects of the operators
    on the solution are compared using expert
    knowledge.
  5. Operator selection the operator with the best
    evaluation is selected.
  6. Operator application the selected operator is
    applied to the current state.
  7. Goal evaluation if the goal is reached, the
    process stops, otherwise it restarts from step 2.

38
39
Least commitment
  • The method starts from a complete state.
  • At each step, the state is modified/improved/corr
    ected.
  • The operator to be applied is defined by the
    least commitment strategy
  • The modification that imposes less future
    constraints.

39
40
Least commitment resolution process
  1. Start with a complete, non optimal state, which
    satisfies the constraints.
  2. Modify the state applying the least commitment
    heuristics Choose the operator that imposes
    less constraints on future actions.
  3. If the modification violates any constraints,
    then undo some of the previous steps, trying to
    minimize the undoing modifications.
  4. If the goal is reached, the process stops,
    otherwise it restarts from step 2.

40
41
Least commitment example
  • Queremos planificar la mejor trayectoria de un
    robot en una habitación
  • La habitación tiene un conjunto de obstáculos que
    queremos evitar
  • Disponemos de un conjunto de operadores
  • Movernos hacia adelante o hacia atrás a cierta
    velocidad y cierta distancia
  • Girar cierto número de grados

41
42
Least commitment example
42
43
Least commitment example
  • Restricciones globales llegar a la puerta de
    salida, trayectoria mínima en recorrido y tiempo
  • Restricciones de elección de operadores No
    chocar con obstáculos o la pared, mantener la
    distancia para poder maniobrar
  • Evaluación de los operadores
  • Mover Mejor cuanto más lejos y más deprisa nos
    lleve al objetivo
  • Girar Mejor cuanto más lejos deje los obstáculos
    de nuestra trayectoria

43
44
Hierarchical hypothesize and test
  • La formación de hipótesis y pruebas organizadas
    jerárquicamente (HPJ) combina aspectos de
    clasificación heurística y de resolución
    constructiva de problemas.
  • Es indicada en problemas donde
  • El espacio de soluciones posibles es muy grande,
    pero estas toman valores en un dominio finito.
  • El espacio de hipótesis (nodos de la resolución)
    está organizado jerárquicamente
  • Los nodos altos corresponden a hipótesis más
    generales, que se van refinando hasta llegar a
    las hojas que corresponden a hipótesis más
    concretas.
  • La estructuración jerárquica ayuda a plantear el
    problema y facilita la solución.
  • Ejemplos
  • CENTAUR (Aikins, 1983)
  • INTERNIST (Pople, 1977)
  • TEST (Kahn et al., 1987)

45
Hierarchical hypothesize and test resolution
process
  • 1. Leer los datos iniciales del problema y
    formular hipótesis.
  • 2. Asignar a cada hipótesis una puntuación que
    refleje la proporción de los datos explicados.
  • 3. Determinar el mejor nodo según la puntuación
    n.
  • 4. Si nodo-(n)-es-solución entonces acabar
  • si no dividir el espacio de
    hipótesis en 2 conjuntos K i L
  • K lt-- sucesores de n
  • L lt-- competidores en
    espera de n
  • 5. Recoger más datos que discriminen entre las
    hipótesis de K y puntuar-les.
  • 6. Sean k lt-- mejor (K) y l lt-- mejor (L)
  • 7. Si puntuación (k) gt puntuación (l) entonces n
    lt-- k si no n lt-- l
  • 8. Tornar a 4

46
Hierarchical hypothesize and test example
  • A hierarchical representation of lung diseases in
    CENTAUR
Write a Comment
User Comments (0)
About PowerShow.com