0% found this document useful (0 votes)
45 views113 pages

Understanding Artificial Intelligence

This document discusses the foundations of artificial intelligence and influential areas. It notes that AI is now used in many sectors of society and has changed how people work and live. Key areas that provide the basis for AI include neuroscience, which provides insights into symbolic and cognitive intelligence, as well as mathematics, statistics, and philosophy. The future relationship between humans and machines will see the gap between our intelligence diminish as people leverage both formal and informal knowledge to continue advancing AI technologies.

Uploaded by

2021cs086
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views113 pages

Understanding Artificial Intelligence

This document discusses the foundations of artificial intelligence and influential areas. It notes that AI is now used in many sectors of society and has changed how people work and live. Key areas that provide the basis for AI include neuroscience, which provides insights into symbolic and cognitive intelligence, as well as mathematics, statistics, and philosophy. The future relationship between humans and machines will see the gap between our intelligence diminish as people leverage both formal and informal knowledge to continue advancing AI technologies.

Uploaded by

2021cs086
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction -

General 3010812021

we are in an era of
intelligent Machines ( 1950s)

Here Natural
we model
intelligence into machines
understand and built machines
intelligence intelligent
This area is named as Artificial intelligence (AI )

AI is science and
Engineering to build intelligent machines

AI has into all sectors of the


society
gone

Nowadays people cannot live without AI

AI has the work and live


changed way people

AI is the fuel for the 4th in industrial revolution


1st steam engine

2nd →
Electricity
3rd → Electronics
Introduction - Academic

AI solves problems that could not be solved otherwise



Any problem can be solved
by AI

Problem solving needs knowledge / theory and/or Data

AI can model both knowledge and data

Neuroscience provides basis for AI


a
strong
based (symbol :c AI )
Logical analytical
/ intelligence
Artificial cognitive intelligence
based intelligence
Training -
Introduction - industry

solutions

any problem has multiple Alphago ( Games


like in medical
systems

This area is
dangerous
control
Autonomous →
beyond our

you need to know academic , industrial etc perception


Introduction - enthusiasm for AI

✗ CONC 1984 ) → used to configure mini -

computers

execute entire Gulf


Expert system
-
war

Rover Explores unknown enut of mars


showed of AI
power
{first
Defeated
time
grand
machine
master of chess
defeated a human

.

Answering
of
any question CA Cst ML )
No states
power of

large demonstrated
.

very over
training rules CML
,

→ )
autonomy in technology ( NL)
self / trucks ( NL )

driving cars


citizenship in Saudi Arabia ( Acs
work hub
→ as a to contra

In the future the


gap between man and the machine
will be diminished
Any has Power Control
technology &

Tech Power Control

Electricity Human
Technology
Automobile Human
Technology
' ' "
- - - - -
-

AI Technology Technology
In AI both power
and control are built into technology
itself That is
why autonomy
-

Nature of knowledge


Experiment based -
decisions

→ No experiment ( No
labotary tests ) =)

← →

Algebra Geometry

( Profit , durability / appearance , weight , shape )

( even without a science )

y
Engineering
CA , MIE ,
T )
Fath ↳
technology
be Éausepeople can use both formal & informal knowledge .

if people C-nature ) can do , so do AI

People have implemented natural


so that AI is not a dream

Mellon
Carnegie

AI Dream or reality

Walking Vision

Thinking
06/09/2021

Foundation of AI -
Influential areas

Philosophy ( 428 Bc )
real simulation / body mind / life death / knowledge
-
-
-

intelligence
Mathematics and Statistics ( 800 )

Algebra / Geometry
-

Formal representation of knowledge

Economics ( 1776 -
) -

Effective use
of resources / profit

Neuroscience ( 1861 )
-

structure and function of Brain

( 1887 )
Psychology -
Mental health

computer science -

Algorithms , Data structures .


etc

to do
computer engineering ( 1940-1 -

Machine
coding
control
theory and cybernetics

_______→→-oa¥0BMÉg-T
[Link]#.-------

what the [Link] among those


is most area

in

1ht computer
>
Neuro
past
science

science

for AI

line between man and


machine is
diminishing

Major areas of AI
÷
i.

q
-

µ Training
-
Based

µ
if-o-&__
Nowadays some AI tech for real world problems
modelled artificial cognitive systems
can be
by
are

For example natural


language processing can

be modelled by rules as well as


training

GARAGE
¥
i

Foregoes&
r

( Es is the
champion of
Artificial
cog systems )

--s_
Model of human brain with
neurons and connections
( 100 billion neurons )
ANN the
champion of
*
is

machine
-

from
learning
* Learn
with
non
algorithm :c situation
noisy incomplete , partial data
( handwritten distorted
images
)
,
unclear
.

* when ANN is trained images


for certain
purpose , it cannot be used for another
purpose

Eg motor Not
bike [Link]
for cars

*
signature recognition ,
training
wheather forecasting ,

self
driving cars - face recognition .

games
C
Alphago )
Limitations -

