Understanding Artificial Intelligence
Understanding Artificial Intelligence
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
2nd →
Electricity
3rd → Electronics
Introduction - Academic
solutions
→
any problem has multiple Alphago ( Games
→
like in medical
systems
This area is
dangerous
control
Autonomous →
beyond our
computers
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
→
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
y
Engineering
CA , MIE ,
T )
Fath ↳
technology
be Éausepeople can use both formal & informal knowledge .
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
-
Economics ( 1776 -
) -
Effective use
of resources / profit
Neuroscience ( 1861 )
-
( 1887 )
Psychology -
Mental health
computer science -
to do
computer engineering ( 1940-1 -
Machine
coding
control
theory and cybernetics
_______→→-oa¥0BMÉg-T
[Link]#.-------
in
1ht computer
>
Neuro
past
science
science
→
for AI
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
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
.
Eg motor Not
bike [Link]
for cars
*
signature recognition ,
training
wheather forecasting ,
self
driving cars - face recognition .
games
C
Alphago )
Limitations -
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
Biological crossover
FI
→ MI swapping
Mutation
'
→
M becomes M1
cloning M1 copied as Mt
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
Not an ML solution
Fuzzy Logic
NLP
have intelligence
fragmeted
sentences
read English and
convert to sinhala
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
Input we should
improve input mechanism for
turing test with voice images media vid
computer vision
we
cannot ask by giving a
objects
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
HW
True False
All intelligent programs may not pass the
turing test
Yes
can aircraft fly its a
game
I
of word
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
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
Birth of AI
AI becomes an
industry
failure
with back propagation algorithm 2
the of ML
Turning point in area
AI As a science
1990s
Intelligent Agent
Driverless vehicles
Deep blue Dart
and has been highly
put a energy to
John McCharthy logic based thinking
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
2 questions
Agent Technology
g gy
4 10 2021
I assume
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
Exercise G
Problem Solving
314 513 2 3
State Space
goal state s
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
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
8 Puzzle
salesman concept
Traveling
Circuit VLSI layout design
design
Automatic assembling A J
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
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
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
Exercise
00
open S close
CS
ARG
ARG Dp SH
AGDPUVW SAR
GDPUVW SARGI Stop
Traversal
Space Complexity
consider a free of branching factor b 3
30 t
3 o f g
000
32 000 000
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
b3tb2
open ST close
ARG 5
ARG DP JCRnotincluded SA
Repeatnodenotincluded
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
same as BFS
Depth First Search 1811012021
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
IDS
2 3
1
11 21 31
[Link]
Execute Des Int times
I that fail I search upto level 2 E3visited
a level
IDS vs BFS
Id
because
G Node at partc level
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
when
space complexity of Bfs is of bdt why
time is o bats
complexity
have
Ifgoatnod
all
good
features
3
places Colombo
Yestietheage
s I
a
DFS BFS
Informed combination
fan is considered
hens
greedy search
as in
consider straight
this line
distances
Values
Arad 0 366 366
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
stack lo
Not optimal In some cases in
cost already
incurred
greedy
u
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
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
2
3 y
48 Et
JB BO BO IB
End of Search
knowledge Representation
comprehensive
drawing conclusion
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
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
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
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
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
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
they tho gh
are related
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
animal brown
dog brown implies a
F T T
F
regardless of
even if X is
tx bad x Fx bad x
Fx bad x
FOL identities
exam
fine
find atleast one
r
77 bad x E Tx bad Cx
TP n V Qin Pca
x a
S L
Ca
Procedural Representation
Es Logic entirely used Dehra
Many Ways t o denote a rule
Head
p
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
Rule-based KB example
AND
Inference Network
22 1112021
Network Representation
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 asoka lecturer
needs human being food
needs x food
structured Representation
Example Frame
Scripts methods
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
Entry
People are busy and walk here and their
Results
wall clock of
Probs
Ontology
Repairs Faults
Use of Ontology
AI Revision
Acs
and comment which one is better and why
Not oath findin