Title: CS621: Artificial Intelligence
1CS621 Artificial Intelligence
- Pushpak BhattacharyyaCSE Dept., IIT Bombay
- Lecture2 Introduction SearchLogic
2Logistics
- Faculty instructor Dr. Pushpak Bhattacharyya
(www.cse.iitb.ac.in/pb) - TAs Saurabh (saurabhsohoney_at_cse), Anup
(anup_at_cse) - Course home page
- www.cse.iitb.ac.in/cs621-2009
- Lectures mirrored at www.cse.iitb.ac.in/pb/cs621-
2009 - Venue CSE Building S9
- 1 hour lectures 3 times a week Mon-9.30,
Tue-10.30, Thu-11.30
3 Disciplines which form the core of AI- inner
circle Fields which draw from these disciplines-
outer circle.
Robotics
NLP
Search, Reasoning, Learning Knowledge- Representa
tion
Expert Systems
Planning
Computer Vision
4Search Everywhere
5Planning
- (a) which block to pick, (b) which to stack, (c)
which to unstack, (d) whether to stack a block or
(e) whether to unstack an already stacked block.
These options have to be searched in order to
arrive at the right sequence of actions.
C
B
A
C
B
A
Table
6Vision
- A search needs to be carried out to find which
point in the image of L corresponds to which
point in R. Naively carried out, this can become
an O(n2) process where n is the number of points
in the retinal images.
R
L
Two eye system
World
7Robot Path Planning
- searching amongst the options of moving Left,
Right, Up or Down. Additionally, each movement
has an associated cost representing the relative
difficulty of each movement. The search then will
have to find the optimal, i.e., the least cost
path.
O2
R
Robot Path
O1
D
8Natural Language Processing
- search among many combinations of parts of speech
on the way to deciphering the meaning. This
applies to every level of processing- syntax,
semantics, pragmatics and discourse.
The man would like to
play.
Noun
Verb
Preposition
Noun
Verb
Verb
9Expert Systems
- Search among rules, many of which can apply to a
situation - If-conditions
- the infection is primary-bacteremia AND the
site of the culture is one of the sterile sites
AND the suspected portal of entry is the
gastrointestinal tract - THEN
- there is suggestive evidence (0.7) that
infection is bacteroid - (from MYCIN)
10Search building blocks
- State Space Graph of states (Express
constraints and parameters of the problem) - Operators Transformations applied to the
states. - Start state S0 (Search starts from here)
- Goal state G - Search terminates here.
- Cost Effort involved in using an operator.
- Optimal path Least cost path
11 Examples
Problem 1 8 puzzle
1
3
2
4
6
3
1
4
8
6
2
5
5
8
7
7
S
G
Tile movement represented as the movement of the
blank space. Operators L Blank moves left R
Blank moves right U Blank moves up D Blank
moves down
C(L) C(R) C(U) C(D) 1
12Problem 2 Missionaries and Cannibals
R
boat
River
boat
L
Missionaries
Cannibals
Missionaries
Cannibals
- Constraints
- The boat can carry at most 2 people
- On no bank should the cannibals outnumber the
missionaries
13State ltM, C, Pgt M Number of missionaries
on bank L C Number of cannibals on bank L P
Position of the boat S0 lt3, 3, Lgt G lt 0, 0,
R gt Operations M2 Two missionaries take
boat M1 One missionary takes boat C2 Two
cannibals take boat C1 One cannibal takes
boat MC One missionary and one cannibal takes
boat
14lt3,3,Lgt
C2
MC
lt3,1,Rgt
lt2,2,Rgt
lt3,3,Lgt
Partial search tree
15Problem 3
B
B
W
W
W
B
G States where no B is to the left of any
W Operators 1) A tile jumps over another tile
into a blank tile with cost 2 2) A tile
translates into a blank space with cost 1
All the three problems mentioned above are to be
solved using A
16Power of Logic
17 Disciplines which form the core of AI- inner
circle Fields which draw from these disciplines-
outer circle.
Robotics
NLP
Search, Reasoning, Learning Knowledge- Representa
tion
Expert Systems
Planning
Computer Vision
18Circuit Verification
- Does the circuit meet the specs?
- Are there faults?
- are they locatable?
19Example 2-bit full adder
X1, X2 inputs C1 prev. carry C2 next carry
Y output
20K-Map
Y
x2x1
00
01
11
10
c1
0
1
21K-Map (contd..)
C2
x2x1
00
01
11
10
c1
0
1
22Circuit
23Verification
- First task (most difficult)
- Building blocks predicates
- Circuit observation Assertion on terminals
24Predicates Functions
25Alternate Full Adder Circuit
26Functions
- type(X) takes values AND, OR NOT and XOR, where
X is a gate. - in(n, X) the value of signal at the nth input
of gate X. - out(X) output of gate X.
- signal(t) state at terminal t 1/0
Predicates
- connected(t1,t2) true, if terminal t1 and t2 are
connected
27General Properties
- Commutativity
- ?t1,t2 connected(t1,t2) ? connected(t2,t1)
- By definition of connection
- ?t1,t2 connected(t1,t2) ? signal(t1)
signal(t1)
28Gate properties
- OR definition
- AND definition
29Gate properties contd
- XOR definition
- NOT definition
30Some necessary functions
- no_of_input(x), takes values from N.
- Count_ls(x), returns 1s in the input of X
31Circuit specific properties
- Connectivity
- connected(x1, in(1,A1)),
- connected(x2, in(2, A1)),
- connected(out(A1), in(1, A2)) ,
- connected(c1, in(2, A2)),
- connected(y, out(A2))
- Circuit elements
- type(A1) XOR,
- type(A2) XOR,
- type(A3) AND
32Topics to be covered (1/2)
- Search
- General Graph Search, A
- Iterative Deepening, a-ß pruning, probabilistic
methods - Logic
- Formal System
- Propositional Calculus, Predicate Calculus
- Knowledge Representation
- Predicate calculus, Semantic Net, Frame
- Script, Conceptual Dependency, Uncertainty
33Topics to be covered (2/2)
- Neural Networks Perceptrons, Back Propagation,
Self Organization - IR and AI
- Semantic Web and Agents
- Statistical Methods
- Markov Processes and Random Fields
- Computer Vision, NLP, Machine Learning
- Planning Robotic Systems
- Confluence of NLP and CV text and image based
search - Anthropomorphic Computing Computational Humour,
Computational Music
34Resources
- Main Text
- Artificial Intelligence A Modern Approach by
Russell Norvik, Pearson, 2003. - Other Main References
- Principles of AI - Nilsson
- AI - Rich Knight
- Knowledge Based Systems Mark Stefik
- Journals
- AI, AI Magazine, IEEE Expert,
- Area Specific Journals e.g, Computational
Linguistics - Conferences
- IJCAI, AAAI
35Allied Disciplines
36Evaluation
- (i) Exams
- Midsem
- Endsem
- Class test
- (ii) Study
- Seminar
- (iii) Work
- Assignments