* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Problem Solving.pps
Technological singularity wikipedia , lookup
Artificial intelligence in video games wikipedia , lookup
Agent (The Matrix) wikipedia , lookup
Philosophy of artificial intelligence wikipedia , lookup
Ethics of artificial intelligence wikipedia , lookup
History of artificial intelligence wikipedia , lookup
Embodied cognitive science wikipedia , lookup
Intelligence explosion wikipedia , lookup
Existential risk from artificial general intelligence wikipedia , lookup
EA C461 – Artificial Intelligence Problem Solving Agents S.P.Vimal http://discovery.bits-pilani.ac.in/~vimalsp/1910AI/ To discuss… • Structure of an Agent • Problem Solving Agents Vimal EA C461- Artificial Intelligence Structure of Agents Agent = Architecture + Computing device Running Agent Program, with sensors & actuators Vimal Program Implements Agent Function, performs mapping of percepts to actions EA C461- Artificial Intelligence Agent Programs function Table-Driven-Agent (percept) returns an action static : percepts, a sequence, initially empty table, a table of actions, indexed by percept sequence, initially fully specified append percept to the end of percepts action LookUp (percepts,table) return action • For P percepts, T Life time, Lookup table will have Σt|P|t entries. • Large table size – Need small programs implement rational behavior Vimal EA C461- Artificial Intelligence Agent Programs • Kinds of Agent Programs – – – – Vimal Simple Reflex Agents Model-based Reflex Agents Goal Based Reflex Agents Utility-based Reflex Agents EA C461- Artificial Intelligence Simple Reflex Agents • Considers only the current percept, ignores rest of percept history function Reflex-Vacuum-Agent ([location, status]) returns an action If status=Dirty then return Suck else if location=A then return Right else if location=B return Left • Condition-action rules encoded – If car-in-front-is-braking then initiate-braking function Simple-Reflex-Agent (percept) returns an action static: rules, a set of condition-action rules state Interpret-Input (percept) rule Rule-Match (state, rules) action Rule-Action [rule] return action Vimal EA C461- Artificial Intelligence Simple Reflex Agents rectangles the current internal state; Ovals background information Vimal EA C461- Artificial Intelligence Model-Based Reflex Agents • Keep track of the part of the world which the agent can’t see now – Handling partial observability – Maintain an internal state depends the percept history • Updating internal state of the agent needs some information about – how the world evolves – the agent’s own action affects the world Vimal EA C461- Artificial Intelligence Model-Based Reflex Agents rectangles the current internal state; Ovals background information Vimal EA C461- Artificial Intelligence Model-Based Reflex Agents function Reflex-Agent-With-State (percept) returns an action static: rules, a set of condition-action rules state, a description of the current world state action, the most recent action, initially none state Update-Input (state, action, percept) rule Rule-Match (state, rules) action Rule-Action [rule] return action Vimal EA C461- Artificial Intelligence Goal-Based Agents • Having a goal, combined with the current state information can help select the possible next action – Possibly agent may need to consider every alternative action sequences leading to the goal search for a sequence leading to goal Vimal EA C461- Artificial Intelligence Goal-Based Agents rectangles the current internal state; Ovals background information Vimal EA C461- Artificial Intelligence Utility-Based Agents • Goals provide crude binary distinction between “happy” and “un happy” – If one state is preferred over the other, then it has higher utility for the agent utility-function (state) = real number (degree of happiness) • Complete specification of utility-function allows rational decisions in the following circumstances – Taking decision when in presence of Conflicting goals – When there are several goals that the agent can aim for. Vimal EA C461- Artificial Intelligence Utility-Based Agents rectangles the current internal state; Ovals background information Vimal EA C461- Artificial Intelligence Learning Agents • Build a learning machine and teach it • Learning agent has the following components – Learning element • Suggests modification to the existing rule to the critic – Performance element • Collection of knowledge and procedures for selecting the driving actions • Choice depends on Learning element – Critic • Observes the world and passes information to the learning element – Problem generator • Identifies certain areas of behavior needs improvement and suggest experiments Vimal EA C461- Artificial Intelligence Learning Agents rectangles the current internal state; Ovals background information Vimal EA C461- Artificial Intelligence Problem Solving Agent • A kind of Goal based Agent • Decides what to do by finding the sequences of actions that lead to desirable states Formulate Goal, Formulate Problem Search Execute Vimal EA C461- Artificial Intelligence Problems • Four components of problem definition – Initial state – Possible Actions • Uses a Successor Function – Returns <action, successor> pair • State Space • Path – Goal Test – Path cost • Step cost • Problem formulation is the process of deciding what actions and states to consider, given a goal Vimal EA C461- Artificial Intelligence Solutions • A Solution to the problem is the path from the initial state to the final state • Quality of solution is measured by path cost function – Optimal Solution has the lowest path cost among other solutions • An Agent with several immediate options of unknown value can decide what to do by first examining different possible sequences of actions that lead to a state of known value, and then choosing the best sequence Searching Process – Input to Search – Output from Search Vimal : Problem : Solution in the form of Action Sequence EA C461- Artificial Intelligence Problem Solving Agent A Problem solving Agent, Assuming the environment is • Static • Observable • Discrete • Deterministic Vimal EA C461- Artificial Intelligence Problem Solving Agent : Example A Simplified Road Map of Part of Romania Vimal EA C461- Artificial Intelligence Problem Solving Agent : Example • On holiday in Romania; currently in Arad • Flight leaves tomorrow from Bucharest • Formulate goal: – be in Bucharest • Formulate problem: – states: various cities – actions: drive between cities • Find solution: – sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest Vimal EA C461- Artificial Intelligence Example-1 : Vacuum World Problem Formulation • States – 2 x 22 = 8 states • Initial State – Any one of 8 states • Successor Function – Legal states that result from three actions (Left, Right, Suck) • Goal Test – All squares are clean • Path Cost – Number of steps (each step costs a value of 1) Vimal EA C461- Artificial Intelligence Example-1 : Vacuum World State Space for the Vacuum World. Labels on Arcs denote Vimal L: Left, R: Right, S: Suck EA C461- Artificial Intelligence Example-2 : The 8-Puzzle A typical Instance of 8-puzzle • • • • • Vimal States ? Initial State ? Successor Function ? Goal Test ? Path Cost ? EA C461- Artificial Intelligence Example-2 : The 8-Puzzle A typical Instance of 8-puzzle • • • • • Vimal States : Location of Tiles Initial State : One of States Successor Function: Move blank left, Right, Up, down Goal Test : Shown in Fig. Above Path Cost : 1 for each step EA C461- Artificial Intelligence