Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques.

Similar presentations


Presentation on theme: "Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques."— Presentation transcript:

1 Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques

2 Topics in artificial intelligence 2 Dr hab. inż. Joanna Józefowska, prof. PP Plan Reasoning in Description logics –Subsumption –Classification –Satisfiability –Tableau algorithms Reasoning and search –Search space –MIN-MAX algorithm –Alpha-beta algorithm

3 Topics in artificial intelligence 3 Dr hab. inż. Joanna Józefowska, prof. PP Lecturer   attends.Course T Student Reasoning task: sumsumption C is subsumed by D with respect to T iff C I  D I holds for all models I of T C T D Intuition If then D is more general than C. Lecturer = Person   teaches.Course Student = Person   attends.Course

4 Topics in artificial intelligence 4 Dr hab. inż. Joanna Józefowska, prof. PP PhDStudent =  teaches.Course  Student Reasoning task: classification Arrange all defined objects from TBox in a hierarchy with respect to generality. Lecturer = Person   teaches.Course Student = Person   attends.Course Student Person Lecturer PhDStudent Can be computed using multiple subsumption tests.

5 Topics in artificial intelligence 5 Dr hab. inż. Joanna Józefowska, prof. PP Then sibling.Woman   sibling.Man is unsatisfiable w.r.t. T. Reasoning task: satisfiability C is satisfiable w.r.t. T iff T has a model with C I  . Woman = Person  Female Man = Person   Female Subsumption can be reduced to (un)satisfiability and vice versa. Intuition: If unsatisfiable the concept contains a contradiction. iff C   D is not satisfiable w.r.t. T C T D C T  C is satisfiable w.r.t. T iff not

6 Topics in artificial intelligence 6 Dr hab. inż. Joanna Józefowska, prof. PP Description logics are more than concept language Knowledge base TBox terminological knowledge background knowledge ABox knowledge about individuals Use concept language DL Reasoner

7 Topics in artificial intelligence 7 Dr hab. inż. Joanna Józefowska, prof. PP Definitorial TBoxes A primitive interpretation for TBox T interprets the primitive concept names all role names A TBox is called definitorial if every primitive interpretation for T can be uniquely extended to a model of T. i.e. primitive concepts (and roles) uniquely determine defined concepts. Not all TBoxes are definitorial Person =  parent.Person Non-definitorial TBoxes describe constraints, e.g. from background knowledge.

8 Topics in artificial intelligence 8 Dr hab. inż. Joanna Józefowska, prof. PP Acyclic TBoxes TBox is acyclic if there are no definitorial cycles. Lecturer = Person   teaches.Course Course =  hastitle.Title   tought-by.Lecturer Expansion of acyclic TBox T exhaustively replace defined concept name with their definition (terminates due to acyclicity) Acyclic TBoxes are always definitorial first expand then set A I := C I for all A = C  T

9 Topics in artificial intelligence 9 Dr hab. inż. Joanna Józefowska, prof. PP Acyclic TBoxes II For reasoning acyclic TBoxes can be eliminated to decide with T acyclic expand T replace defined concept names in C, D with their definition decide analogously for satisfiability C T D C D May yield an exponential blow-up.

10 Topics in artificial intelligence 10 Dr hab. inż. Joanna Józefowska, prof. PP General concept inclusions General Tbox: finite set of general concept implications (GCIs) with both C and D allowed to be complex. C D Course   attended-by.Sleeping Boring Note: C D equivalent to T = C  D (in terms of model I )

11 Topics in artificial intelligence 11 Dr hab. inż. Joanna Józefowska, prof. PP Tableau algorithms Goal: an algorithm which takes an ALC concept C 0 and 1.Returns „satisfiable” iff C 0 is satisfiable 2.Terminates on every input i.e. decides satisfiability of ALC concepts Recall: such an algorithm cannot exist for FOL since satisfiability of FOL is not decidable!

12 Topics in artificial intelligence 12 Dr hab. inż. Joanna Józefowska, prof. PP Negation normal form (NNF) Negation occurs only in front of concept names C  C   D  C   D  R.  C  R.  C    C  (C  D)  (C  D)   R.C   R.C

13 Topics in artificial intelligence 13 Dr hab. inż. Joanna Józefowska, prof. PP Intuition Is A   R.B   R.  Bsatisfiable? The tableau algorithm works on a complete tree which represents a model I : nodes represent elements of  I each node x is labeled with concepts L (x)  sub(C 0 ), C  L (x) is read as „x should be an instance of C” edges represent role successorship each edge  x,y  is labelled with a role name from C 0, R  L (  x,y  ) is read as „(x,y) should be in R I ” is initialized with a single root node x 0 with L (x 0 ) = {C 0 } is expanded using completion rules

