CSE-4103 Artificial Intelligence: Unification
CSE-4103 Artificial Intelligence: Unification
Artificial Intelligence
Unification
LECTURER
CONTACT:
[email protected]
Reference Book 2
Rule1: A variable that is free will unify with any term that satisfies the
preceding conditions. After unification, the variable is bound to the value of
the term.
Unification Cont.
/* A simple prolog program */
4
domains
name= symbol Goal: man(socrates)
Yes
predicates Goal: mortal(socrates)
man(name) Yes
mortal(name)
clauses
man(socrates).
mortal(X):-
man(X).
Rule 2: A constant can unify with itself or any free variable. If the constant is
unified with a variable, the variable will be bound to the value of the
constant.
Unification Cont.
domains
5
name=symbol
Predicates
parent(name, name)
mother(name, name)
female(jane).
mother(X, Y):-
parent(X, Y),
female(X).
Rule 3: A free variable will unify with any other free variable. After unifying,
the two variable will act as one. If one of the variable becomes bound, the
other will be bound to the same value.
Summary
6