1 course overview and summary we have discussed… - what ai and intelligent agents are - how to...
TRANSCRIPT
![Page 1: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/1.jpg)
1
Course Overview and summary
We have discussed…
- What AI and intelligent agents are- How to develop AI systems - How to solve problems using search- How to play games as an application/extension of search- How to build basic agents that reason logically,using propositional logic- How to write more powerful logic statements with first-order logic- How to properly engineer a knowledge base- How to reason logically using first-order logic inference- Examples of logical reasoning systems, such as theorem provers- How to plan- Expert systems- What challenges remain
![Page 2: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/2.jpg)
2
Acting Humanly: The Turing Test
• Alan Turing's 1950 article Computing Machinery and Intelligence discussed conditions for considering a machine to be intelligent• “Can machines think?” “Can machines behave
intelligently?”• The Turing test (The Imitation Game): Operational definition of
intelligence.
• Computer needs to posses: Natural language processing, Knowledge representation, Automated reasoning, and Machine learning
![Page 3: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/3.jpg)
3
What would a computer need to pass the Turing test?
• Natural language processing: to communicate with examiner.
• Knowledge representation: to store and retrieve information provided before or during interrogation.
• Automated reasoning: to use the stored information to answer questions and to draw new conclusions.
• Machine learning: to adapt to new circumstances and to detect and extrapolate patterns.
• Vision (for Total Turing test): to recognize the examiner’s actions and various objects presented by the examiner.
• Motor control (total test): to act upon objects as requested.• Other senses (total test): such as audition, smell, touch,
etc.
![Page 4: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/4.jpg)
4
What is an (Intelligent) Agent?
• Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through its effectors to maximize progress towards its goals.
• PAGE (Percepts, Actions, Goals, Environment)
• Task-specific & specialized: well-defined goals and environment
![Page 5: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/5.jpg)
5
Environment types
Environment Accessible
Deterministic
Episodic Static Discrete
Operating System
Virtual Reality
Office Environment
Mars
![Page 6: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/6.jpg)
6
Environment types
Environment Accessible
Deterministic
Episodic Static Discrete
Operating System
Yes Yes No No Yes
Virtual Reality
Yes Yes Yes/No No Yes/No
Office Environment
No No No No No
Mars No Semi No Semi No
The environment types largely determine the agent design.
![Page 7: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/7.jpg)
7
Agent types
• Reflex agents• Reflex agents with internal states• Goal-based agents• Utility-based agents
![Page 8: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/8.jpg)
8
Reflex agents
![Page 9: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/9.jpg)
9
Reflex agents w/ state
![Page 10: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/10.jpg)
10
Goal-based agents
![Page 11: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/11.jpg)
11
Utility-based agents
![Page 12: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/12.jpg)
12
How can we design & implement agents?
• Need to study knowledge representation and reasoning algorithms
• Getting started with simple cases: search, game playing
![Page 13: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/13.jpg)
13
Problem-Solving Agent
Note: This is offline problem-solving. Online problem-solving involves acting w/o complete knowledge of the problem and environment
tion
![Page 14: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/14.jpg)
14
Problem types
• Single-state problem: deterministic, accessibleAgent knows everything about world, thus can
calculate optimal action sequence to reach goal state.
• Multiple-state problem: deterministic, inaccessibleAgent must reason about sequences of actions and
states assumed while working towards goal state.
• Contingency problem: nondeterministic, inaccessible• Must use sensors during execution• Solution is a tree or policy• Often interleave search and execution
• Exploration problem: unknown state spaceDiscover and learn about environment while taking actions.
![Page 15: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/15.jpg)
15
Search algorithms
Function General-Search(problem, strategy) returns a solution, or failureinitialize the search tree using the initial state problemloop do
if there are no candidates for expansion then return failurechoose a leaf node for expansion according to strategyif the node contains a goal state then return the corresponding
solutionelse expand the node and add resulting nodes to the search tree
end
Basic idea:
offline, systematic exploration of simulated state-space by generating successors of explored states (expanding)
![Page 16: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/16.jpg)
16
Implementation of search algorithms
Function General-Search(problem, Queuing-Fn) returns a solution, or failurenodes make-queue(make-node(initial-state[problem]))loop doif node is empty then return failurenode Remove-Front(nodes)if Goal-Test[problem] applied to State(node) succeeds then return nodenodes Queuing-Fn(nodes, Expand(node, Operators[problem]))end
Queuing-Fn(queue, elements) is a queuing function that inserts a set of elements into the queue and determines the order of node expansion. Varieties of the queuing function produce varieties of the search algorithm.
Solution: is a sequence of operators that bring you from current state to the goal state.
![Page 17: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/17.jpg)
17
Encapsulating state information in nodes
![Page 18: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/18.jpg)
18
Complexity
• Why worry about complexity of algorithms?
because a problem may be solvable in principle but may take too long to solve in practice
• How can we evaluate the complexity of algorithms?
through asymptotic analysis, i.e., estimate time (or number of operations) necessary to solve an instance of size n of a problem when n tends towards infinity
![Page 19: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/19.jpg)
19
Why is exponential complexity “hard”?
It means that the number of operations necessary to compute the exact solution of the problem grows exponentially with the size of the problem (here, the number of cities).
• exp(1) = 2.72
• exp(10) = 2.20 104 (daily salesman trip)
• exp(100) = 2.69 1043 (monthly salesman planning)
• exp(500) = 1.40 10217 (music band worldwide tour)
• exp(250,000) = 10108,573 (fedex, postal services)
• Fastest computer = 1012 operations/second
In general, exponential-complexity problems cannot be solved for any but the smallest instances!
![Page 20: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/20.jpg)
20
Landau symbols
0)(
)()()(,)(
nn ng
nfnkgnfkgof
g
fnkgnfkgOf
n
)()(,)( is bounded
f is dominated by g:
f is negligible compared to g:
![Page 21: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/21.jpg)
21
Polynomial-time hierarchy
• From Handbook of BrainTheory & Neural Networks(Arbib, ed.;MIT Press 1995).
AC0 NC1 NC P complete NP complete
PNP
PH
AC0: can be solved using gates of constant depthNC1: can be solved in logarithmic depth using 2-input gatesNC: can be solved by small, fast parallel computerP: can be solved in polynomial timeP-complete: hardest problems in P; if one of them can be proven to be
NC, then P = NCNP: non-polynomial algorithmsNP-complete: hardest NP problems; if one of them can be proven to be
P, then NP = PPH: polynomial-time hierarchy
![Page 22: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/22.jpg)
22
Search strategies
Uninformed: Use only information available in the problem formulation• Breadth-first – expand shallowest node first; successors at end of
queue • Uniform-cost – expand least-cost node; order queue by path cost• Depth-first – expand deepest node first; successors at front of queue• Depth-limited – depth-first with limit on node depth• Iterative deepening – iteratively increase depth limit in depth-limited
search
Informed: Use heuristics to guide the search• Greedy search – queue first nodes that maximize heuristic
“desirability” based on estimated path cost from current node to goal• A* search – queue first nodes that minimize sum of path cost so far and
estimated path cost to goal
Iterative Improvement: Progressively improve single current state• Hill climbing • Simulated annealing
![Page 23: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/23.jpg)
23
Search strategies
Uninformed: Use only information available in the problem formulation• Breadth-first – expand shallowest node first; successors at end of queue • Uniform-cost – expand least-cost node; order queue by path cost• Depth-first – expand deepest node first; successors at front of queue• Depth-limited – depth-first with limit on node depth• Iterative deepening – iteratively increase depth limit in depth-limited
search
Informed: Use heuristics to guide the search• Greedy search – queue first nodes that maximize heuristic “desirability”
based on estimated path cost from current node to goal• A* search – queue first nodes that minimize sum of path cost so far and
estimated path cost to goal
Iterative Improvement: Progressively improve single current state• Hill climbing – select successor with highest “value”• Simulated annealing – may accept successors with lower value, to
escape local optima
![Page 24: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/24.jpg)
24
Example: Traveling from Arad To Bucharest
![Page 25: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/25.jpg)
25
Breadth-first search
![Page 26: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/26.jpg)
26
Breadth-first search
![Page 27: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/27.jpg)
27
Breadth-first search
![Page 28: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/28.jpg)
28
Uniform-cost search
![Page 29: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/29.jpg)
29
Uniform-cost search
![Page 30: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/30.jpg)
30
Uniform-cost search
![Page 31: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/31.jpg)
31
Depth-first search
![Page 32: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/32.jpg)
32
Depth-first search
![Page 33: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/33.jpg)
33
Depth-first search
![Page 34: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/34.jpg)
34
![Page 35: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/35.jpg)
35
![Page 36: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/36.jpg)
36
![Page 37: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/37.jpg)
37
![Page 38: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/38.jpg)
38
![Page 39: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/39.jpg)
39
![Page 40: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/40.jpg)
40
![Page 41: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/41.jpg)
41
![Page 42: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/42.jpg)
42
Informed search: Best-first search
• Idea:use an evaluation function for each node; estimate of “desirability”
expand most desirable unexpanded node.
• Implementation:
QueueingFn = insert successors in decreasing order of desirability
• Special cases:greedy searchA* search
![Page 43: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/43.jpg)
43
Greedy search
• Estimation function:h(n) = estimate of cost from n to goal (heuristic)
• For example:hSLD(n) = straight-line distance from n to Bucharest
• Greedy search expands first the node that appears to be closest to the goal, according to h(n).
![Page 44: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/44.jpg)
44
A* search
• Idea: avoid expanding paths that are already expensive
evaluation function: f(n) = g(n) + h(n) with:g(n) – cost so far to reach nh(n) – estimated cost to goal from nf(n) – estimated total cost of path through n to goal
• A* search uses an admissible heuristic, that is,h(n) h*(n) where h*(n) is the true cost from n.
For example: hSLD(n) never overestimates actual road distance.
• Theorem: A* search is optimal
![Page 45: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/45.jpg)
45
Comparing uninformed search strategies
Criterion Breadth- UniformDepth- Depth- Iterative Bidirectional
first cost first limited deepening (if applicable)
Time b^d b^d b^m b^l b^d b^(d/2)
Space b^d b^d bm bl bd b^(d/2)
Optimal? Yes Yes No No Yes Yes
Complete? Yes Yes No Yes if ld Yes Yes
• b – max branching factor of the search tree• d – depth of the least-cost solution• m – max depth of the state-space (may be infinity)• l – depth cutoff
![Page 46: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/46.jpg)
46
Comparing uninformed search strategies
Criterion Greedy A*
Time b^m (at worst) b^m (at worst)
Space b^m (at worst) b^m (at worst)
Optimal? No Yes
Complete? No Yes
• b – max branching factor of the search tree• d – depth of the least-cost solution• m – max depth of the state-space (may be infinity)• l – depth cutoff
![Page 47: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/47.jpg)
47
Iterative improvement
• In many optimization problems, path is irrelevant;the goal state itself is the solution.
• In such cases, can use iterative improvement algorithms: keep a single “current” state, and try to improve it.
![Page 48: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/48.jpg)
48
Hill climbing (or gradient ascent/descent)
• Iteratively maximize “value” of current state, by replacing it by successor state that has highest value, as long as possible.
![Page 49: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/49.jpg)
49
Simulated Annealing
h
Consider how one might get a ball-bearing traveling along the curve to "probably end up" in the deepest minimum. The idea is to shake the box "about h hard" — then the ball is more likely to go from D to C than from C to D. So, on average, the ball should end up in C's valley.
![Page 50: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/50.jpg)
50
Simulated annealing algorithm
• Idea: Escape local extrema by allowing “bad moves,” but gradually decrease their size and frequency.
Note: goal here is tomaximize E.-
![Page 51: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/51.jpg)
51
Note on simulated annealing: limit cases
• Boltzmann distribution: accept “bad move” with E<0 (goal is to maximize E) with probability P(E) = exp(E/T)
• If T is large: E < 0E/T < 0 and very smallexp(E/T) close to 1accept bad move with high probability
• If T is near 0: E < 0E/T < 0 and very largeexp(E/T) close to 0accept bad move with low probability
Random walk
Deterministicdown-hill
![Page 52: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/52.jpg)
52
Is search applicable to game playing?
• Abstraction: To describe a game we must capture every relevant aspect of the game. Such as:• Chess• Tic-tac-toe• …
• Accessible environments: Such games are characterized by perfect information
• Search: game-playing then consists of a search through possible game positions
• Unpredictable opponent: introduces uncertainty thus game-playing must deal with contingency problems
![Page 53: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/53.jpg)
53
Searching for the next move
• Complexity: many games have a huge search space• Chess: b = 35, m=100 nodes = 35 100
if each node takes about 1 ns to explorethen each move will take about 10 50 millennia
to calculate.
• Resource (e.g., time, memory) limit: optimal solution not feasible/possible, thus must approximate
1. Pruning: makes the search more efficient by discarding portions of the search tree that cannot improve quality result.
2. Evaluation functions: heuristics to evaluate utility of a state without exhaustive search.
![Page 54: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/54.jpg)
54
The minimax algorithm
• Perfect play for deterministic environments with perfect information
• Basic idea: choose move with highest minimax value= best achievable payoff against best play
• Algorithm: 1. Generate game tree completely2. Determine utility of each terminal state3. Propagate the utility values upward in the three by applying
MIN and MAX operators on the nodes in the current level4. At the root node use minimax decision to select the move
with the max (of the min) utility value
• Steps 2 and 3 in the algorithm assume that the opponent will play perfectly.
![Page 55: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/55.jpg)
55
minimax = maximum of the minimum
1st ply
2nd ply
![Page 56: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/56.jpg)
56
- pruning: search cutoff
• Pruning: eliminating a branch of the search tree from consideration without exhaustive examination of each node
- pruning: the basic idea is to prune portions of the search tree that cannot improve the utility value of the max or min node, by just considering the values of nodes seen so far.
• Does it work? Yes, in roughly cuts the branching factor from b to b resulting in double as far look-ahead than pure minimax
• Important note: pruning does NOT affect the final result!
![Page 57: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/57.jpg)
57
- pruning: example
6
6
MAX
6 12 8
MIN
![Page 58: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/58.jpg)
58
- pruning: example
6
6
MAX
6 12 8 2
2MIN
![Page 59: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/59.jpg)
59
- pruning: example
6
6
MAX
6 12 8 2
2
5
5MIN
![Page 60: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/60.jpg)
60
- pruning: example
6
6
MAX
6 12 8 2
2
5
5MIN
Selected move
![Page 61: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/61.jpg)
61
Nondeterministic games: the element of chance
3 ?
0.50.5
817
8
?
CHANCE ?
expectimax and expectimin, expected values over all possible outcomes
![Page 62: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/62.jpg)
62
Nondeterministic games: the element of chance
3 50.50.5
817
8
5
CHANCE 4 = 0.5*3 + 0.5*5Expectimax
Expectimin
![Page 63: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/63.jpg)
63
Summary on games
![Page 64: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/64.jpg)
64
Knowledge-Based Agent
• Agent that uses prior or acquired knowledge to achieve its goals• Can make more efficient decisions• Can make informed decisions
• Knowledge Base (KB): contains a set of representations of facts about the Agent’s environment
• Each representation is called a sentence
• Use some knowledge representation language, to TELL it what to know e.g., (temperature 72F)
• ASK agent to query what to do• Agent can use inference to deduce
new facts from TELLed facts
Knowledge Base
Inference engine
Domain independent algorithms
Domain specific content
TELL
ASK
![Page 65: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/65.jpg)
65
Generic knowledge-based agent
1. TELL KB what was perceivedUses a KRL to insert new sentences, representations of facts, into KB
2. ASK KB what to do.Uses logical reasoning to examine actions and select best.
![Page 66: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/66.jpg)
66
Logic in general
![Page 67: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/67.jpg)
67
Types of logic
![Page 68: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/68.jpg)
68
Entailment
![Page 69: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/69.jpg)
69
Inference
![Page 70: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/70.jpg)
70
Validity and Satisfiability
Theorem
![Page 71: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/71.jpg)
71
Propositional logic: semantics
![Page 72: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/72.jpg)
72
Propositional inference: normal forms
“sum of products of simple variables ornegated simple variables”
“product of sums of simple variables ornegated simple variables”
![Page 73: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/73.jpg)
73
Proof methods
![Page 74: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/74.jpg)
74
Inference rules
![Page 75: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/75.jpg)
75
Limitations of Propositional Logic
1. It is too weak, i.e., has very limited expressiveness:• Each rule has to be represented for each situation:
e.g., “don’t go forward if the wumpus is in front of you” takes 64 rules
2. It cannot keep track of changes:• If one needs to track changes, e.g., where the agent has been
before then we need a timed-version of each rule. To track 100 steps we’ll then need 6400 rules for the previous example.
Its hard to write and maintain such a huge rule-baseInference becomes intractable
![Page 76: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/76.jpg)
76
First-order logic (FOL)
• Ontological commitments:• Objects: wheel, door, body, engine, seat, car, passenger,
driver• Relations: Inside(car, passenger), Beside(driver, passenger)• Functions: ColorOf(car)• Properties: Color(car), IsOpen(door), IsOn(engine)
• Functions are relations with single value for each object
![Page 77: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/77.jpg)
77
Universal quantification (for all):
<variables> <sentence>• “Every one in the 561a class is smart”:
x In(561a, x) Smart(x) P corresponds to the conjunction of instantiations
of PIn(561a, Manos) Smart(Manos) In(561a, Dan) Smart(Dan) …In(561a, Clinton) Smart(Mike)
is a natural connective to use with • Common mistake: to use in conjunction with
e.g: x In(561a, x) Smart(x)means “every one is in 561a and everyone is smart”
![Page 78: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/78.jpg)
78
Existential quantification (there exists):
<variables> <sentence>• “Someone in the 561a class is smart”:
x In(561a, x) Smart(x) P corresponds to the disjunction of instantiations of
PIn(561a, Manos) Smart(Manos) In(561a, Dan) Smart(Dan) …In(561a, Clinton) Smart(Mike) is a natural connective to use with
• Common mistake: to use in conjunction with e.g: x In(561a, x) Smart(x)is true if there is anyone that is not in 561a!(remember, false true is valid).
![Page 79: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/79.jpg)
79
Properties of quantifiers
![Page 80: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/80.jpg)
80
Example sentences
• Brothers are siblings
x, y Brother(x, y) Sibling(x, y)
• Sibling is transitive
x, y, z Sibling(x,y) Sibling(y,z) Sibling(x,z)
• One’s mother is one’s sibling’s mother
m, c Mother(m, c) Sibling(c, d) Mother(m, d)
• A first cousin is a child of a parent’s sibling
c, d FirstCousin(c, d) p, ps Parent(p, d) Sibling(p, ps) Parent(ps, c)
![Page 81: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/81.jpg)
81
Higher-order logic?
• First-order logic allows us to quantify over objects (= the first-order entities that exist in the world).
• Higher-order logic also allows quantification over relations and functions.e.g., “two objects are equal iff all properties applied to them are equivalent”:
x,y (x=y) ( p, p(x) p(y))
• Higher-order logics are more expressive than first-order; however, so far we have little understanding on how to effectively reason with sentences in higher-order logic.
![Page 82: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/82.jpg)
82
Using the FOL Knowledge Base
![Page 83: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/83.jpg)
83
Wumpus world, FOL Knowledge Base
![Page 84: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/84.jpg)
84
Deducing hidden properties
![Page 85: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/85.jpg)
85
Situation calculus
![Page 86: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/86.jpg)
86
Describing actions
![Page 87: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/87.jpg)
87
Describing actions (cont’d)
![Page 88: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/88.jpg)
88
Planning
![Page 89: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/89.jpg)
89
Generating action sequences
![Page 90: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/90.jpg)
90
Summary on FOL
![Page 91: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/91.jpg)
91
Knowledge Engineer
• Populates KB with facts and relations
• Must study and understand domain to pick important objects and relationships
• Main steps:Decide what to talk aboutDecide on vocabulary of predicates, functions &
constantsEncode general knowledge about domainEncode description of specific problem instancePose queries to inference procedure and get
answers
![Page 92: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/92.jpg)
92
Knowledge engineering vs. programming
Knowledge Engineering Programming
1. Choosing a logic Choosing programming language
2. Building knowledge base Writing program3. Implementing proof theory Choosing/writing compiler4. Inferring new facts Running program
Why knowledge engineering rather than programming?Less work: just specify objects and relationships known to be true,
but leave it to the inference engine to figure out how to solve a problem using the known facts.
![Page 93: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/93.jpg)
93
Towards a general ontology
• Develop good representations for:
- categories- measures- composite objects- time, space and change- events and processes- physical objects- substances- mental objects and beliefs- …
![Page 94: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/94.jpg)
94
Inference in First-Order Logic
• Proofs – extend propositional logic inference to deal with quantifiers
• Unification• Generalized modus ponens• Forward and backward chaining – inference rules and reasoning
program• Completeness – Gödel’s theorem: for FOL, any sentence
entailed byanother set of sentences can be proved from that set
• Resolution – inference procedure that is complete for any set ofsentences
• Logic programming
![Page 95: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/95.jpg)
95
Proofs
The three new inference rules for FOL (compared to propositional logic) are:
• Universal Elimination (UE):for any sentence , variable x and ground term ,
x e.g., from x Likes(x, Candy) and {x/Joe} {x/} we can infer Likes(Joe, Candy)
• Existential Elimination (EE):for any sentence , variable x and constant symbol k not in KB,
x e.g., from x Kill(x, Victim) we can infer{x/k} Kill(Murderer, Victim), if Murderer new
symbol
• Existential Introduction (EI):for any sentence , variable x not in and ground term g in ,
e.g., from Likes(Joe, Candy) we can inferx {g/x} x Likes(x, Candy)
![Page 96: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/96.jpg)
96
Generalized Modus Ponens (GMP)
![Page 97: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/97.jpg)
97
Forward chaining
![Page 98: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/98.jpg)
98
Backward chaining
![Page 99: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/99.jpg)
99
Resolution
![Page 100: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/100.jpg)
100
Resolution inference rule
![Page 101: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/101.jpg)
101
Resolution proof
![Page 102: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/102.jpg)
102
Logical reasoning systems
• Theorem provers and logic programming languages
• Production systems
• Frame systems and semantic networks
• Description logic systems
![Page 103: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/103.jpg)
103
Logical reasoning systems
• Theorem provers and logic programming languages – Provers: use resolution to prove sentences in full FOL. Languages: use backward
chaining on restricted set of FOL constructs.• Production systems – based on implications, with consequents interpreted as action (e.g., insertion & deletion in KB). Based on
forward chaining + conflict resolution if several possible actions.• Frame systems and semantic networks – objects as nodes in a
graph, nodes organized as taxonomy, links represent binaryrelations.
• Description logic systems – evolved from semantic nets. Reasonwith object classes & relations among them.
![Page 104: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/104.jpg)
104
Membership functions: S-function
• The S-function can be used to define fuzzy sets• S(x, a, b, c) =
• 0 for x a
• 2(x-a/c-a)2 for a x b
• 1 – 2(x-c/c-a)2 for b x c
• 1 for x c
a b c
![Page 105: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/105.jpg)
105
Membership functions: Function
• (x, a, b) = • S(x, b-a, b-a/2, b) for x b
• 1 – S(x, b, b+a/2, a+b) for x b
E.g., close (to a)
b-a b+a/2b-a/2 b+a
a
a
![Page 106: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/106.jpg)
106
Linguistic Hedges
• Modifying the meaning of a fuzzy set using hedges such as very, more or less, slightly, etc.
• Very F = F2
• More or less F = F1/2
• etc.
tall
More or less tallVery tall
![Page 107: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/107.jpg)
107
Fuzzy set operators
• EqualityA = BA (x) = B (x) for all x X
• ComplementA’ A’ (x) = 1 - A(x) for all x X
• ContainmentA B A (x) B (x) for all x X
• UnionA B A B (x) = max(A (x), B (x)) for all x X
• IntersectionA B A B (x) = min(A (x), B (x)) for all x X
![Page 108: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/108.jpg)
108
Tip = 16.7 %Result of defuzzification(centroid)
Fu
zzy
infe
ren
ce o
verv
iew
![Page 109: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/109.jpg)
109
What we have so far
• Can TELL KB about new percepts about the world
• KB maintains model of the current world state
• Can ASK KB about any fact that can be inferred from KB
How can we use these components to build a planning agent,
i.e., an agent that constructs plans that can achieve its goals, and that then executes these plans?
![Page 110: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/110.jpg)
110
Search vs. planning
![Page 111: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/111.jpg)
111
Types of planners
• Situation space planner: search through possible situations
• Progression planner: start with initial state, apply operators until goal is reached
Problem: high branching factor!
• Regression planner: start from goal state and apply operators until start state reached
Why desirable? usually many more operators are applicable to
initial state than to goal state.Difficulty: when want to achieve a conjunction of goals
Initial STRIPS algorithm: situation-space regression planner
![Page 112: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/112.jpg)
112
A Simple Planning Agent
function SIMPLE-PLANNING-AGENT(percept) returns an actionstatic: KB, a knowledge base (includes action descriptions)
p, a plan (initially, NoPlan)t, a time counter (initially 0)
local variables:G, a goalcurrent, a current state description
TELL(KB, MAKE-PERCEPT-SENTENCE(percept, t))current STATE-DESCRIPTION(KB, t)if p = NoPlan then
G ASK(KB, MAKE-GOAL-QUERY(t))p IDEAL-PLANNER(current, G, KB)
if p = NoPlan or p is empty thenaction NoOp
elseaction FIRST(p)p REST(p)
TELL(KB, MAKE-ACTION-SENTENCE(action, t))t t+1return action
![Page 113: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/113.jpg)
113
STRIPS operators
Graphical notation:
![Page 114: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/114.jpg)
114
Partially ordered plans
![Page 115: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/115.jpg)
115
Plan
We formally define a plan as a data structure consisting of:
• Set of plan steps (each is an operator for the problem)
• Set of step ordering constraints
e.g., A B means “A before B”
• Set of variable binding constraints
e.g., v = x where v variable and x constant or other variable
• Set of causal links
e.g., A B means “A achieves c for B”
c
![Page 116: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/116.jpg)
116
POP algorithm sketch
![Page 117: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/117.jpg)
117
POP algorithm (cont.)
![Page 118: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/118.jpg)
118
Some problems remain…
• Vision• Audition / speech processing• Natural language processing• Touch, smell, balance and other senses• Motor control
They are extensively studied in other courses.
![Page 119: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/119.jpg)
119
Computer Perception
• Perception: provides an agent information about its environment. Generates feedback. Usually proceeds in the following steps.
1. Sensors: hardware that provides raw measurements of properties of the environment1. Ultrasonic Sensor/Sonar: provides distance data2. Light detectors: provide data about intensity of light3. Camera: generates a picture of the environment
2. Signal processing: to process the raw sensor data in order to extract certain features, e.g., color, shape, distance, velocity, etc.
3. Object recognition: Combines features to form a model of an object
4. And so on to higher abstraction levels
![Page 120: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/120.jpg)
120
Perception for what?
• Interaction with the environment, e.g., manipulation, navigation
• Process control, e.g., temperature control• Quality control, e.g., electronics inspection, mechanical
parts• Diagnosis, e.g., diabetes • Restoration, of e.g., buildings • Modeling, of e.g., parts, buildings, etc.• Surveillance, banks, parking lots, etc.• … • And much, much more
![Page 121: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/121.jpg)
121
Image analysis/Computer vision
1. Grab an image of the object (digitize analog signal)
2. Process the image (looking for certain features)1. Edge detection2. Region segmentation3. Color analysis4. Etc.
3. Measure properties of features or collection of features (e.g., length, angle, area, etc.)
4. Use some model for detection, classification etc.
![Page 122: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/122.jpg)
122
Visual Attention
![Page 123: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/123.jpg)
123
Pedestrian recognition
• C. Papageorgiou & T. Poggio, MIT
![Page 124: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/124.jpg)
124
![Page 125: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/125.jpg)
125
More robot examples
Rhex, U. Michigan
![Page 126: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/126.jpg)
126
• A McCulloch-Pitts neuron operates on a discrete time-scale, t = 0,1,2,3, ... with time tick equal to one refractory period
• At each time step, an input or output is
on or off — 1 or 0, respectively.
• Each connection or synapse from the output of one neuron to the input of another, has an attached weight.
Warren McCulloch and Walter Pitts (1943)
x (t)1
x (t)n
x (t)2
y(t+1)
w1
2
n
w
w
axon
![Page 127: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/127.jpg)
127
Leaky Integrator Neuron
• The simplest "realistic" neuron model is a continuous time model based on using the firing rate (e.g., the number of spikes traversing the axon in the most recent 20 msec.) as a continuously varying measure of the cell's activity
• The state of the neuron is described by a single variable, the membrane potential.
• The firing rate is approximated by a sigmoid, function of membrane potential.
![Page 128: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/128.jpg)
128
Leaky Integrator Model
= - m(t) + h
has solution m(t) = e-t/ m(0) + (1 - e-t/)h
h for time constant > 0.
• We now add synaptic inputs to get the
Leaky Integrator Model:
= - m(t) + i wi Xi(t) + h
where Xi(t) is the firing rate at the ith input.
• Excitatory input (wi > 0) will increase
• Inhibitory input (wi < 0) will have the opposite effect.
m(t)
m(t)
m(t)
![Page 129: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/129.jpg)
129
Hopfield Networks
• A Hopfield net (Hopfield 1982) is a net of such units subject to the asynchronous rule for updating one neuron at a time:
"Pick a unit i at random.
If wij sj i, turn it on. Otherwise turn it off."
• Moreover, Hopfield assumes symmetric weights:wij = wji
![Page 130: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/130.jpg)
130
“Energy” of a Neural Network
• Hopfield defined the “energy”:
E = - ½ ij sisjwij + i sii
• If we pick unit i and the firing rule (previous slide) does not change its si, it will not change E.
![Page 131: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/131.jpg)
131
Self-Organizing Feature Maps
• The neural sheet is represented in a discretized form by a (usually) 2-D lattice A of formal neurons.
• The input pattern is a vector x from some pattern space V. Input vectors are normalized to unit length.
• The responsiveness of a neuron at a site r in A is measured by x.wr = i xi wri
where wr is the vector of the neuron's synaptic efficacies.
• The "image" of an external event is regarded as the unit with the maximal response to it
![Page 132: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/132.jpg)
132
Example: face recognition
• Here using the 2-stage approach:
![Page 133: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/133.jpg)
133
Associative Memories
• Idea: store:
So that we can recover it if presented with corrupted data such as:
![Page 134: 1 Course Overview and summary We have discussed… - What AI and intelligent agents are - How to develop AI systems - How to solve problems using search](https://reader031.vdocument.in/reader031/viewer/2022013011/55144ebb550346494e8b500d/html5/thumbnails/134.jpg)
134
The End of the Class
• Final Exam Covers Chapters 1-11