Knowledge based Agents:
1. Knowledge-based agents are those agents who have the capability of maintaining an internal state
of knowledge, reason over that knowledge, update their knowledge after observations and take
actions. These agents can represent the world with some formal representation and act
intelligently.
2. Knowledge-based agents are composed of two main parts:
a. Knowledge-base: Knowledge-base is a central component of a knowledge-based agent, it is also
known as KB. It is a collection of sentences. These sentences are expressed in a language which
is called a knowledge representation language. The Knowledge-base of KBA stores fact about
the world.
b. Inference system: Inference means deriving new sentences from old. Inference system allows
us to add a new sentence to the knowledge base. Inference system applies logical rules to the
KB to deduce new information. Inference system generates new facts so that an agent can
update the KB. An inference system works mainly in two rules which are given as:
Forward chaining and backward chaining
3. Operations Performed by KBA:
TELL: This operation tells the knowledge base what it perceives from the environment.
ASK: This operation asks the knowledge base what action it should perform.
Perform: It performs the selected action.
4.
5. Diagram:
Propositional Logic:
Refer PPT
Steps for conversion of PL/FOL statement into CNF:
1. Apply double implication formula and remove it.
2. Apply implication formula and remove it.
3. Move negation inwards.
4. Rename variables.
5. Replace existential quantifier by skolem constant.
6. Drop universal quantifier.
For problems, refer class notes.
Predicate Logic/First Order Logic/FOL:
Refer PPT.
For problems, refer class notes.
Inference Rules for FOL:
Refer PPT.
Resolution:
Resolution is a theorem proving technique that proceeds by building refutation proofs, i.e., proofs by
contradictions. Resolution is used, if there are various statements are given, and we need to prove a
conclusion of those statements.
Steps:
1. Negate statement to be proved.
2. Convert given facts into FOL.
3. Convert FOL into CNF.
4. Draw Resolution graph.
For problems, refer class notes.
Forward chaining:
1. Forward chaining is also known as a forward deduction or forward reasoning method when using an
inference engine.
2. Forward chaining is a form of reasoning which start with atomic sentences in the knowledge base
and applies inference rules (Modus Ponens) in the forward direction to extract more data until a
goal is reached.
3. The Forward-chaining algorithm starts from known facts, triggers all rules whose premises are
satisfied, and add their conclusion to the known facts. This process repeats until the problem is
solved.
4. Properties of Forward-Chaining:
o It is a down-up approach, as it moves from bottom to top.
o It is a process of making a conclusion based on known facts or data, by starting from the initial
state and reaches the goal state.
o Forward-chaining approach is also called as data-driven as we reach to the goal using available
data.
o Forward -chaining approach is commonly used in the expert system, such as CLIPS, business,
and production rule systems.
Backward chaining:
1. Backward-chaining is also known as a backward deduction or backward reasoning method when
using an inference engine.
2. A backward chaining algorithm is a form of reasoning, which starts with the goal and works
backward, chaining through rules to find known facts that support the goal.
3. Properties of backward chaining:
o It is known as a top-down approach.
o Backward-chaining is based on modus ponens inference rule.
o In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts true.
o It is called a goal-driven approach, as a list of goals decides which rules are selected and used.
o Backward -chaining algorithm is used in game theory, automated theorem proving tools,
inference engines, proof assistants, and various AI applications.
o The backward-chaining method mostly used a depth-first search strategy for proof.
elasSmAte
Date
heo Page
FoL :First Order Sernant
Compl sesry- sU OLp AT Papers
se called redicade Logic
o
1S more CXpressive han Propksibiana Loie
Eavireomeo NaournLa esbjsl
Uses (1he Erlis
described
1S- Fcts /oblds/
Relacbios
HoLD (TRUE) or Nar (Fdse)
rOpasSioon
Lic Facts
9t is baseo Y
lap-of Propasiiora
Logic
Hipe Order c Supparts ernpar
Storrodsio
was Remina túeen Hp 8p
yntax Fo
Syrod
, A,V, ,
erS
Uners a Guaifier (For ALL)
TorAl
xist Garifer
There Exists XSueh thet
Fyvalby
Page
Fvery beo is
Samcme S
Al ser abe 4teip
xSdentX) Intelligens
A l l sderts learnirq RAI a r e
intelliger
A LearnsX, RAI)
Everyhe likes Jce-cre
LkesXTce-crs
:33
KepreseM Flire Sentshces n fOL
(6Jamès father ishar vied
Johan's Mother
MasyedFerof (James ), Matherof (kinJol
33yFaderof (x,J..A Mobof (y, kad Jat
Haed (y, y)
clASSMAte
Date
perd of y Page
for all x ord al A isparet OT
then et x
chil x
adro do
(8hes There is Ser ome
x yy LavedB, (X]= ¥,loesx)
R
( There ig uohs oe not ke
'
e-Neake
E LkerX Te -cream
Spot hes ateatbu sisters
x 3ySister (X, Spat) A Sisber (y Spot
P
P P
elasSMAt
ate
T VIVP P Page
Wel I Me ardy I don't
ike Sahl y
LheI Snoy) (L, Sanchy
1 Ce maye Owtburst Cho is
Contem Court
Out burst ( CortmptOf(court
Otbuest(x= [Link] CCnurt
NCTE fer Fxistsnvtd uher
Avoic
fer
Umplicatins
Cniticaki
Jicei s a procerr oShrtih
OverSaA aunbtiees
Da verr anb1ier is for ALL
ny Can be sbudie m
oore
Corsicder Cxample
AlL Gveedly ings ctre EviA
Kng x)Are,()
(wi
rell. elasSMAte
A Date
Poge-
S
t STEP 1 ps Fol
VCat (K) Fh)
Co)A ir,YE
STEP2 Convert CNF
at(X)V Liles x,Fch)
2 (cat(x) a Likes(y)) y Ets)
c d () vLikes(X,Y y Eat (L.
STEP3 Sel Resaloan
start Costradictier
oe Not Eat Fih'
Es(ig4 Fsh
cd yilik )VEl
YLit(ZiaayeovLikas,F
elAssMAte
Dote
Page
Sin ce
Xausee t means
hol COrrec
ence ents Fishis p
rward&
Backrar Ghaiina
EEct iaa1Fohl
cigaLkes Fsb
Li es
igzy, Fch
Fat
Mort req vetiy asked E
AI-20Mark
Aostly, COmpusar
63/ crto 12/
Cansicer sttme
a) n Et tood
(2 hppleisfOod
Breco i s c
Arnything Omy ne
is hot
lari Ects Peanuls is s t l Alie
l tds hylhina t ti ats
elassMAte
Date
Page
CN
STEP runc lb in FoL
ocel (x Tats (John)
Fao (Apre
F Breas
TyFds(x)AkMox)
Ets(Hari,Petanudts) Akued(Hari
EatsHarix Eats(B:l,x)
STEP 2 Convert in CNF
eco Fee (x) V Ead Jechr, X)
foc Bread
1
H a r i PerkRebs
ule (Hari)
Es(tori,x) [Link] I1x
alasSMAte
Date
Page-
Phorf Re es
start h Corndnion
hn
oes otEzb Peanu
1EdsJohl Pec
Peant)
Ets(k,peukVkalled(X|Ets(Hari, Pan
XH
l Har i
Emp Couse
Since
Our m ien
C recW Hende JoHn eat
S Draved
S, wef e n
lasSmAt
Mat Te es tiom Date
Page
Y
OM
Page-
32
Ea 29Grks
The Law Sas that
i s is a crirme o r ah_American
t o s e l l weapanS tHorile Notíons
(2 Nono is Rh nemy ot Ahnerica
(3Normo has Seme Missiles
AlL of it missileswere Sld by
Colonel West
Colane Wet is American
Dsing
UsinaMous ne
West s
Prave that
Criminal:
Colone
Expre in foL
SetlLeopt
x,, Aneri can(XA Weapa
A Sells Xy, E)
AHassle
Crimirel(x
EnerayNone,Armeeica
x Misale)/Ouns Nono, X,
x Missile x) A Oun (Nans, X
American( \Wes t
SellsWectX,Nons
Wcapons re scie Mígsiles are Weapo
V Misiex) Weego
themy oAmerica is Hastle
6
x EnemyXAmerica HosbleX
R i , i , Atoh-5 ses et India claSSMAt
Date
Page
AneicAn(X V WencnY)V Hortle(z)y
1scll(XN Ciinad
( Ene ono Aoerica
s s íle MI) w n s None MI
hisshle (x).V-Owns Hore ) V
sls(wertXNaad
S|serica West)
issle X)V Wepo(X)
Enemyx Aneticg) V Hostile /c
Reder
27
7 Crineina(Wet