Artificial Intelligence CSB2104 PDF
Document Details
Uploaded by ValiantCosecant
Badr University in Assiut
Abdel-Rahman Hedar
Tags
Summary
These lecture notes cover Artificial Intelligence, focusing on Intelligent Agents and their interactions with environments. The document includes details of different agent types and their characteristics, and explores concepts like environment types, performance measures, and agent autonomy.
Full Transcript
Artificial Intelligence CSB2104 Prof. Abdel-Rahman Hedar Intelligent Agents Chapter 2 2 Contents » Intelligent Agents (IA) » Environment types » IA Structure 3 Intelligent Agents (IA) 4 What is an (Intelligent) Agent? » A...
Artificial Intelligence CSB2104 Prof. Abdel-Rahman Hedar Intelligent Agents Chapter 2 2 Contents » Intelligent Agents (IA) » Environment types » IA Structure 3 Intelligent Agents (IA) 4 What is an (Intelligent) Agent? » An over-used, over-loaded, and misused term. » 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. 5 What is an (Intelligent) Agent? » PAGE (Percepts, Actions, Goals, Environment). » Task-specific & specialized: well-defined goals and environment. » The notion of an agent is meant to be a tool for analyzing systems Not an absolute characterization that divides the world into agents and non-agents. Much like, e.g., object-oriented vs. imperative program design approaches. 6 Example: A Windshield Wiper Agent How do we design an agent that can wipe the windshields when needed? » Goals ? » Percepts ? » Sensors ? » Effectors/Actuators? » Actions ? » Environment ? 7 Example: A Windshield Wiper Agent » Goals: To keep windshields clean and maintain good visibility » Percepts: Raining, Dirty » Sensors: Camera (moist sensor) » Effectors: Wipers (left, right, back) » Actions: Off, Slow, Medium, Fast » Environment: US inner city, freeways, highways, weather … 8 Example: Autonomous Vehicles Collision Avoidance Agent (CAA) Lane Keeping Agent (LKA) Goals: Avoid running into obstacles Goals: Stay in current lane Percepts ? Percepts ? Sensors? Sensors? Effectors ? Effectors ? Actions ? Actions ? Environment: Freeway Environment: Freeway 9 Collision Avoidance Agent (CAA) » Goals: Avoid running into obstacles » Percepts: Obstacle distance, velocity, trajectory » Sensors: Vision, proximity sensing » Effectors: Steering Wheel, Accelerator, Brakes, Horn, Headlights » Actions: Steer, speed up, brake, blow horn, signal (headlights) » Environment: Freeway 10 Lane Keeping Agent (LKA) » Goals: Stay in current lane » Percepts: Lane center, lane boundaries » Sensors: Vision » Effectors: Steering Wheel, Accelerator, Brakes » Actions: Steer, speed up, brake » Environment: Freeway 11 Agent PEAS Description 12 Conflict Resolution by Action Selection Agents » Override: CAA overrides LKA. » Arbitrate: if Obstacle is Close then CAA else LKA. » Compromise: Choose action that satisfies both agents. » Any combination of the above. » Challenges: Doing the right thing. 13 Behavior and Performance of IAs » Perception (sequence) to Action Mapping: 𝑓 ∶ 𝓟∗ 𝐴 Ideal mapping: specifies which actions an agent ought to take at any point in time Description: Look-Up-Table vs. Closed Form » Performance measure: a subjective measure to characterize how successful an agent is (e.g., speed, power usage, accuracy, money, etc.) » (degree of) Autonomy: to what extent is the agent able to make decisions and actions on its own? 14 The Right Thing = The Rational Action » Rational = Best (Yes, to the best of its knowledge) » Rational = Optimal (Yes, to the best of its abilities, including its constraints) » Rational ≠ Omniscience » Rational ≠ Clairvoyant » Rational ≠ Successful 15 How is an Agent different from other software? » Agents are autonomous, that is they act on behalf of the user » Agents contain some level of intelligence, from fixed rules to learning engines that allow them to adapt to changes in the environment » Agents don't only act reactively, but sometimes also proactively » Agents have social ability, that is they communicate with the user, the system, and other agents as required 16 How is an Agent different from other software? » Agents may also cooperate with other agents to carry out more complex tasks than they themselves can handle » Agents may migrate from one system to another to access remote resources or even to meet other agents 17 Environment Types 18 Environment Types Characteristics » Deterministic vs. nondeterministic » Episodic vs. non-episodic » Static vs. dynamic » Discrete vs. continuous » Single vs. multi agent 19 Environment Types » Deterministic vs. » Static vs. dynamic nondeterministic If the next state of the If the environment can change environment is completely while an agent is deliberating, determined by the current state then we say the environment is and the action executed by the dynamic for that agent; agent, then we say the otherwise, it is static. environment is deterministic; otherwise, it is stochastic. 20 Environment Types » Episodic vs. non-episodic » Discrete vs. continuous In an episodic task environment, The discrete/continuous the agent’s experience is divided distinction applies to the state of into atomic episodes. In each the environment, to the way time episode the agent receives a is handled, and to the percepts and percept and then performs a actions of the agent. single action. 21 Environments 22 IA Structure 23 Structure of Intelligent Agents » Agent = architecture + program » Agent program: the implementation of 𝑓 ∶ 𝓟∗ 𝐴, the agent’s perception-action mapping function: Skeleton-Agent(Percept) returns Action memory UpdateMemory(memory, Percept) Action ChooseBestAction(memory) memory UpdateMemory(memory, Action) return Action » Architecture: a device that can execute the agent program (e.g., general-purpose computer, specialized device, etc.) 24 Using a look-up-table » Example: Collision Avoidance Sensors:3 proximity sensors obstacle Effectors: Steering Wheel, Brakes sensors » How to generate? agent » How large? » How to select action? 25 Using a look-up-table » Example: Collision Avoidance Sensors:3 proximity sensors Effectors: Steering Wheel, Brakes » How to generate: for each p Pl Pm Pr generate an appropriate action, a S B obstacle sensors agent 26 Using a look-up-table » How large: size of table = #possible percepts × # possible actions obstacle = |Pl | |Pm| |Pr| |S| |B| sensors » E.g., P = {close, medium, far}3 agent » A = {left, straight, right} {on, off} then size of table = 27*3*2 = 162 » How to select action? Search. 27 Table-Driven Agent 28 Conclusion » Intelligent Agents: 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. » Rational Action: The action that maximizes the expected value of the performance measure given the percept sequence to date 29 Questions & Comments Abdel-Rahman Hedar [email protected] https://shorturl.at/ntI2x