240 likes | 345 Views
midterm review. Intelligent Agents. Percept : the agent’s perceptual inputs at any given instant Percept Sequence : the complete history of everything the agent has ever perceived The agent function maps from percept histories to actions: [ f : P* A ] (abstract)
E N D
Intelligent Agents • Percept: the agent’s perceptual inputs at any given instant • Percept Sequence: the complete history of everything the agent has ever perceived • The agent function maps from percept histories to actions: [f: P* A] (abstract) • The agent program runs on the physical architecture to produce f. (implementation)
Percepts: location and contents, e.g., [A, Dirty] Actions: Left, Right, Suck, NoOp Example: Vacuum-Cleaner World
Task Environment • PEAS: Performance measure, Environment, Actuators, Sensors • Consider the task of designing an automated taxi: • Performance measure: safety, destination, profits, legality, comfort… • Environment: US streets/freeways, traffic, pedestrians, weather… • Actuators: steering, accelerator, brake, horn, speaker/display… • Sensors: camera, sonar, GPS, odometer, engine sensor…
Environment Types • Fully observable (vs. partially observable): An agent’s sensors give it access to the complete state of the environment at each point in time. • Card game vs. poker (needs internal memory) • Deterministic (vs. stochastic): The next state of the environment is completely determined by the current state and the action executed by the agent. • Chess vs. game with dice (uncertainty, unpredictable) • Episodic (vs. sequential): The agent’s experience is divided into atomic “episodes” (each episode consists of the agent perceiving and then performing a single action), and the choice of action in each episode depends only on the episode itself. • Chess and taxi driving
Environment Types • Static (vs. dynamic): The environment is unchanged while an agent is deliberation. (The environment is semidynamic if the environment itself does not change with the passage of time but the agent’s performance score does.) • Taxi driving vs. chess (when played with a clock) vs. crossword puzzles • Discrete (vs. continuous): A limited number of distinct, clearly defined percepts and actions. • Chess vs. taxi driving (infinite) • Single agent (vs. multiagent): An agent operating by itself in an environment. • Crossword puzzle vs. chess
Problem Formulation • A problem is defined by five components. • Initial state e.g., “at Arad” • Actions (s) {a1, a2, a3, … } • e.g., {Go(Sibiu), Go(Timisoara), Go(Zerind)} • Transition model: Result (s,a) s’ • e.g., Result(In(Arad), Go(Timisoara)) = In(Timisoara) • Goal test (s) T/F e.g., “at Bucharest” • Path cost (sss) n (additive) • sum of cost of individual steps, e.g., number of miles traveled, number of minutes to get to destination
states? A state description specifies the location of the eight tiles and the blank one. • initial state? any state • actions? movement of the blank space: Left, Right, Up, Down • transition model? (s,a)s’ • goal test? goal state (given) • path cost? 1 per move
Tree search vs. graph search • Tree search may have repeated state and redundant paths. • Graph search keeps the explored set: remembers every expanded node.
Uninformed Search Strategies • Uninformed search strategies use only the information available in the problem definition. • Breadth-first search Uniform-cost search Depth-first search • Depth-limited search Iterative deepening search
Informed Search Strategies • uses problem-specific knowledge beyond the definition of the problem itself • Best-first search • Idea: use an evaluation functionf(n) for each node • estimate of "desirability" • Expand most desirable unexpanded node • Special cases: • greedy best-first search • A* search
Best-first search • Greedy best-first search • Evaluation function f(n) = h(n) (heuristic) • = estimate of cost from n to goal • A*search • Evaluation function f(n) = g(n) + h(n) • g(n) = cost so far to reach n • h(n) = estimated cost from n to goal • f(n) = estimated total cost of path through n to goal
Local Search • Hill-Climbing Search • Variants • Simulated Annealing • Local Beam Search
Adversarial Search • Optimal decisions in games (minimax) • α-β pruning
Rule-Based Expert Systems • How to represent rules and facts • Inference Engine
Two approaches • Forward chaining • Backward chaining
Forward Chaining Exercise 1 • Use forward chaining to prove the following:
Backward chaining Exercise 1 • Use backward chaining to prove the following:
Conflict resolution • Conflict resolutionprovides a specific method for choosing which rule to fire. • Highest priority • Most specific rule • Most recent first
Uncertainty • Probability Theory • Bayesian Rule
Applying Bayes’ rule • A doctor knows that the disease meningitis causes the patient to have a stiff neck for 70% of the time. • The probability that a patient has meningitis is 1/50,000. • The probability that any patient has a stiff neck is 1%. • P(s|m) = 0.7 • P(m) = 1/50000 • P(s) = 0.01 • P(m|s) = ?
Bayesian reasoning Example: Cancer and Test • P(C) = 0.01 P(¬C) = 0.99 • P(+|C) = 0.9 P(-|C) = 0.1 • P(+|¬C) = 0.2 P(-|¬C) = 0.8 • P(C|+) = ?