BPSY361: Artificial Intelligence (AI) PDF

Summary

These are lecture notes on Artificial Intelligence for a course called BPSY361. The notes cover topics such as the introduction to AI, along with concepts and examples. The notes reference concepts such as probabilistic reasoning and problem-solving agents.

Full Transcript

BPSY361:Artificial Intelligence (AI) MISSION VISION CORE VALUES CHRIST is a nurturing ground for an Excellence and Service Faith in God | Moral Uprightness individual’s holistic development to make...

BPSY361:Artificial Intelligence (AI) MISSION VISION CORE VALUES CHRIST is a nurturing ground for an Excellence and Service Faith in God | Moral Uprightness individual’s holistic development to make 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/artific to enable problem-solving. ial-intelligence-in-psychology/#apps Excellence and Service CHRIST Deemed to be University Foundations of AI Philosophy The confirmation theory of Carnap and Carl Hempel (1905–1997) attempted to analyze the acquisition of knowledge from experience. Carnap’s book The Logical Structure of the World (1928) defined an explicit computational procedure for extracting knowledge from elementary experiences. It was probably the first theory of mind as a computational process Excellence and Service CHRIST Deemed to be University Mathematics Great contribution of mathematics to AI is the theory of probability. The Italian PROBABILITY Gerolamo Cardano (1501–1576) first framed the idea of probability, describing it in terms of the possible outcomes of gambling events. In 1654, Blaise Pascal (1623–1662), in a letter to Pierre Fermat (1601–1665), showed how to predict the future of an unfinished gambling game and assign average payoffs to the gamblers. Probability quickly became an invaluable part of all the quantitative sciences, helping to deal with uncertain measurements and incomplete theories. James Bernoulli (1654–1705), Pierre Laplace (1749–1827), and others advanced the theory and introduced new statistical methods. Thomas Bayes (1702–1761), who appears on the front cover of this book, proposed a rule for updating probabilities in the light of new evidence. Bayes’ rule underlies most modern approaches to uncertain reasoning in AI systems. Excellence and Service CHRIST Deemed to be University Economics Work in economics and operations research has contributed much to our notion of rational agents, yet for many years AI research developed along entirely separate paths. One reason was the apparent complexity of making rational decisions. The pioneering AI researcher Herbert Simon (1916–2001) won the Nobel Prize in economics in 1978 for his early SATISFICING work showing that models based on satisficing—making decisions that are “good enough,” rather than laboriously calculating an optimal decision—gave a better description of actual human behavior (Simon, 1947). Since the 1990s, there has been a resurgence of interest in decision-theoretic techniques for agent systems (Wellman, 1995). Excellence and Service CHRIST Deemed to be University Neuroscience The measurement of intact brain activity began in 1929 with the invention by Hans Berger of the electroencephalograph (EEG). The recent development of functional magnetic resonance imaging (fMRI) (Ogawa et al., 1990; Cabeza and Nyberg, 2001) is giving neuroscientists unprecedentedly detailed images of brain activity, enabling measurements that correspond in interesting ways to ongoing cognitive processes. These are augmented by advances in single-cell recording of neuron activity. Individual neurons can be stimulated electrically, chemically, or even optically (Han and Boyden, 2007), allowing neuronal input– output relationships to be mapped. Despite these advances, we are still a long way from understanding how cognitive processes actually work. Excellence and Service CHRIST Deemed to be University Psychology The field can be said to have started at a workshop in September 1956 at MIT. (We shall see that this is just two months after the conference at which AI itself was “born.”) At the workshop, George Miller presented The Magic Number Seven, Noam Chomsky presented Three Models of Language, and Allen Newell and Herbert Simon presented The Logic Theory Machine. These three influential papers showed how computer models could be used to address the psychology of memory, language, and logical thinking, respectively. It is now a common (although far from universal) view among psychologists that “a cognitive theory should be like a computer program” (Anderson, 1980); that is, it should describe a detailed information processing mechanism whereby some cognitive function might be implemented. Excellence and Service CHRIST Deemed to be University Computer Engineering The first operational computer was the electromechanical Heath Robinson, built in 1940 by Alan Turing’s team for a single purpose: deciphering German messages. In 1943, the same group developed the Colossus, a powerful general- purpose machine based on vacuum tubes. The first operational programmable computer was the Z-3, the invention of Konrad Zuse in Germany in 1941. Zuse also invented floating-point numbers and the first high-level programming language, Plankalk¨ul. The first electronic computer, the ABC, was assembled by John Atanasoff and his student Clifford Berry between 1940 and 1942 at Iowa State University. Atanasoff’s research received little support or recognition; it was the ENIAC, developed as part of a secret military project at the University of Pennsylvania by a team including John Mauchly and John Eckert, that proved to be the most influential forerunner of modern computers. Excellence and Service CHRIST Deemed to be University Computer Engineering AI-driven innovations in computer engineering, particularly in quantum computing, are transforming the field, enhancing the speed, efficiency, and scope of quantum systems. 1. Optimization of Quantum Algorithms 2. Error Mitigation and Noise Reduction 3. Quantum Hardware Design 4.Quantum Simulations for AI Models The Atanasoff-Berry Computer (ABC) holds historical significance as one of the earliest electronic digital computing devices. It was developed between 1937 and 1942 by John Vincent Atanasoff, a physicist and mathematician, and his graduate assistant, Clifford Berry, at Iowa State College (now Iowa State University). The ABC is often recognized as a precursor to modern computers, laying the groundwork for electronic computing. Excellence and Service CHRIST Deemed to be University Computer Engineering The Atanasoff-Berry Computer (ABC) holds historical significance as one of the earliest electronic digital computing devices. It was developed between 1937 and 1942 by John Vincent Atanasoff, a physicist and mathematician, and his graduate assistant, Clifford Berry, at Iowa State College (now Iowa State University). The ABC is often recognized as a precursor to modern computers, laying the groundwork for electronic computing. Innovations: Binary Arithmetic: It used binary (base-2) arithmetic instead of the decimal system, which simplified calculations. Electronic Switching: The ABC employed vacuum tubes for arithmetic calculations, making it faster than mechanical calculators. Separation of Memory and Processing: The design separated data storage (memory) and computational processes, a principle foundational to modern computing. Capacitor-based Storage: It used rotating drums and capacitors for data storage, an early form of electronic memory. 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 Excellence given 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 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 and Excellence informative Service experiences. 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 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. Excellence and Service 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 A problem-solving agent in AI is like a smart helper that figures out how to achieve Deemed a University to be goal or solve a problem step by step. Here's how it works in simple terms: 1. Goal-Oriented: It starts with a clear goal or problem to solve, like finding the shortest route on a map or solving a puzzle. 2. Defines the Problem: It breaks the problem into parts 3. Initial State: Where it begins. 4. Goal State: What it wants to achieve. 5.Actions: The steps it can take to move closer to the goal. 6.Rules/Constraints: The limits or rules it must follow. 7. Search for Solutions: The agent explores different possible actions and paths to find the best one that leads to the goal. It does this efficiently to save time and effort. 8. Decision Making: Once it finds a good path, it takes the necessary steps to reach the goal. 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 Excellence and Service

Use Quizgecko on...
Browser
Browser