ANN cannot explains re sons for solutions


Require large

can
you
dev an ANN for Tra c control ANN
If we have a
very large data set
covering
data under all
possibilities [ weekdays
lunchtime bad weather
morning , evening , , ,

accident conditions /

It is not
good for dynamically changing
situations
Genetic Algorithm
rtA-g-
aA_€f
gents f⑥gg@tFot chromosome
biological systems
and

F1 1=2 1=3 1--4


MI M2 M3 M4

Biological crossover

FI
→ MI swapping
Mutation
'

M becomes M1

cloning M1 copied as Mt

records of what we have B D T Y BP TY


→ crossover
R P M o
Mutation followed by cross - over generate
solutions that accommodate a
change
model
GA can
dynamically changing situations
→ foundation for
P
'
R MO P' →
chicken

Discovery of DNA is second only to computers

Multi agent systems


Tindingastudent
- -

hame

Algorithm - ask
everyone
their

Message
'

ask name
by

saying
-

Passing
Multi ideas
agent change eventually with new

data
about 15 -
20 items

13 09 2021

No need an exact solution


some 9 Sml 10 4 mt
18C s 17.6 19
4m s 3.8 4.3m
7kg s

Not an ML solution
Fuzzy Logic
NLP

have intelligence
fragmeted
sentences
read English and
convert to sinhala

There are 10 balls in box A and 12 balls in


box B Saman has taken 3 balls from A
and he kept a with him and other one is
added to A

Turing Test
How we decide whether a
machine is intelligent

In exam
you get
question
Depending on
Question is asked
with whom the machine
compared machine
is
could be intelligent
or not
y differs from each other

using the turing test


Describe that simple calculator is an intelligent
machine
ask to 321 745 from both 3Yochusty
Ex 2

Prof English 7ms word


T Rephrase the following x
paragraph

Turing test example


Questioner
Standard Turing test is limited to'keyboa
input

since turing test primarily limited to keyboa


is

Input we should
improve input mechanism for
turing test with voice images media vid
computer vision
we
cannot ask by giving a
objects

Nowadays TT are improved with image


processing NLP computer vision etc

Total Turing Test


TT competition

For
many decades there turing test
were
the best intelligent
competitions to identify
Sw that can pass the turing test
Loebner Prize is such popular one

Many chatbots have passed the turing test


other programs like IBM Watson Deepblue
could pass the turing test

HW
True False
All intelligent programs may not pass the
turing test

Yes provided that turing test can be designed as


follows
It depends on the question you asks and
who the machine with
you compares

can consider Abacus as an intelligent


you
machine
It is not intelligent because it cannot
process alone or do calculations by itself

John Searles chinese room argument

Assume that a person in a room is sitting


with a book with English and corresponding
wth a boot I t hgl d i dy
Chinese translation in the next page
Assume this man doesn't know Chinese or
english But if give a card
a
person
containing an unique phrase that man
go through the big book and produce
the Chinese translation of that page
but this person doesnt know Chi or Eng
but simply
using symbolic manipulation
can we consider him as Intelligent

This person manipulates symbols w o


knowing
what the
symbols mean not aware
We
might say He is not intelligent
but the computer is also doing symbolic
do manipulation
w o being aware of what they are
computer also cannot be intelligent
According to Thon searl if a person or
machine do something
by knowing what it
does then only it is intelligent
If John Searl's arg is
correct most humans
are not intelligent
Chinese room argument
Being aware is mindfulness

when a machine can do something why bother


asking wheather the machine did it by
or Not
knowing it

Yes
can aircraft fly its a
game

I
of word

Can submarine swim No

Our understanding of the intelligent word is


not matured

There is single definition for AI there


no are

multiple views of intelligent machines

Mutiple views
energizes a
subject area Eg
1
In buddha's time
there were 62 views
on life after death
against Atom 3 views
dalton atomcannot
be brokendow

AlbertEinstein

Schrodinger
Four schools of thought
Acting Humanly
According to this view objective for AI to
built machines that behave like humans
Oldest idea of AI
Eg Expert systems a in this nature even turing
test is about machine behaving like a
human

Thinking Humanly
According to this view AI attempts to build
machines to think like humans we know
many intelligent tasks thinking is involved
Eg Problem solving gameplay Theorem proves
or
Thinking requires awareness knowing
since we alteady have thinking machines
This disputes John Searle's argument

Thinking Rationally Logically


According to this view I want to
dev machines that can THINK logically
there are
many programs where logic has implement
intelligence
Acting rationally
here AI wants to build a machine
that can do the rightthing here right
stands for most appropriate affordable
actions Building the machine that can do
the right thing but not necessarily
behaving acting like human or thinking
logically No busses t heavy rain
Example waiting for bus

Lecture fire inside


practical
Gut most
ti
Break window and jump

when
yo design a humanoid robot to look after a baby
Baby obviously that robot should be a
acting rationally entity
Ex assume that robo
gave
a bath to the baby
also gave milk then change the cloths
dotes
Logically now baby should sleep But incase
baby is crying how can the robot make thebaby
sleep robo can play lalabay Rational
Activity
AI is
going to be rational agent
do the right thing
De nition of AI
27 09 2021

History of AI

utiluenciale
invention
Marvin
fathers of AI I
early 19505
proposal for different subject
for intelligent machines
area
where Minsky was I
IInford
CMU
said Intelligent is
IBM
Tog c based
minsky said intelligent
but
logicbased but
is not only
also anti logic based
said Ann a useless concept
pepe gave up for nearly 25 years

Farly AT systems happen to very much algorithmic


Ibe
[Link] be me
go h
gym
m mm very
based
After world war I lots of enthusiasm to
discover knowlegde
Curiosity about intelligent machines

Search as major approach to model intelligence


Because realize the fact the search requires
people
Intelligence first approach
unless a the
Turing Test it
program pass
cannot be considered as an intelligent
program Justify your
answer

statement is false any program that canimpleman


intelligent feature such as learning object
detection decision making is an
intelligent
program But passing taring test is an
additional feature
knowledge based systems
People realised knowledge as main ingredient of intelligence

knowledge everywhere learning books papers


is
Modellingthe knowledge instead of intelligence very practical
area of knowledge representation came as an
approach to AI and approach
under knowledge modeling many symbolic AI

programs were developed


Gestation of AI

Birth of AI

knowledge based systems

AI becomes an
industry

failure
with back propagation algorithm 2
the of ML
Turning point in area

AI As a science
1990s

Intelligent Agent

long time to win industry recognition


Due to military funding results of AI
were secrets and unknown
Projects military
to general public AI base weapons could not
be tested since no war after WWI
W

since AI was not a until 1990s


science

people could not trust the power of AI

People also had fear about AI Because AI


has built power and control within AI itself
The state of the ART

Driverless vehicles
Deep blue Dart
and has been highly

recognized in early developments of AI


All are symbolic based artificial cognitive
solutions

Latest developments of AI like Alphago watson GAsist


re Based on the power of ML Non symbolic AI
More importantly they are NLP Based solutions
after symbolic AI based NLD Based solutions
ELIZA 960s
Note that in last a decades due to internet
based online transactions large volumes of data
dynamically changing data noisy data and
incompete data made the entire world rather
unstructured and non
algorithmic so
symbolic
Igor th ie
g
A I Could not model them but ML was able
to do so
latest developments

put a energy to
John McCharthy logic based thinking

when McCharthy was promoting logic based


Intelligence which universities may have
joined with such development
→ Carnegie Mellon University → he came from
there
IBM Watson , why watson - he was in the
team of Deep Blue
( as Respect)

Emerging trends
travelagent
i Agent based mideling
Capturing results
of
mental activities through EEG Brain computer interface
capture EEG when solving mathProblem
build an ANN
Nerons are in all organs
Kevin

Brains with AI chips Elon Musk

2 questions

Agent Technology
g gy
4 10 2021

This is closer to as classes objects


writing programs
understanding agent
Policeman
Travel
suppose youmeet y

I assume

but heknows them


someclient
ilienty
challenge
some characteristics of Agents

situatedness works in specific environment


a

A dog is
living in relation to a particular
house and land
work for a master
your dog does not work
for the neighbor
A dog listen only for one person family

Autonomous work with littel zero instruction self driving


when somebody enter your premises Dog barks

Consume less resources less facilities less CPUmemory


No special food live outside the home
No separate TV Washing machine

Create on request execute and disappear


like printer driver
when burglar come dog wake up bark get family
members attention then stop barking
Not working blind no matter whatonagent is
manner working
Adaptivity
Proactive no instruction Reactive prior of misfit
I C 1 Ion Reactive Cl ily
Proactive Time to time dog walks around the house
reactive when master call the dog th stop
chasing
learning
7
dog become friendly with a visitor

some agents are able to move for the tasks


assigned
Dog can walk within house and garden

Interact or sociability cooperate coordinate negotiate

Exercise G

2 questions from lectures conducted upto here


Search Local search
I Informed
uninformed
search
search problem solving agents
In real life we are looking for something
Turn garbage
into electricity

Problem Solving

Problem solving as a process of transforming


a set of state through actions operations

51 on table disk drop 52 on floor disk

314 513 2 3
State Space

State Space consists of all possible States together


with actions to solve the problem
States represented nodes while actions ar
arcs
are
by
by
state can be a
tree or a
graph
space
state space has
an initial state as well as

goal state s

Draw the state


space

If
right

I
I
u

loop loop

PAP
If
start node to the node some of these paths are
I I th node som of these paths a e

shorter and others is lower

Water Problem
Jug
Two
jugs with 31 and 51 mark on them You
want to get exactly water for this purpose Note
that initially both are empty o.o what we

need is Clix
we denote the space ordered pair re y
using
Initial state 0,0
Goal state Cl x
q
o o
3,0
015
3,5
010 o 3 315
oop 3,5 312 010
3,0 0,5 010
loop loop 100
3,3 3,0 0,0
loop
I s

FWGC
Farmer wolf goat and cabbage Fwac

initial FWGCB C
state
Goal state I FWGCB

d
farmer and one more
item
FWGCB

WGC FB GC FBW WG FBC WG FBC


t t t as
FW GCB LFBGCW FWGCB EBWGE IFBwa
loop loop
HW 1111012021

8 Puzzle

Search some real world applications


come up with own
examples
Route finding on
map well known
a

salesman concept
Traveling
Circuit VLSI layout design
design
Automatic assembling A J

Exercise Draw a state space for preparing a

Cup of tea
water

É É Hot Tea
cap
Milk tea
t
Milk
µ
sugar
1
Milk sugar
Tea

Search algorithms
since state space is
very large in general we need
algorithms to explore the state space effectively

A search algorithm define


from initial houffgfindapatt
state to goal
All algorithm tell how to mover from the
current node to next node
some algorithms provide just systematic ways to
explore the state space while others tell how to
explore effectly and efficiently
In implementing search It is easy to handle two
lists as
OPEN node to be visited fringe
CLOSED node already visited
Evaluating search algorithms

How to evale
There are 4 Criteria

Completeness
ability to find a solution when there is a solution

Optimality
There are than one solution Optimal is
more

ability to find the highest quality solution

Time Complexity
How long the algorithm takes to process the
nodes Cpo time taken Execution time of algo

Space Complexity
how much memory is used to store nodes

Search Strategies

Uninformed search blind search


only systematic way to explore a state space
a

No information uninformed to explore effectively


There are six
algorithms
g

Informed Search Heuristic Search


Based on additional information
search is not
only systematic
but also effective
give some additional information
Two main search algorithms
why search
To find the path from the initial state to
stat
goal
state space
Breadth first search
Explose the state space layer by layer
Algorithm using OPEN and CLOSE lists

Exercise

00

Except for goal node

open S close
CS
ARG
ARG Dp SH
AGDPUVW SAR
GDPUVW SARGI Stop
Traversal

when explose a node children are always added to


end of the open list
where is the traversal in closed list

where total number of nodes stored in the memory


Total from open t close space complexity
Where the computer the nodes
process
Note that after detecting the goal node began
that point nodes in the open list are not
processed for their children and remove from
the list and putting into closed list
BFS
start
Put 5 in OPEN
If OPEN empty fails
Get children of Top node on and put them at th
end of OPEN
If n goal remove Top node and add to
CLOSED list and stop
Else remove
top node and add to CLOSE
list and return to step 4

we have many algorithms depending on where w


insert the children note into the open list
It could be infront at the end or some the
midpoint
Features BFS
since state space is explored layer by layer if there
is a solution it should found Therefore EFS comple
BFS is optimal because shallower level goal is found
before finding a at a deeper level
goal
found
when
goal node is

Space Complexity
consider a free of branching factor b 3
30 t
3 o f g
000
32 000 000

Nodes at level lab level 2 5 level 3 63


If the goal is at depth d
extent for the goal needs
Thus total
Y'and
L no
gyve
of nodes stored in memory whengoa

bt b t b t bd b bt b o bdf1
Although the memory contains nodes from the btl
level we do not process beyond the level b
time complexity is of order of bd

consider that state space with b lo is explore


machine that nodes second
by a process co ooo

and use 1000


bytes node to stove in the
memory

b3tb2

According to these figures for a state space


goal node found at node depth 8 31 hours
is required but memory requirement is ITB
although time complexity is manageable space
complexity or memory req is unbearable
However if the depth is something like 12
even time req 35 is not affordabl
years
Exercise
00

open ST close
ARG 5

ARG DP JCRnotincluded SA
Repeatnodenotincluded

Uniform Cost Search


Like BFS but
Expand the lowest cost node rather than
lowest depth node
Note that each time total cost must
be considered
Each node has a total cost associated
Traversal as it is not the path
Traversal

this case
Path 512213 465 gas
s In

so
open o Cif
RZA 365 S

R2A3V4 GS WS UG S R2

V4G5PSWSUGDG SRLA3
VXG5P5W5U6D6 5122173 V4
G5P5W5U6DG S R2 AS V4 GS
stop
65 GG

sames as BFS
but consider cost

Features of Uniform cost search


each

same as BFS
Depth First Search 1811012021

Explose state space along a branch deep in

Algorithm using OPEN and CLOSE


Example
5
A R GI

D P U V W M Q

E 62

open
53 Close L
A RGA 5 5
DPA RGI SA
add to IPRGI SAD
From E GE P ARGI SAD P
E 62 t R GI SAD PE

tr Gt SAD PEG
FEE
Traversal SADPEGZ
I
O

z
G s
when get the goal node at
we
3rd level the number of nodes
BFS UCS
in the memory2 2 2 23 6
Tevels
BF

Not complete
If there is a the leftmost branch even
loop in
if we find the goal in the right we might
miss it we
might miss it
Not optimal
since identifies deeper level goal nodes
Dfs
before shallow level goal nodes DFS
is not optimal

space complexity of DFS is lessthan BFS

Time complexity o Cbd


Assume is at the far end of the
goal
right most branch at level d Then all
nodes must be visited
In special cases DFS can be complete and optimal
for instance if one node is at a shallower
level on the left hand side branch othergoa
nodes are at a deeper level on the RHS
branch
BFS complete and optimal but space complexity is big

DFS not complete optimal but space complexity is low


since DFS is much appreciated therefore
very
some to DFS has been introduce
expansion
a
one expansion

Depth limited search


assume I will search until level 73
Define a depth limit for searching say 3
Then execute first
depth search up to 3rd
level and try for the goal to deptFs
Exam Example
By chance even if there is a loop below level
3 it
avoided is
depth
you might
or
might not find at a given
limit

IDS
2 3
1

11 21 31
[Link]
Execute Des Int times
I that fail I search upto level 2 E3visited
a level

shallower level visited more than once a


Isn't It wasteful
No surprisingly it is better than DFS
How
we assume that when
the goal node is at level
d then total node In node
using IDs
then you have explored upto level d I time
dd amount level above Ctd l ax explored

fist level visited d times and level d l time

IDS vs BFS
Id
because
G Node at partc level

Because bdt in the nodes for BFS this


amount bd
is
very large when comparing with
in the nodes IDs
using
No of by BFS is larger than
nodes explored
no of nodes explored by IDS less memory

Depth limited
Iteratively increase Deapth
IDs is possible to find
whytoptimal complete agree or
disagree
If you found 1st in gto to 2nd if not find
No
go to 2nd level
IDs ispossibleto find answer in first level
NODE at shallow
goal a

level w o
going to a deeper level
I g g i e

d z

depth

da

If the forward dirn search process to P while


goes
backward dir
goes from
search process GI top
there will be a path connecting S G

one issue with thisis the backward search if


in

there are more than one parent node for a


given
particular node then backward journey will be
undecided

knowingthat abt ca bd the time complexity


would be order of o bd's

both space and time complexity of this algorithm


are o bdl
when the
should also be stored in the memory
IDS VS BFS

Explain why space complexity of BFS is of o bdH


when goal node is at level d children at level d
should be also stored except goal node

when
space complexity of Bfs is of bdt why
time is o bats
complexity

They never process for


search
Depth
bidirectional

why BDS is bett

Explore only Ya of the state space


I

have
Ifgoatnod
all
good
features

Among the Blind search algorithms


IDs is the best because
it is
complete optimal and space complexity is
o Cbm while time complexity o bd
similar to that of others however IDs
may not best If BDS has no issue
of multiple statement I
Exercise
1 Bidirectional Depth Search

What is the best blind search algorithm


Justify your answer
Informed Search

Additionalinformation are used to make the search


more efficient these additional informations are
called heuristics they are not
common information
experience like for examp
Ex when
you find route from cmb to Bticolo
a

heuristics could be the traffic level


weekdays Teekend

3
places Colombo

Negombo Ratnapura Galle

straight line distance to Goal Node is considers


I g I I o d s
Fristics
InInformed seach we define an evaluation fane
fan
which asses the children node to decide on
which path to go

Yestietheage

s I
a

In this problem lets consider hueristic function heal


as the straight line distance From bucarest to
other cities
Implement by priority que

DFS BFS
Informed combination

fan is considered
hens
greedy search
as in

consider straight
this line
distances
Values
Arad 0 366 366

Sibiu Timisoara Zerind


393 140 253
253 329 374

Arad Oradea Riminica


Fagaras
366 176 380 Ville a
193

Sibiu Bucharest Terminate algo


253 o goal reached

Traversal Arad Sibiu Fagaras Bucharest


length of the path by greedy search 140 99 211 450

path is also
same
ie cost Note that greedy search
is not complete of
Is not optimal

Iasi 100

Neantaslai no

aka stuck
in loop

feamt Jasta 110

Due to loop in LH branch of the leaf Even


though there is a path now it cannot be directed

Greedy is not complete

stack lo
Not optimal In some cases in
cost already
incurred

greedy
u

Extension to greedy search


L

ph o Not travelled
g

cost goal
from
initial

lowest

Towest
lowest

wereached
bucharest with

fan 418
Which is the lowest

stop algo

optimal
we reach bucarest with fan 418 which is the

Traversal Arad Sibiu Rimnica Fagards Petesti


Bucharest
Path Arad Sibiu Bimnica Fagaras Petesti Bucharest
shortest path Optimal
open close
Arad I
Exercise s
HIW
consider travelling from las to fagaras in the
greedy search example illustrate how A
address the issue of completeness in Greedy
Search
2511012021

In do not need the path


certain realworld problems we

with steps reaching the goal node this means


when
you are at a particular point you cannot
asses steps instead
many
can see only
you
one level of options
o vel of pl n

when people are


doing hill climbing at a
given
movement best option for the next level will

jiffy'd Tooking at the options in the local area

Adversarial Search
In general multiplayer games are comming underthis

this
in kind of search when person want to
decide on next move he look for an option
that maximize his
winning
chance while
minimizing the winningof opponent

In order plan
to the search process a

should be able to visualise


player
ahead
many steps
utility
value

suppose player A visualise 3 options for him


in a current
try and he noticed opportunitie

created for the opponent in his trial


this manner A also visualize
in
utility
values for him after the turn of the
opponent

when the furn start A can visualise only these


utility values to make a decision assume
In his 2nd turn A can visualise utilities
as shown in the following figure
while maximizing in in state space

2
3 y

48 Et
JB BO BO IB

There are two players as A and B Then visualize


two steps ahead of him and noted utilities
3112,4 2,4 14 5,2 available to him in the
second turn
Now A thinks backwards on the utilities while
maxmzing in his turn and minimizing in opponents space

Assignment search algorithm

take realworld example in Svilankan context

End of Search
knowledge Representation

comprehensive

drawing conclusion

Examples Types of knowledge

what to do
Major Knowledge Representation Techniques

Logical Representation
Procedural Representation Rule based
Network Representation
Structured Representation R

Logical KR are
comming under symbolic AI

Logical Representation
is the oldest form
Logic of knowledge representation

Major Knowledge Representation Techniques


There are
many versions of logic
classical logic four fold logic fuzzy logic model logic
temporal logic international logic multi valued logic
Propositional and Predicate logic under classical logic
Precise in representation and sowerful in
symbolic is
reasoning
This is why logic used in
Mathematics proofs
Science Justifications
Court of Law for arguments can logic surface truth

Due to these features logic has beenused in these areas

Logic
g
A formal symbolic system for describing knowledge
Logic is a
language
Logic deals with
Lexicon statements

Syntan grammar
semantics meaning
Inference reasoning conclusion mechanism

Logic offers the strongest methods of reasoning


Aristotle susie is the father of Classical western log c

Propositional Logic Lexicon and syntax

Proposition is a statement sentence which is true or


false

symbols su ent
propositions

n Cand
equi

Parentheses fences

P Q AR
Eg
P s QAR
C
Propositional Logic - Semantics (Meaning)

Examples
P Q if a p or P Q

Gpra R

True
False

Tue assignment P F and Q T makes interpreter


T for PVQ

Tautology
I 7

OF T T
F T
T T
T T
all true

Contradiction

opposite of Tautology

Equivalence
Premises conclusion

e
If one of premises is wrong
Algebra for Logic
A Btc AB t AC
Ato A
A
A 1

numbers sets
Algebra in compilers digital logic
is used to simplify expressions

we also use algebra to simplify expressions


Equivalencies
Inference rules

using
Equivalences
write instead of
dude
fo

Inference Rules
Logical Equivalences

d
a f e
RHS form a tautology that means unde

fun
all assignments
an
the
name
interpretation for
age me

F is true
If you do not define F
the equilencies will not be making
tautologies
that we can replace an identicalthings
we can replace something identical by another
identical thing
If this is not the case something

KR technique

I
Reasoning in Propositional Logic
t

Reasoning in Propositional Logic => ways to simplify propositional logic statements

equivalencies and Inference rules


Using

show that CCCP Q a a A fP R R


when
using tables show that expression
is a
tautology

Using equivalences and inference rulesI


also note that inference and equivalencies are
also can be used in different ways by the
choice of them some choices of rules or reg
while other choices are taking longer and sometime end
up with no conclusion
Eg court cases
These isque are effectively address by CNF
Conjunctive Normal Form - CNF

CNFexamples
check whether rearath Can pass exam

p v Q R a

s r Q b
s P c

a Pra R te method
T P r Q VR eliminate Implication
GP VR a GQ ur
b S A Q c
s s P
T S UP
P

contradiction
without Q we could get an answer this
means Q is redundant
But b is TQ we cannot
go
that
from pt onwards although we
can conclude R is true when we
go
another derivation path
through
that
Note when logic cannot conclude something
it doesnt mean there is no conclusion

In simple terms our order of choosing the


clauses has impact whether
a
big we are

able to solution or not


get a
a I
Limitations of Propositional get

Pl we need too different symbols


using
to represent 100 different thing even

they tho gh
are related

Since Pl Cannot represent large ant offs


with less amount of
symbols PL
is
poor in generalization
PL
symbols
It is unable to represent the internal
meaning They are
just symbols
Today is mo day
day is day
Apple is a fruit
sun Rises from east
Predicate Logic (First Order Logic) - FOL

F OL

Assignment
Downlod a tool which implements varioussearch
algorithms
Identify real world problem local sri Lankan
and use the tool to demonstrate how
Various search algorithms find solutions
for the problem
I 1

This should be demo at a Viva


2 3 weeks time
A
Greedy algorithm
discussed in class
algos
8 11 2021

Using Quanti ers


7 fine something X

animal brown
dog brown implies a

dog black implies animal black


a

dog tuna implies a T animal animal


E E
something is
wrong Fx wrong
motor
wrong battery wrong wrong ignition

F T T
F

regardless of
even if X is

friendly True false


Quanti ers

Not some x bad se

tx bad x Fx bad x

bad Chimal bad saman implies we


cannot find at least one as bad x

Fx bad x

FOL identities
exam

fine
find atleast one
r

77 bad x E Tx bad Cx

you cannot interchange

for woman there


for all man there iswsommean
some
is all men
x
Fy CK y 0
Fyfx Cry o

Evolution human accelerated due to


being was

use of manipulation of symbols numbers


letters signs symbols

Reasoning in Predicate logic


Most useful rule is the modus ponens
Pca Pcn Qar t Qca
This is same as PCal Pex vQcn tQc

This happens through substitution for variables


and unification

Here the reasoning takes place in a similar manner


in a propositional logic but additionally
substitution for variable happens as follows

TP n V Qin Pca

x a
S L

Ca

Techniques used for propositional logic is


equally
applicable for predicate logic as well

However CNF in predicate logic should deal with


additional steps to remove quantifiers from
expressions

Having converted predicate logic expressions


into CNF we can apply the reasoning for
10 I we can apply he asoning Cr
with the use of modus powers concerning
predicate logic
Comments on logic

Truth tables equivalencies CNF

Procedural Representation
Es Logic entirely used Dehra
Many Ways t o denote a rule

Rule based representation


How Prolog works backtracking backward chaining (Reasoning in rule-based systems)

Head
p

move inforward diva


to meet a conclusion

BW chaining contd
Begins with a
hypothesis and work in backwa
to check a whether conditions body can be
establised to support the assumes conclusion

default Pl Compiler implements backward


By It is attempted to condud
chaining
head of rule establishing body
by
a a

of the sale right hand side

To use backward chaining a must be


person
an expert
Go to next page to complete answer

which of Novice or Expert would be clever


in
diagnosing an uncommon disease
Novice

Forward is ideal explosing unseen conclusio


chaining

Experience person can use backward chaining because


assumed
problem can be by such people
on the other hand forward chaining leads to
innovative solutions based on available facts

Rule-based KB example
AND

Inference Network

There is a leak in the kitchen


Forward Chaining Advantages of rules

22 1112021

Easy to implement due to simple structure


Easy to draw conclusions FC Be
Easy to modify and maintain
Addegaunetia
fadachReetesot
engue vomiting fever reddeyes
gefsever.h
801
Can include additional information such as certainly

Network Representation

A graphical representation of knowledge


It comprises of nodes and links
The nodes represent object entities while links represent
relationships
semantic Networ is the well known Network Represent

n of knowledge
the fact knowledge is
fail g
this is inspired by work in the brain
structured as a net
undation for powerful Atychnig
SN hasbee the fo
ues like ontology
Semantic networks exempe 1 I
lecturer
is a is a

A1 c asoka
teaches gaiman
enjoys
Being
writing needs

food
Semantic Network Example 2

feature
phas
can move

Subset

bird
can
fly
i
a
Inheritance s low priority

is a ostrich bird Ostrich


hasfeatureostrichcannotfly

Due to inheritance from superior nodes we can


conclude that

i Ostrish cannot fly


i Ostrish can fly lower
reasoning
high Powy
However local assigned attribute can override inherited
attributes
Therefore we can conclude that ostrich cannot
fly
Comments on Semantic Networks

Easy to build and understand


For large domains semantic networks
may be comple
lay d isemnle el l c
y
represent semantic network
using rules
you can a

Cannot represent negations disjunction Variables


and
quantifiers
Yet networks
semantic can be written by rules
so above limitations are addressed
Relation name nodes node z

is a asoka lecturer
needs human being food
needs x food

structured Representation

There are two major types of structured representations


of knowledge
Frames Very first
Script
objects

Frames Marvin Minsky

The concept of frames has been influenced by the


idea of frames in movie industry
A frame is a collective description
SO frames collective discription are more
comprehensive
than nodes concepts in a semantics network
1 1

A frame comprises of its name slots attribute and


Flers value

Frame is the ancestor of concept of objects

Example Frame

sub Frame Model

Note we define frames to value


can new
by referring
of slots of a
given frame

For example we define new frame as Vehicle Toyota

and link the new frame with above

we can define a network of frames in this network


nodes are frames but not single con
Comments on Frames

Frames are more comprehensive than semantics netwo

Frame can also be manipulated through concepts


such as inheritance

Frame can also be expressed as rules


frame name attribute value

However Frames static


can represent nly
knowledge

Scripts methods

scripts can represent dynamic knowledge


Its inspired by the concept of script in
movie industry
we structure a script in terms of props
actors acts scene results etc

Components of a Script

Entry Conditions
Assumption about the world for a script to begin
I n abou le w d f a p l gin
Eg Fight
Results
condition to meet once the script terminate

Props
Things that are involved in the scene table etc

Roles
People and actions

scenes
Temporal sequence

Bomb explosion has occurred

Entry
People are busy and walk here and their

Results
wall clock of

Probs
Ontology

ontology has many definitions


it's a specification of something emphasizing relations
it's about categories of objects
More comprehensive than objects in isolation
Next paradigm for KR and computing
Many tools are available for ontological modeling
enable communication
ontology

Protégé stanford University


SPA L To like sac
teary
Dealer
n Manufacturer

Insurance Car Engine

Repairs Faults

Consider car domain and we complain about the


car with the following relationship

Note that table of content is a families example


for ontology
gy

People have already Constructed Comprehensive ontology


for medicine automobile agriculture education

Use of Ontology

communiciition happens when two parties have sharable ontology

If computers on the internet have sharable ontologies

even machine machine communication is possible


w o human intervention
0 Machine with sharable ontologies on the internet

is called semantic web which is powered by


Ontology
Learning
D In the learning process we build our ontology
of the subject matter by adding and removing
concepts and relations

Discovery of New knowledge


is when interaction happen through ontology new
knowledge can be generated even
by computers
D Databases of drugs diseases chemicals on the
internet can discover drugs like process ne
just
doctors Chemists
drug companies
g s
Use of ontology

shortnotes Toc Concept map are also good


examples for ontology

Discussion subject matter to trepare for an exam


bring their persona ontologies
students can and
update during discussion
must be interesting
AI assignment
lanka
Sri
p
main concern local realworld problem
I
Informed t uninformed

AI Revision

Acs
and comment which one is better and why
Not oath findin

You might also like