1 / 46

Artificial Intelligence Knowledge engineering

Artificial Intelligence Knowledge engineering. Fall 2008 professor: Luigi Ceccaroni. Knowledge engineering. A knowledge engineer is someone who: Investigates a particular domain Learns what concepts are important in that domain

batesa
Download Presentation

Artificial Intelligence Knowledge engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 agent’s orientation be a function or a predicate?” • “Should the agent’s 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. principal solution concrete solution problem class concrete problem 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 > 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. NIVEL DE LEUCOCITOS BAJO HUÉSPED PREDISPUESTO A LA INFECCIÓN PACIENTE INMUNODEFICIENTE INFECCIÓN POR Escherichia coli INFECCIÓN POR BACTERIAS GRAMNEGATIVAS LEUCOPENIA Nº LEUCOCITOS < 2.5 M Heuristic classification: example [MYCIN]

  24. Heuristic classification: example Concesión de créditosparafundar una nuevaempresa • Atributos (ejemplos) • Apoyofinanciero (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éspreferente

  25. Heuristic classification: example Reglas de abstracción Bienes < 10 * petición → Bienes insuficientes Bienes ≥ 10 * petición ∧ Bienes < 20 * petición → Bienes suficientes Bienes ≥ 20 * petición → Bienes excelentes Avales ≥ 10 * petición ∨ Es-rico → Apoyo-financiero bueno Avales < 10 * petición ∧ Avales ≥ petición → Apoyo-financiero moderado Avales < petición → Apoyo-financiero bajo Cheques-sin-fondos ∨ Moroso → Fiabilidad-de-la-devolució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 < petición → Compromiso bajo Crédito ≥ petición ∧ Crédito < 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 < 107∧ Bienes < 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 • Goal initialization (task to be carried out): necessary elements to identify the initial state are created. • Operator proposal: all operators that can actuate on the current state are considered. • Operator elimination: some operators are eliminated according to global criteria (e.g., predefined preference order). • Operator evaluation: the effects of the operators on the solution are compared using expert knowledge. • Operator selection: the operator with the best evaluation is selected. • Operator application: the selected operator is applied to the current state. • 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/corrected. • 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 • Start with a complete, non optimal state, which satisfies the constraints. • Modify the state applying the least commitment heuristics: “Choose the operator that imposes less constraints on future actions”. • If the modification violates any constraints, then undo some of the previous steps, trying to minimize the undoing modifications. • 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 <-- sucesores de n L <-- competidores en espera de n 5. Recoger más datos que discriminen entre las hipótesis de K y puntuar-les. 6. Sean: k <-- mejor (K) y l <-- mejor (L) 7. Si puntuación (k) > puntuación (l) entonces n <-- k si no n <-- l 8. Tornar a 4

  46. Hierarchical hypothesize and test: example • A hierarchical representation of lung diseases in CENTAUR

More Related