14 Topics in artificial intelligence 14 Dr hab. inż. Joanna Józefowska, prof. PP Completion rules  rule: if (C 1  C 2 )  L (x) and {C 1, C 2 }  L (x) then set L (x) = L (x)  {C 1, C 2 }  rule: if (C 1  C 2 )  L (x) and {C 1, C 2 } =  then set L (x) = L (x)  C for some C  {C 1, C 2 }  rule: if  S.C  L (x) and x has no S-successor y with C  L (x) then create a new node y with L (  x,y  )={S} and L (y)={C}  rule:if  S.C  L (x) and there is an S-successor y of x with C  L (y) then set L (y) = L (y)  {C} We only apply rules if their application does „something new” The  rule is non- deterministic

15 Topics in artificial intelligence 15 Dr hab. inż. Joanna Józefowska, prof. PP Clash A c-tree contains a clash if it has a node x with  L (x) or {A,  A}  L (x) – otherwise it is clash-free C 0 is satisfiable iff the completion rules can be applied in such a way that it results in a complete and clash-free c-tree. Careful: this is non- deterministic

16 Topics in artificial intelligence 16 Dr hab. inż. Joanna Józefowska, prof. PP Properties of the tableau algorithm Let C 0 be an ALC concept in NNF. Then: 1.the algorithm terminates when applied to C 0 and 2.the rules can be applied such that they generate a clash-free and complete completion tree iff C 0 is satisfiable.

17 Topics in artificial intelligence 17 Dr hab. inż. Joanna Józefowska, prof. PP Example L (x) = {A,  R.B,  R.  B} xw L (w) = {B,  R.  B} R CLASH! y R L (y) = {B,  B} x  A I x  (  R.B) I  d: (x,d)  R I, d  B I x  (  R.  B) I d  (  B) I

18 Topics in artificial intelligence 18 Dr hab. inż. Joanna Józefowska, prof. PP ABoxes An ABox is a finite set of assertions a : C(a – individual name, C – concept) (a,b) : R(a, b – individual names, R – role name) E.g. {peter : Student, (ai-course, joanna) : tought-by} Interpretations I map each individual name a to an element of  I. I satisfies an assertion a : Ciffa I  C I (a,b) : Riff (a I,b I )  R I I is a model for an Abox A if I satisfies all assertions in A.

19 Topics in artificial intelligence 19 Dr hab. inż. Joanna Józefowska, prof. PP ABoxes Interpretations describe the state of the world in a complete way ABoxes describe the state of the world in an incomplete way An ABox has many models An ABox constraints the set of admissible models similar to a TBox

20 Topics in artificial intelligence 20 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning with ABoxes Given an ABox A and a TBox T do they have a common model? ABox consistency Given an ABox A, a TBox T, an individual name a, and a concept C does a I  C I hold in all models of A and T ? Instance checking A, T  = a : C The two tasks are interreducible: A consistent w.r.t T iff A, T |= a :  A, T  = a : C iff A  {a : C} is not consistent

21 Topics in artificial intelligence 21 Dr hab. inż. Joanna Józefowska, prof. PP Example ABox TBox dumbo : Mammal t14 : Trunk (dumbo, t14) : bodypart g23 : Darkgrey (dumbo, g23) : color Elephant = Mammal   bodypart.Trunk   color.Grey Grey = Lightgrey  Darkgrey  = Lightgrey  Darkgrey ABox is inconsistent w.r.t. TBox. dumbo is an instance of Elephant.

22 Topics in artificial intelligence 22 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search

23 Topics in artificial intelligence 23 Dr hab. inż. Joanna Józefowska, prof. PP cbac bcaccabc baccacbc abcc (3) (1) (2) (3) (1) ba  ab(1) ca  ac(2) cb  bc(3) Production rules

24 Topics in artificial intelligence 24 Dr hab. inż. Joanna Józefowska, prof. PP State space is an ordered 4-tuple [N, A, S, GD], where: N is a set of nodes corresponding to the states of the problem in the solution process A is a set of arcs corresponding to the steps in the solution process S is a non-empty subset of N containing the initial states of the problem GD is a non-empty subset of N containing the goal states of the problem.

25 Topics in artificial intelligence 25 Dr hab. inż. Joanna Józefowska, prof. PP cbac bcaccabc baccacbc abcc (3) (1) (2) (3) (1) Systemy produkcyjne N – state set

