Lecture AI Problems Space
Lecture AI Problems Space
Artificial Intelligence
Assoc. Prof. Osama fathy
Mundane tasks:
Natural language: generation, understanding,
translation,
Perception: vision, smelling, hearing,
Robot control
Commonsense reasoning: is a reasoning about
physical object and their relation ships to each
other , reasoning about actions and reaction
3
Formal tasks:
Math : logic, geometry, integral calculus,.. ,
Games : chess, checkers, backgammon, ..
Expert tasks:
Engineering: design, fault finding
manufacturing planning
Analysis: Scientific, Military, Medical,
Financial .
4
Script problem
Draw a script (is a structure that represents the
system's knowledge about a subject) of
shopping text. Then, write an algorithm to
solve the questions.
Script problem
Script problem
Q1: What did Mary go shopping for?
Q2: What did Mary find that she liked?
Q3: Did Mary buy any thing?
Solution
1. Arrange actions Time.
2. Coding:
C...customer
Sstore
Psales person
M.......merchandize
Dmoney
Rcolor
T.department
9
1- C enter S
3. Script:
2- C looking around
6-
7- C find M
9- C buy m
8- C fails to find M
10- C leaves s
11- C leaves s
12- C go to step 2
13- C takes M
14- C leaves S
10
4. Algorithms:
11
Assignment-2:
Prepare two different texts about two different
subjects, and three questions about each one then:
Draw a script for each one
Write an algorithm to solve the questions
for each one
Note: Last date to receipt (hard & soft copy the assignments,
next --------------
12
Problem representation
States.
Operators.
Initial and goal states.
Initial problem description.
Set of operators for transforming problems to sub
problems.
Set of primitive problem description.
Game tree.
13
14
4-G
3-G
15
Solution:
State Space: order pairs of integers (x, y) such
that x = 0, 1, 2, 3, 4 and y = 0, 1, 2, 3.
Start state: is (0, 0).
Goal state: is (2, n) for any value of n.
17
Operators:
# Current
State
New
State
Condition
Description
(x, y)
(4, y)
x<4
(x, y)
(x, 3)
y<3
(x, y)
(x-d, y)
x>0
(x, y)
(x, y-d)
y>0
# Current
State
New
State
Condition
Description
(x, y)
(0, y)
x>0
(x, y)
(x, 0)
y>0
(x, y)
(4,y-(4-x))
x+y4 &
y>0
New
State
Condition
Description
(x, y)
(x-(3-y),3)
x+y3 &
x>0
(x, y)
(x+y,0)
x+y4 &
y>0
10
(x, y)
(0, x+y)
x+y3 &
x>0
(4,0)
(4,3)
(0,3)
(0,0)
(1,0)
(2,0)
(4,3)
(1,3)
(4,0)
(0,0)
(3,0)
(4,3)
(2,3)
21
22
AD
AC
ABC
ABD
ACB
ACD
ADB
ADC
ABCD
ABDC
ACBD
ACDB
ADBC
ADCB
C
24
Problem representation
States.
Operators.
Initial and goal states.
Initial problem description.
Set of operators for transforming problems to sub
problems.
Set of primitive problem description.
Game tree.
25
A
B
C
1
initial state
3
final state
28
29
30
31
9l
3l
5l
Solution 1:
a
0
3
0
3
0
3
0
3
1
0
Solution 2:
b
0
0
0
0
0
0
3
3
5
5
c
0
0
3
3
6
6
6
6
6
7
start
goal
a
0
0
3
3
3
3
b
0
5
2
0
5
0
c
0
0
0
2
2
7
start
goal
33