AI Unit 1 PDF
Document Details
![AmazingBegonia](https://quizgecko.com/images/avatars/avatar-13.webp)
Uploaded by AmazingBegonia
CHRIST Deemed to be University
Tags
Related
- Artificial Intelligence CSB2104 Lecture Notes PDF
- CSE1100 Lecture 3C - Artificial Intelligence (AI) PDF
- CIT 478 Artificial Intelligence Course Guide PDF
- AI310 & CS361 Intro to Artificial Intelligence Lectures (Fall 2024) PDF
- Introduction to AI/Intelligent Agents Lecture 1 PDF
- Introduction to Intelligent Systems PDF
Summary
This document is a collection of lecture notes about Artificial Intelligence(AI) covering topics including intelligent agents, problem solving, and different types of AI agents.
Full Transcript
BPSY361:Artificial Intelligence (AI) MISSION VISION CORE VALUES CHRIST is a nurturing ground for an individual’s Excellence and Service Faith in God | Moral Uprightness holistic development to make effective contributi...
BPSY361:Artificial Intelligence (AI) MISSION VISION CORE VALUES CHRIST is a nurturing ground for an individual’s Excellence and Service Faith in God | Moral Uprightness holistic development to make effective contribution to Love of Fellow Beings CHRIST Deemed to be University Unit I: Introduction Introduction to AI: Basic concepts; Intelligent Agents: Agents and environments, Good behavior, nature of environments; Structure of agents; Problem solving: problem solving agents, example of problems. Excellence and Service CHRIST Deemed to be University Introduction to AI Artificial: ▪ Made by humans, especially in imitation of something natural. Excellence and Service CHRIST Deemed to be University What is artificial in AI? Artificial intelligence leverages computers and machines to mimic the problem-solving and decision-making capabilities of the human mind. Excellence and Service CHRIST Deemed to be University What is Intelligence? Ability to acquire and apply knowledge and skills Artificial Intelligence is a method of making a computer, a computer-controlled robot, or a software think intelligently like the human mind Excellence and Service CHRIST Deemed to be University Intelligence Stronger connection between brain hemispheres Einstein was 26 in 1905, his Annus Mirabilis (Miracle Year). The findings show that Einstein had more extensive connections between certain parts of his cerebral hemispheres compared to both younger and older control group brains. Excellence and Service CHRIST Deemed to be University Introduction to AI Artificial intelligence is a field, Psychology which combines computer science and robust datasets, Reference: https://positivepsychology.com/artificial-intelli to enable problem-solving. gence-in-psychology/#apps Excellence and Service CHRIST Deemed to be University Excellence and Service CHRIST Deemed to be University Intelligent agents: An agent is a computer program or system that is designed to perceive its environment, Make decisions and take actions to achieve a specific goal or set of goals. The agent operates autonomously, Excellence and Service CHRIST Deemed to be University Intelligent agents: AGENTS AND ENVIRONMENTS Rational agents: Logic or Reason —systems that can reasonably be called intelligent An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. an agent’s behavior is described by the agent function that maps any given percept sequence to an action. Excellence and Service CHRIST Deemed to be University AGENTS AND ENVIRONMENTS The agent function is an abstract mathematical description; the agent program is a concrete implementation, running within some physical system. Excellence and Service CHRIST Deemed to be University Example: vacuum-cleaner world Excellence and Service CHRIST Deemed to be University What are Agent and Environment? An agent is anything that can perceive its environment through sensors and acts upon that environment through effectors. A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the sensors, and other organs such as hands, legs, mouth, for effectors. A robotic agent replaces cameras and infrared range finders for the sensors, and various motors and actuators for effectors. A software agent has encoded bit strings as its programs and actions. Excellence and Service CHRIST Deemed to be University Agent Terminology Performance Measure of Agent − It is the criteria, which determines how successful an agent is. Behavior of Agent − It is the action that agent performs after any given sequence of percepts. Percept − It is agent’s perceptual inputs at a given instance. Percept Sequence − It is the history of all that an agent has perceived till date. Agent Function − It is a map from the percept sequence to an action. Excellence and Service CHRIST Deemed to be University GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY A rational agent is one that does the right thing—conceptually speaking, every entry in the table for the agent function is filled out correctly. considering the consequences of the agent’s behavior. What is rational at any given time depends on four things: The performance measure that defines the criterion of success. The agent’s prior knowledge of the environment. The actions that the agent can perform. The agent’s percept sequence to date. Excellence and Service CHRIST Deemed to be University Definition of a rational agent: For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has Excellence and Service CHRIST Deemed to be University Rule 1: An AI agent must have the ability to perceive the environment. Rule 2: The observation must be used to make decisions. Rule 3: Decision should result in an action. Rule 4: The action taken by an AI agent must be a rational action. Excellence and Service CHRIST Deemed to be University Example The performance measure awards one point for each clean square at each time step, over a “lifetime” of 1000 time steps. The “geography” of the environment is known a priori (Figure 2.2) but the dirt distribution and the initial location of the agent are not. Clean squares stay clean and sucking cleans the current square. The Left and Right actions move the agent left and right except when this would take the agent outside the environment, in which case the agent remains where it is. The only available actions are Left, Right, and Suck. The agent correctly perceives its location and whether that location contains dirt. Excellence and Service CHRIST Deemed to be University Omniscience, learning, and autonomy Omniscience: An omniscient agent knows the actual outcome of its actions and can act accordingly; learning : a rational agent not only to gather information but also to learn as much as possible from what it perceives. The agent’s initial configuration could reflect some prior knowledge of the environment Autonomy: A rational agent should be autonomous—it should learn what it can to compensate for partial or incorrect prior knowledge. Excellence and Service CHRIST Deemed to be University THE NATURE OF ENVIRONMENTS We must think about task environments, which are essentially the “problems” to which rational agents are the “solutions.” PEAS (Performance, Environment, Actuators, Sensors) Excellence and Service CHRIST Deemed to be University Properties of task environments Fully Observable vs Partially Observable When an agent sensor is capable to sense or access the complete state of an agent at each point in time, it is said to be a fully observable environment else it is partially observable. Maintaining a fully observable environment is easy as there is no need to keep track of the history of the surrounding. An environment is called unobservable when the agent has no sensors in all environments. Examples: Chess – the board is fully observable, and so are the opponent’s moves. Driving – the environment is partially observable because what’s around the corner is not known. Excellence and Service CHRIST Deemed to be University Properties of task environments Deterministic vs Stochastic When a uniqueness in the agent’s current state completely determines the next state of the agent, the environment is said to be deterministic. The stochastic environment is random in nature which is not unique and cannot be completely determined by the agent. Examples: Chess – there would be only a few possible moves for a coin at the current state and these moves can be determined. Self-Driving Cars- the actions of a self-driving car are not unique, it varies time to time. Excellence and Service CHRIST Deemed to be University Properties of task environments Episodic vs Sequential In an Episodic task environment, each of the agent’s actions is divided into atomic incidents or episodes. There is no dependency between current and previous incidents. In each incident, an agent receives input from the environment and then performs the corresponding action. Example: Consider an example of Pick and Place robot, which is used to detect defective parts from the conveyor belts. Here, every time robot(agent) will make the decision on the current part i.e. there is no dependency between current and previous decisions. In a Sequential environment, the previous decisions can affect all future decisions. The next action of the agent depends on what action he has taken previously and what action he is supposed to take in the future. Example: Checkers- Where the previous move can affect all the following moves. Excellence and Service CHRIST Deemed to be University Properties of task environments Dynamic vs Static An environment that keeps constantly changing itself when the agent is up with some action is said to be dynamic. Ex: A roller coaster ride is dynamic as it is set in motion and the environment keeps changing every instant. An idle environment with no change in its state is called a static environment. Ex:An empty house is static as there’s no change in the surroundings when an agent enters. Excellence and Service CHRIST Deemed to be University Properties of task environments Discrete vs Continuous If an environment consists of a finite number of actions that can be deliberated in the environment to obtain the output, it is said to be a discrete environment. Ex: The game of chess is discrete as it has only a finite number of moves. The number of moves might vary with every game, but still, it’s finite. The environment in which the actions are performed cannot be numbered i.e. is not discrete, is said to be continuous. Ex: Self-driving cars are an example of continuous environments as their actions are driving, parking, etc. which cannot be numbered. Excellence and Service CHRIST Deemed to be University Properties of task environments In a known environment, the output for all probable actions is given. Obviously, in case of unknown environment, for an agent to make a decision, it has to gain knowledge about how the environment works. Excellence and Service CHRIST Deemed to be University Structure of agents Agent = Architecture + Agent Program Architecture is the machinery that the agent executes on. It is a device with sensors and actuators, for example, a robotic car, a camera, and a PC. An agent program is an implementation of an agent function. An agent function is a map from the percept sequence(history of all that an agent has perceived to date) to an action. Excellence and Service CHRIST Deemed to be University Structure of agents Simple reflex agents Model-based reflex agents Goal-based agents Utility-based agents Learning Agent Excellence and Service CHRIST Deemed to be University Simple reflex agents The simplest kind of agent is the simple reflex agent. It responds directly to percepts i.e. these agent select actions on the basis of the current percept, ignoring the rest of the percept history. An agent describes about how the condition action rules allow the agent to make the connection from percept to action. Condition action rule: if condition then action Ex: if car-in-front-is-braking then initiate-braking Excellence and Service CHRIST Deemed to be University Model-based reflex agents (Agents that keep track of the world) The most effective way to handle partial observability is for the agent ―to keep track of the part of the world. That is, the agent which combines the current percept with the old internal state to generate updated description of the current state. Excellence and Service CHRIST Deemed to be University Goal-based agents An agent knows the description of current state and also needs some sort of goal information that describes situations that are desirable. The action matches with the current state is selected depends on the goal state. Excellence and Service CHRIST Deemed to be University Utility-based agents An agent generates a goal state with high – quality behavior (utility) that is, if more than one sequence exists to reach the goal state then the sequence with more reliable, safer, quicker and cheaper than others to be selected. Excellence and Service CHRIST Deemed to be University Learning Agent A learning agent in AI is the type of agent that can learn from its past experiences or it has learning capabilities. It starts to act with basic knowledge and then is able to act and adapt automatically through learning. 1. Learning element: It is responsible for making improvements by learning from the environment. 2. Critic: The learning element takes feedback from critics which describes how well the agent is doing with respect to a fixed performance standard. 3. Performance element: It is responsible for selecting external action. 4. Problem Generator: This component is responsible for suggesting actions that will lead to new and informative experiences. Excellence and Service CHRIST Deemed to be University Learning Agent Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS Problem Solving Agents decide what to do by finding a sequence of actions that leads to a desirable state or solution. Search: The process of looking for such a sequence, involving a systematic exploration of alternative actions. Problem definition: Detailed specification of inputs and acceptable system solutions. Problem analysis: Analyze the problem thoroughly. Knowledge Representation: collect detailed information about the problem and define all possible techniques. Problem-solving: Selection of best techniques. Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS The problem solving agent follows this four phase problem solving process: 1. Goal Formulation: This is the first and most basic phase in problem solving. It arranges specific steps to establish a target/goal that demands some activity to reach it. AI agents are now used to formulate goals. 2. Problem Formulation: It is one of the fundamental steps in problem-solving that determines what action should be taken to reach the goal. Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS 3. Search: After the Goal and Problem Formulation, the agent simulates sequences of actions and has to look for a sequence of actions that reaches the goal. This process is called search, and the sequence is called a solution. The agent might have to simulate multiple sequences that do not reach the goal, but eventually, it will find a solution, or it will find that no solution is possible. A search algorithm takes a problem as input and outputs a sequence of actions. 4. Execution: After the search phase, the agent can now execute the actions Excellence and Service that CHRIST Deemed to be University PROBLEM-SOLVING AGENTS A formal definition of a problem consists of five components: Initial State Actions Transition Model Goal Test Path Cost Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS 1) Initial State It is the agent’s starting state or initial step towards its goal. For example, if a taxi agent needs to travel to a location(B), but the taxi is already at location(A), the problem’s initial state would be the location (A). 2) Actions It is a description of the possible actions that the agent can take. Given a state s, Actions(a) returns the actions that can be executed in s. Each of these actions is said to be appropriate in s. Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS 3)Transition Model It describes what each action does. It is specified by a function Result(s, a) that returns the state that results from doing action an in state s. The initial state, actions, and transition model together define the state space of a problem, a set of all states reachable from the initial state by any sequence of actions. The state space forms a graph in which the nodes are states, and the links between the nodes are actions. Excellence and Service CHRIST Deemed to be University Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS 4) Goal Test This stage determines that the specified goal achieved by the integrated transition model or not, whenever the goal achieves stop the action and forward into the next stage to determines the cost to achieve the goal. Excellence and Service CHRIST Deemed to be University PROBLEM-SOLVING AGENTS 5) Path Cost It assigns a numerical cost to each path that leads to the goal. The problem solving agents choose a cost function that matches its performance measure. Remember that the optimal solution has the lowest path cost of all the solutions. Excellence and Service CHRIST Deemed to be University Excellence and Service CHRIST Deemed to be University Example Problems The problem solving approach has been used in a wide range of work contexts. There are two kinds of problem approaches Standardized/ Toy Problem: Its purpose is to demonstrate or practice various problem solving techniques. Ex: puzzles Real-world Problems: It is real-world problems that need solutions. It does not rely on descriptions, unlike a toy problem, yet we can have a basic description of the issue. Excellence and Service CHRIST Deemed to be University Toy Problem Excellence and Service CHRIST Deemed to be University Excellence and Service CHRIST Deemed to be University Example Problems States: The state is determined by both the agent location and the dirt locations. The agent is in one of two locations, each of which might or might not contain dirt. Thus, there are 2 × 22 = 8 possible world states. A larger environment with n locations has n · 2n states. Initial state: Any state can be designated as the initial state. Actions: In this simple environment, each state has just three actions: Left, Right, and Suck. Larger environments might also include Up and Down. Transition model: The actions have their expected effects, except that moving Left in the leftmost square, moving Right in the rightmost square, and Sucking in a clean square have no effect. Goal test: This checks whether all the squares are clean. Path cost: Each step costs 1, so the path cost is the number of steps in the path. Excellence and Service CHRIST Deemed to be University 8-puzzle Excellence and Service CHRIST Deemed to be University 8-puzzle States: A state description specifies the location of each of the eight tiles and the blank in one of the nine squares. Initial state: Any state can be designated as the initial state. Actions: The simplest formulation defines the actions as movements of the blank space Left, Right, Up, or Down. Different subsets of these are possible depending on where the blank is. Transition model: Given a state and action, this returns the resulting state; for example, if we apply Left to the start state, the resulting state has the 5 and the blank switched. Goal test: This checks whether the state matches the goal Path cost: Each step costs 1, so the path cost is the number of steps in the path. Excellence and Service CHRIST Deemed to be University 8-queens problem Excellence and Service CHRIST Deemed to be University 8-queens problem States: Any arrangement of 0 to 8 queens on the board is a state. Initial state: No queens on the board. Actions: Add a queen to any empty square. Transition model: Returns the board with a queen added to the specified square. Goal test: 8 queens are on the board, none attacked. Excellence and Service CHRIST Deemed to be University Real-world problems Excellence and Service CHRIST Deemed to be University Route-finding problem Route-finding problem Excellence and Service CHRIST Deemed to be University Touring problems Touring problems are closely related to route-finding problems, but with an important difference. Consider, for example, the problem “Visit every city in Figure 3.2 at least once, starting and ending in Bucharest.” As with route finding, the actions correspond to trips between adjacent cities. The state space, however, is quite different. Each state must include not just the current location but also the set of cities the agent has visited. So the initial state would be In(Bucharest), Visited({Bucharest}), a typical intermediate state would be In(Vaslui), Visited({Bucharest, Urziceni, Vaslui}), and the goal test would check whether the agent is in Bucharest and all 20 cities have been visited. Excellence and Service CHRIST Deemed to be University Traveling salesperson problem Excellence and Service CHRIST Deemed to be University Unit I: Introduction Introduction to AI: Basic concepts; Intelligent Agents: Agents and environments, Good behavior, nature of environments; Structure of agents; Problem solving: problem solving agents, example of problems. Excellence and Service