26 Topics in artificial intelligence 26 Dr hab. inż. Joanna Józefowska, prof. PP cbac bcaccabc baccacbc abcc (3) (1) (2) (3) (1) N – state set A – step set S – set of initial states GD – set of goal states

27 Topics in artificial intelligence 27 Dr hab. inż. Joanna Józefowska, prof. PP The states in GD are defined: 1. by properties of states occurring during search 2. by properties of the path created during search Solution path is the path from a node in S to a node in GD.

28 Topics in artificial intelligence 28 Dr hab. inż. Joanna Józefowska, prof. PP cbac bcaccabc baccacbc abcc (3) (1) (2) (3) (1) Two solution paths

29 Topics in artificial intelligence 29 Dr hab. inż. Joanna Józefowska, prof. PP NIM

30 Topics in artificial intelligence 30 Dr hab. inż. Joanna Józefowska, prof. PP NIM

31 Topics in artificial intelligence 31 Dr hab. inż. Joanna Józefowska, prof. PP NIM

32 Topics in artificial intelligence 32 Dr hab. inż. Joanna Józefowska, prof. PP NIM

33 Topics in artificial intelligence 33 Dr hab. inż. Joanna Józefowska, prof. PP NIM

34 Topics in artificial intelligence 34 Dr hab. inż. Joanna Józefowska, prof. PP NIM

35 Topics in artificial intelligence 35 Dr hab. inż. Joanna Józefowska, prof. PP NIM

36 Topics in artificial intelligence 36 Dr hab. inż. Joanna Józefowska, prof. PP NIM

37 Topics in artificial intelligence 37 Dr hab. inż. Joanna Józefowska, prof. PP NIM

38 Topics in artificial intelligence 38 Dr hab. inż. Joanna Józefowska, prof. PP Algorytm MIN-MAX Players are denoted MIN and MAX The value of the game is the score of MAX. The score of MAX plus the score of MIN equals zero. MAX attempts to maximize the value of the game. MIN attempts to minimize the value of the game.

39 Topics in artificial intelligence 39 Dr hab. inż. Joanna Józefowska, prof. PP NIM MIN MAX +1 +1 +1

40 Topics in artificial intelligence 40 Dr hab. inż. Joanna Józefowska, prof. PP NIM MIN MAX +1 +1 +1

41 Topics in artificial intelligence 41 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm MINiMAX If the father is MIN, assign it the minimum value of all its children. If the father is MIN, assign it the maximum value of all its children. Both players have the same information about the game and want to win.

42 Topics in artificial intelligence 42 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha-beta Assumptions: 1. The rules prohibit infinite path. 2. Only finite number of successors can be generated from any node. 3. The length of any game is finite.

43 Topics in artificial intelligence 43 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+ 

44 Topics in artificial intelligence 44 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+  9  9

45 Topics in artificial intelligence 45 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+  beta=9 9

46 Topics in artificial intelligence 46 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+  beta=7 9 7  7

47 Topics in artificial intelligence 47 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+  beta=7 9 7 8

48 Topics in artificial intelligence 48 Dr hab. inż. Joanna Józefowska, prof. PP Algorithm alpha beta MAX MIN alfa=-  beta=+  beta=7 9 7 8 77

49 Topics in artificial intelligence 49 Dr hab. inż. Joanna Józefowska, prof. PP Alpha cuts MAX MIN alfa=7 beta=+  66 beta=7 9 7 8 6 Any value found in this branch can not increase beta.

50 Topics in artificial intelligence 50 Dr hab. inż. Joanna Józefowska, prof. PP Alpha cuts Search can complete below any MIN node with value less than or equal from value alpha of any of its predecessors (of type MAX).

51 Topics in artificial intelligence 51 Dr hab. inż. Joanna Józefowska, prof. PP Beta cuts MAX MIN alfa=7 beta=+  beta=7 9 7 8 MAX beta=8 8

52 Topics in artificial intelligence 52 Dr hab. inż. Joanna Józefowska, prof. PP Beta cuts MAX MIN alfa=7 beta=+  beta=7 9 7 8 MAX 9 99 beta=8 8 Alfa cannot decrease

53 Topics in artificial intelligence 53 Dr hab. inż. Joanna Józefowska, prof. PP Beta cuts Search can complete below any MAX node with value greater than or equal from value beta of any of its predecessors (of type MIN).


Download ppt "Topics in artificial intelligence 1/1 Dr hab. inż. Joanna Józefowska, prof. PP Reasoning and search techniques."

Similar presentations


Ads by Google