1
Multistrategy Reasoning / 3 Multistrategy Reasoning / 3 Example (legal domain) Example (legal domain)
Laurea in Computer Science Laurea in Computer Science
MAGISTRALE MAGISTRALE
Corso di
ARTIFICIAL INTELLIGENCE Stefano Ferilli
Questi lucidi sono stati preparati per uso didattico. Essi contengono materiale originale di proprietà dell'Università degli Studi di Bari e/o figure di proprietà di altri autori, società e organizzazioni di cui e' riportato il riferimento. Tutto o parte del materiale può essere fotocopiato per uso personale o didattico ma non può essere distribuito per uso commerciale. Qualunque altro uso richiede una specifica autorizzazione da parte dell'Università degli Studi di Bari e degli altri autori coinvolti.
Introduction
●
Artificial Intelligence
●
Representation and Inference
●
Knowledge Representation
●
(First-Order) Logics
●
Ontology
●
Calculus
–Multistrategic Inference
●
Example
●
Conclusions
Artificial Intelligence
●
Intelligent Agents
●
Artificial Intelligence-based Systems
●
Endowed significant levels of autonomy
●
Act in their environment
–
In a satisfactory, rational, flexible way
–
Even in case of partial or uncertain information
–
Exhibiting an intelligent, aware behavior
–
Sometimes showing true experience in the domain in which they operate
Logics
●
Objects → Terms
●
Constants, Variables, Functions
●
Claims → Atoms
●
Predicates applied to terms
●
Composition of Claims → Expressions
●
Logistic Connectives
–NOT …
–… AND …, … XOR …, … OR…
–IF … THEN …, … IF AND ONLY IF …
Logics
●
2 specific kinds of expressions
●
Facts
–
Claims (known or supposed to be) true
●
Rules
–
Laws, based on which, if something is true, something else must necessarily be true, as well
Ontology
●
Defines the kind of things that exist in the application domain
●
“its aim is providing a framework of distinctions that can be exploited to discriminte and classify the things that exist and define the words describing them.”
●
Properties
●
Relationships
–
Subclass, Instance, Meronymy, ...
Calculus
●
Inference strategies
●
Deduction
–Ontological, Subsumption, Modus Ponens, Modus Tollens, ...
●
Abstraction
●
Abduction
●
Induction
●
Probability
●
Argumentation
●
Analogy
Legal Knowledge Representation
●
Describing an aspect of reality, of behaviors and of norms that regulate them in a way that is:
●
Isomorphic to reality and to norms
●
Formal
●
Updatable
●
‘Neutral’
[D. Tiscornia, Istituto per la Documentazione Giuridica del CNR]
Facts
●
Example
●
Peter held his black Beretta 92 having s/n 1234, which seemingly fired
–hold(peter,object847) s_n(object847,1234) –color(object847,black) bullet_off(object847)?
●
Max is an Italian, he is a fearful guy, he had a heart attack, he is still, prone and does not leave a halo if placing a mirror near his mouth
–fearful(max) [0.98] italian(max) –has_heart_attack(max) still(max)
–prone(max) leave_halo(max,mirror)
Rules
●
Norm
●
Whoever causes death to a man is punished with imprisonment for no less than 21 years
–
x:Man, y:Man : causes(x,y,Death)
punishment(x,imprisonment,21,)
Scientific Rules
●To whoever dies due to suffering a heart attack because he was frightened by something, that something caused death by heart attack
● x:Man, y:Man :
frighten(x,y) has_heart_attack(y) dead(y) cause(x,y,DeathByHeartAttack) [0.99]
●If someone triggers a loaded gun he is holding, and a bullet is off, he shot
● x:Man, y:Gun :
hold(x,y) trigger(x,y) loaded(y) bullet_off(y)
shoot(x)
●If a gun shoots, then it was loaded
● x:Gun : bullet_off(x) loaded(x)
Common Sense Rules
●
Whoever shoots, he makes a dull, intense and sudden noise
● x:Man : shoot(x)
y : make_noise(x,y) dull(y) intense(y) sudden(y)
●
Whoever makes an intense and sudden noise, he frightens emotional persons
● x:Man, y:Man : z make_noise(x,z)
intense(z) sudden(z) emotional(y)
frighten(x,y) [0.9]
●
Whoever breaths, he leaves a halo on a mirror
● x:Man : breath(x) leave_halo(x,mirror)
Background Knowledge
●
Irrelevant Information
●Color of Objects
–color/2
●Nationality of people
–italian/1, french/1, english/1, ...
●
Constraints
●Either one triggers a gun, or he carries a cumbersome object, but not both
–trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●It is not possible for one to hold something if he is carrying a cumbersome object
–hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
Ontology
●
Example
Death
DiseaseDeath NaturalDeath ViolentDeath
DeathBy
HeartAttack DeathByGun DeathBy
ColdSteel ... ...
Gun
Rifle ...
Pistol is_a is_a
is_a is_a
is_a is_a is_a
is_a is_a
cause Animal
Man is_a
LivingBeing is_a
max peter
DeathBy Infection
subject_to
instance_of ... instance_of
Colt 1911
Beretta 92
is_a
is_a ...
oggetto847
instance_of ...
Abstraction
●
Irrelevant Information
●
color/2, italian/1
●
Facts
●
hold(peter,object847) s_n(object847,1234)
●
color(object847,black) bullet_off(object847)?
●
fearful(max) [0.98] italian(max)
●
has_heart_attack(max) still(max)
●
prone(max) leave_halo(max,mirror)
Argumentation
●
bullet_off(object847)?
It was in the morning
Jim heard object847 shooting
Jim is deaf
Jim wears a hearing aid
That day Jim forgot to wear it Jim always wears
it on holidays, and it was holiday
That day it was not holiday
In that moment there were fireworks
Argumentation
●
bullet_off(object847)?
●
P = 0.97
It was in the morning
Jim heard object847 shooting
Jim is deaf
Jim wears a hearing aid
That day Jim Jim always wears
it on holidays, and it was holiday
That day it was not holiday
In that moment there were fireworks
Deduction
●
Facts
–
bullet_off(object847) [0.97]
●
Deduction (Ontological)
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
–
bullet_off(object847) [0.97]
●
Deduction (Ontological)
–
object847:Gun
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
–
bullet_off(object847) [0.97]
●
Deduction (Ontological)
–
object847:Gun
●
Rule
–
x:Gun : bullet_off(x) loaded(x)
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
–
bullet_off(object847) [0.97]
●
Deduction (Ontological)
–
object847:Gun
●
Rule
–
x:Gun : bullet_off(x) loaded(x)
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
–
bullet_off(object847) [0.97]
●
Deduction (Ontological)
–
object847:Gun
●
Rule
–
x:Gun : bullet_off(x) loaded(x)
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
–
bullet_off(object847)
●
Deduction (Ontological)
–
object847:Gun
●
Rule
–
x:Gun : bullet_off(x) loaded(x)
●
Deduction (Modus Ponens)
–
loaded(object847) [0.97 x 1.0 = 0.97]
Gun
Pistol is_a Beretta 92
is_a object847
instance_of
Deduction
●
Facts
●
hold(peter,object847) bullet_off(object847) [0.97]
loaded(object847) object847:Gun
●
Deduction (Ontological)
●
peter:Man
●
Rule
●
x:Man, y:Gun :
hold(x,y) trigger(x,y) loaded(y) bullet_off(y)
shoot(x)
● trigger(peter,object847)?
Man
peter instance_of
Abduction
●
Facts
●hold(peter,object847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
●
●
●
Abduction
●
Facts
●hold(peter,oggetto847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
●
●
●
Abduction
●
Facts
●hold(peter,oggetto847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
● carry(peter,CumbersomeObject) [0.99]
●
●
Abduction
●
Facts
●hold(peter,oggetto847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
● carry(peter,CumbersomeObject) [0.99]
●
●
Abduction
●
Facts
●hold(peter,oggetto847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
● carry(peter,CumbersomeObject) [0.99]
● trigger(peter,Gun) [0.97 x 0.99 = 0.96]
●
Abduction
●
Facts
●hold(peter,object847) object847:Gun
●
Constraints
●trigger(x,Gun) XOR carry(x,CumbersomeObject) [0.97]
●hold(x,y) NAND carry(x,CumbersomeObject) [0.99]
●
trigger(peter,object847)?
● carry(peter,CumbersomeObject) [0.99]
●trigger(peter,Gun) [0.97 x 0.99 = 0.96]
●trigger(peter,object847) [0.96]
Deduction
●
Facts
●
peter:Man object847:Gun
impugna(peter,object847) bullet_off(object847) [0.97]
loaded(object847) trigger(peter,object847) [0.96]
●
Rule
●
x:Man, y:Gun :
hold(x,y) trigger(x,y) loaded(y) bullet_off(y)
shoot(x)
●
Deduction (Modus Ponens)
●
shoot(peter) [min(0.96,0.97) x 1.0 = 0.96 x 1.0 = 0.96]
Deduction
●Facts
–peter:Man shoot(peter) [0.96]
●Rule
– x:Man : shoot(x)
y : make_noise(x,y) dull(y) intense(y) sudden(y)
●Deduzione (Modus Ponens)
–make_noise(peter,r32) [0.96] dull(r32) [0.96] intense(r32) [0.96] sudden(r32) [0.96]
● .
–.
● .
–. . –.
.
Deduction
●Facts
–peter:Man shoot(peter) [0.96]
●Rule
– x:Man : shoot(x)
y : make_noise(x,y) dull(y) intense(y) sudden(y)
●Deduzione (Modus Ponens)
–make_noise(peter,r32) [0.96] dull(r32) [0.96] intense(r32) [0.96] sudden(r32) [0.96]
●Deduction (ontological)
–Max:Man
● .
–. . –.
.
Man
max instance_of
Deduction
●Facts
–peter:Man shoot(peter) [0.96]
●Rule
– x:Man : shoot(x)
y : make_noise(x,y) dull(y) intense(y) sudden(y)
●Deduzione (Modus Ponens)
–make_noise(peter,r32) [0.96] dull(r32) [0.96] intense(r32) [0.96] sudden(r32) [0.96]
●Deduction (ontological)
–Max:Man
●Rule
– x:Man, y:Man : z make_noise(x,z) intense(z) sudden(z) emotional(y)
frighten(x,y) [0.9]
–emotional(max)?
Man
max instance_of
Analogy
●
Emotional:
● Animal that can be affected by an entity or event that causes a sensorial or emotional stimulus that it perceives
–emotional(x)
●animal(x)
●perceives(x,y)
●can_be_affected_by(x,z)
●entity_or_event(z)
●causes(z,y)
●stimulus(y)
●sensorial_or_emotional(y)
●
Fearful:
●
Animal that is doubtful or fearful of a possible entity or event characterized by its being dangerous or unpleasant
–fearful(i)
●animal(i)
●doubtful_or_fearful_of(i,j)
●entity_or_event(j)
●possible(j)
●characteristic(j,k)
●dangerous_or_unpleasant(k)
Analogy
●
emotional(x)
●
animal(x)
●
perceives(x,y)
●
can_be_affected_by(x,z)
●
entity_or_event(z)
●
causes(z,y)
●
stimulus(y)
●
sensorial_or_emotional(y)
●
●
fearful(i)
●
animal(i)
●
doubtful_or_fearful_of(i,j)
●
entity_or_event(j)
●
possibile(j)
●
characteristic(j,k)
●
dangerous_or_unpleasant(k)
●
●
Analogy
●
emotional(x)
●
animal(x)
●
perceives(x,y)
●
can_be_affected_by(x,z)
●
entity_or_event(z)
●
causes(z,y)
●
stimulus(y)
●
sensorial_or_emotional(y)
●
●
fearful(i)
●
animal(i)
●
doubtful_or_fearful_of(i,j)
●
entity_or_event(j)
●
possible(j)
●
characteristic(j,k)
●
dangerous_or_unpleasant(k)
●
●
Analogy
●
emotional(x)
●
animal(x)
●
perceives(x,y)
●
can_be_affected_by(x,z)
●
entity_or_event(z)
●
causes(z,y)
●
stimulus(y)
●
sensorial_or_emotional(y)
●
●
fearful(i)
●
animal(i)
●
doubtful_or_fearful_of(i,j)
●
entity_or_event(j)
●
possible(j)
●
characteristic(j,k)
●
dangerous_or_unpleasant(k)
●
●
Analogy
●
emotional(x)
●
animal(x)
●
perceives(x,y)
●
can_be_affected_by(x,z)
●
entity_or_event(z)
●
causes(z,y)
●
stimulus(y)
●
sensorial_or_emotional(y)
●
possible(z)
●
fearful(i)
●
animal(i)
●
doubtful_or_fearful_of(i,j)
●
entity_or_event(j)
●
possible(j)
●
characteristic(j,k)
●
dangerous_or_unpleasant(k)
●
stimulus(i)
●
perceives(i,k)
emotional(x) fearful(i) [0.94]
Deduction
●
Analogy
–fearful(max) [0.98] emotional(max) [0.98 x 0.94 = 0.92]
●
Facts
–peter:Man max:Man
–make_noise(peter,r32) [0.96] intense(r32) [0.96] sudden(r32) [0.96]
●
Rule
– x:Man, y:Man :
z make_noise(x,z) intense(z) sudden(z) emotional(y)
frighten(x,y) [0.9]
●
Deduction (Modus Ponens)
–frighten(peter,max) [min(0.96,0.96,0.96,0.92) x 0.9 = 0.92 x 0.9 = 0.83]
Deduction
●
Facts
●
peter:Man max:Man
●
has_heart_attack(max) frighten(peter,max) [0.83]
●
Rule
●
x:Man, y:Man :
frighten(x,y) has_heart_attack(y) dead(y) cause(x,y,DeathByHeartAttack) [0.99]
●
dead(max)?
Induction
●Observations (about dead persons)
●Aristide is dead: he does not breath, he is supine, he has closed eyes and is still
–dead(Aristide) breath(Aristide) supine(Aristide) eyes(Aristide,closed) still(Aristide)
●Baldovino is dead: he does not breath, he is prone, and is still
–dead(Baldovino) breath(Baldovino) prone(Baldovino) still(Baldovino)
●Cesare is not dead: he breaths, he is not seated and he is still
–dead(Cesare) breath(Cesare) seated(Cesare) still(Cesare)
●Edgardo is dead: he does not breath, he is seated, he has open eyes and he is still
–dead(Edgardo) breath(Edgardo) seated(Edgardo) eyes(Edgardo,open) still(Edgardo)
●Davide is not dead: he does not breath, he is seated, he has open eyes and he is not still
–dead(Davide) breath(Davide) seated(Davide) eyes(Davide,open ) still(Davide)
●
● –
Induction
●Observations (about dead persons)
●Aristide is dead: he does not breath, he is supine, he has closed eyes and is still
–dead(Aristide) breath(Aristide) supine(Aristide) eyes(Aristide,closed) still(Aristide)
●Baldovino is dead: he does not breath, he is prone, and is still
–dead(Baldovino) breath(Baldovino) prone(Baldovino) still(Baldovino)
●Cesare is not dead: he breaths, he is not seated and he is still
–dead(Cesare) breath(Cesare) seated(Cesare) still(Cesare)
●Edgardo is dead: he does not breath, he is seated, he has open eyes and he is still
–dead(Edgardo) breath(Edgardo) seated(Edgardo) eyes(Edgardo,open) still(Edgardo)
●Davide is not dead: he does not breath, he is seated, he has open eyes and he is not still
–dead(Davide) breath(Davide) seated(Davide) eyes(Davide,open ) still(Davide)
● Rule
●Whoever does not breath and is still, he is dead
– x:Man : breath(x) still(x) dead(x) [0.92]
Deduction
●
Facts
●max:Man still(max) leave_halo(max,mirror)
●
Rule
● x:Man : breath(x) still(x) dead(x) [0.92]
●
breath(max)?
● –
● –
●
●
Deduction
●
Facts
●max:Man still(max) leave_halo(max,mirror)
●
Rule
● x:Man : breath(x) still(x) dead(x) [0.92]
●
breath(max)?
● Rule
– x:Man : breath(x) leave_halo(x,mirror)
● Deduction (Modus Tollens)
– breaths(max)
●
●
Deduction
●
Facts
●max:Man still(max) leave_halo(max,mirror)
●
Rule
● x:Man : breath(x) still(x) dead(x) [0.92]
●
breath(max)?
● Rule
– x:Man : breath(x) leave_halo(x,mirror)
● Deduction (Modus Tollens)
– breaths(max)
●
Deduction (Modus Ponens)
● dead(max) [1.0 x 0.92 = 0.92]
Deduction
●
Facts
●
peter:Man max:Man has_heart_attack(max) dead(max) [0.92] frighten(peter,max) [0.83]
●
Rule
●
x:Man, y:Man :
frighten(x,y) has_heart_attack(y) dead(y)
cause(x,y,DeathByHeartAttack) [0.99]
●
Deduction (Modus Ponens)
●
cause(peter,max,DeathByHeartAttack) [min(0.92,0.83) x 0.99 = 0.83 x 0.99 = 0.82]
Deduction
●
Facts
●peter:Man max:Man cause(peter,max,DeatByHeartAttack) [0.82]
●
Rule
● x:Man, y:Man : cause(x,y,Death) punishment(x,imprisonment,21,)
●cause(peter,max,Death)?
●DeathByHeartAttack is_a Death?
●
.
●.
●.
Deduction
●
Facts
●peter:Man max:Man cause(peter,max,DeatByHeartAttack) [0.82]
●
Rule
● x:Man, y:Man : cause(x,y,Death) punishment(x,imprisonment,21,)
●cause(peter,max,Death)?
●DeathByHeartAttack is_a Death?
●
Deduction (Ontological)
●DeathByHeartAttack:Death
●causes(peter,max,Death) [0.82]
Death
DeathByDisease
DeathBy HeartAttack
is_a
is_a
Deduction
●
Facts
●
peter:Man max:Man cause(peter,max,Death) [0.82]
●
Rule
●
x:Man, y:Man : cause(x,y,Death)
punishment(x,imprisonment,21,)
●
Deduction (Subsumption of the fact into the premises)
●