




























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Artificial Intelligence (AI) is changing the world faster than ever! In this video, learn Artificial Intelligence in simple words with real-life examples. Discover how AI works in mobile phones, robots, self-driving cars, ChatGPT, YouTube recommendations, and more. Perfect for students, beginners, and tech lovers who want to understand the future of technology easily. Watch till the end to see how AI is becoming part of our daily life and why everyone is talking about it! #ArtificialIntelligence #AI #Technology #MachineLearning #FutureTech #ChatGPT #AIExplained #TechFacts #Innovation #Shorts #Trending #Viral #Education #Student #TechVideo
Typology: Study notes
1 / 68
This page cannot be seen from the preview
Don't miss anything!





























































UNIT - I Introduction to AI, Intelligent Agents, problem-Solving Agents, Searching for Solutions, Uninformed Search Strategies: Breadth-first search, Uniform cost search, Depth-first search, Iterative deepening Depth-first search, Bidirectional search,
Informed (Heuristic) Search Strategies: Greedy best-first search, A* search, Heuristic Functions,
Beyond Classical Search: Hill-climbing search, Simulated annealing search, Local Search in Continuous Spaces
UNIT - I Introduction to AI
For thousands of years, man has tried to understand how he thinks; that is, how a mere handful of matter can perceive, understand, predict, and manipulate a world far larger. The field of artificial intelligence, or AI, goes further still: it attempts not just to understand but also to build intelligent entities.
AI currently encompasses a huge variety of subfields, ranging from the general (learning and perception) to the specific, such as playing chess, proving mathematical theorems, writing poetry, driving a car on a crowded street, and diagnosing diseases. AI is relevant to any intellectual task; it is truly a universal field.
Eight definitions of AI, laid out along two dimensions, organized into four categories:
The definitions on top are concerned with thought processes and reasoning, whereas the ones on the bottom address behavior. The definitions on the left, measure success in terms of fidelity to human performance, whereas the ones on the right measure against an ideal performance measure, called rationality.
A system is rational if it does the “right thing,” given what it knows.
Acting humanly: The Turing Test approach
The Turing Test, proposed by Alan Turing (1950), was designed to provide a satisfactory operational definition of intelligence. A computer passes the test if a human interrogator, after posing some written questions, cannot tell whether the written responses come from a person or from a computer.
To make a computer intelligent ,it would need to possess the following capabilities:
Ex: Allen Newell and Herbert Simon, who developed GPS, the “General Problem Solver”, were not content merely to have their program solve problems correctly. They were more concerned with comparing the trace of its reasoning steps to traces of human subjects solving the same problems.
The interdisciplinary field of cognitive science brings together computer models from AI and experimental techniques from psychology to construct precise and testable theories of the human mind.. Real cognitive science, however, is necessarily based on experimental investigation of actual humans or animals.
Thinking rationally: The “laws of thought” approach
The Greek philosopher Aristotle was one of the first to attempt to codify “right thinking,” that is, irrefutable reasoning processes. His syllogisms provided patterns for argument structures that always yielded correct conclusions when given correct premises
Ex: “Socrates is a man; all men are mortal; therefore, Socrates is mortal.”
These laws of thought were supposed to govern the operation of the mind; their study initiated the field called logic. Logicians in the 19th century developed a precise notation for statements about all kinds of objects in the world and the relations among them. Logicist tradition within artificial intelligence hopes to build on such programs to create intelligent systems.
There are two main obstacles to this approach.
Acting rationally: The rational agent approach
An agent is just something that acts (agent comes from the Latin agere, to do). Computer agents are expected to do : operate autonomously, perceive their
environment, persist over a prolonged time period, adapt to change, and create and pursue goals.
A rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome. In the “laws of thought” approach to AI, the emphasis was on correct inferences. One way to act rationally is to reason logically to the conclusion that a given action will achieve one’s goals and then to act on that conclusion.
There are also ways of acting rationally that cannot be said to involve inference.
Ex: recoiling from a hot stove is a reflex action that is usually more successful than a slower action taken after careful deliberation.
All the skills needed for the Turing Test also allow an agent to act rationally.
The rational-agent approach has two advantages over the other approaches.
Disciplines that are working toward AI
A human agent has eyes, ears, and other organs for sensors and hands, legs, vocal tract, and so on for actuators. A robotic agent might have cameras and infrared range finders for sensors and various motors for actuators. A software agent receives keystrokes, file contents, and network packets as sensory inputs and acts on the environment by displaying on the screen, writing files, and sending network packets.
Percept refers to the agent’s perceptual inputs at any given instant. An agent’s percept sequence is the complete history of everything the agent has ever perceived. In general, an agent’s choice of action at any given instant can depend on the entire percept sequence observed to date, but not on anything it hasn’t perceived.
Mathematically speaking, an agent’s behavior is described by the agent function that maps any given percept sequence to an action. Tabulating the agent function, describes any given agent; for most agents, this would be a very large table—infinite, in fact, unless we place a bound on the length of percept sequences we want to consider.
Internally, the agent function for an artificial agent will be implemented by an agent program.
The agent function is an abstract mathematical description; the agent program is a concrete implementation, running within some physical system.
Ex: The vacuum-cleaner world with 2 locations, squares A and B
The vacuum agent perceives which square it is in and whether there is dirt in the square. It can choose to move left, move right, suck up the dirt, or do nothing. One very simple agent function is the following: if the current square is dirty, then suck; otherwise, move to the other square.
A partial tabulation of this agent
Vacuum-world agents can be defined simply by filling in the right-hand column in various ways.
Rationality :
A rational agent is one that does the right thing, i.e. every entry in the table for the agent function is filled out correctly.
Rational at any given time depends on four things:
Driving environment: Any taxi driver must deal with a variety of roads, ranging from rural lanes and urban alleys to 12-lane freeways. The roads contain other traffic, pedestrians, stray animals, road works, police cars, puddles, and potholes. The taxi must also interact with potential and actual passengers. There are also some optional choices. The taxi might need to operate in Southern California, where snow is seldom a problem, or in Alaska, where it seldom is not. It could always be driving on the right, or we might want it to be flexible enough to drive on the left when in Britain or Japan. Obviously, the more restricted the environment, the easier the design problem.
The actuators: for an automated taxi include those available to a human driver: control over the engine through the accelerator and control over steering and braking. In addition, it will need output to a display screen or voice synthesizer to talk back to the passengers, and perhaps some way to communicate with other vehicles, politely or otherwise.
The basic sensors: for the taxi will include one or more controllable video cameras so that it can see the road; it might augment these with infrared or sonar sensors to detect distances to other cars and obstacles. To avoid speeding tickets, the taxi should have a speedometer, and to control the vehicle properly, especially on curves, it should have an accelerometer. To determine the mechanical state of the vehicle, it will need the usual array of engine, fuel, and electrical system sensors. Like many human drivers, it might want a global positioning system (GPS) so that it doesn’t get lost. Finally, it will need a keyboard or microphone for the passenger to request a destination.
PEAS elements for agent types:
Software agents (or software robots or softbots) exist in rich, unlimited domains.
Ex: softbot Website operator designed to scan Internet news sources and show the interesting items to its users, while selling advertising space to generate revenue. To do well, that operator will need some natural language processing abilities, it will need to learn what each user and advertiser is interested in, and it will need to change its plans dynamically—for example, when the connection for one news source goes down or when a new one comes online.
Properties of task environments
Ex: Taxi driving is clearly stochastic in this sense, because one can never predict the behavior of traffic exactly; moreover, one’s tires blow out and one’s engine seizes up without warning.
Ex: The vacuum world as we described it is deterministic, but variations can include stochastic elements such as randomly appearing dirt and an unreliable suction mechanism. We say an environment is uncertain if it is not fully observable or not deterministic.
Word “stochastic” generally implies that uncertainty about outcomes is quantified in terms of probabilities; a nondeterministic environment is one in which actions are characterized by their possible outcomes, but no probabilities are attached to them. Nondeterministic environment descriptions are usually associated with performance measures that require the agent to succeed for all possible outcomes of its actions.
Ex: an agent that has to spot defective parts on an assembly line bases each decision on the current part, regardless of previous decisions; moreover, the current decision doesn’t affect whether the next part is defective.
In sequential environments, the current decision could affect all future decisions.
Ex: Chess and taxi driving are sequential: in both cases, short-term actions can have long-term consequences. Episodic environments are much simpler than sequential environments because the agent does not need to think ahead.
Dynamic environments are continuously asking the agent what it wants to do; if it hasn’t decided yet, that counts as deciding to do nothing. If the environment itself does not change with the passage of time but the agent’s performance score does, then we say the environment is semidynamic.
Ex: Taxi driving is clearly dynamic: the other cars and the taxi itself keep moving while the driving algorithm dithers about what to do next.
Ex: Chess, when played with a clock, is semidynamic.
Ex: Crossword puzzles are static.
Ex: the chess environment has a finite number of distinct states (excluding the clock). Chess also has a discrete set of percepts and actions.
Ex: Taxi driving is a continuous-state and continuous-time problem: the speed and location of the taxi and of the other vehicles sweep through a range of continuous values and do so smoothly over time.
Ex: Input from digital cameras is discrete, strictly speaking, but is typically treated as representing continuously varying intensities and locations.
agent = architecture + program.
Obviously, the program we choose has to be one that is appropriate for the architecture. If the program is going to recommend actions like Walk, the architecture had better have legs. The architecture might be just an ordinary PC, or it might be a robotic car with several onboard computers, cameras, and other sensors. In general, the architecture makes the percepts from the sensors available to the program, runs the program, and feeds the program’s action choices to the actuators as they are generated. Most of this syllabus is about designing agent programs.
Agent programs
The agent programs take the current percept as input from the sensors and return an action to the actuators.
agent program - takes the current percept as input from environment
agent function - takes the entire percept history and remembers them.
Trivial agent program that keeps track of the percept sequence and then uses it to index into a table of actions to decide what to do.
The TABLE-DRIVEN-AGENT program is invoked for each new percept and returns an action each time. It retains the complete percept sequence in memory.
Intelligent systems:
Simple reflex agents
These agents select actions on the basis of the current percept, ignoring the rest of the percept history. Ex: the vacuum agent’s decision is based only on the current location and on whether that location contains dirt.
The agent program for a simple reflex agent in the two-state vacuum environment.
Suppose that a simple reflex vacuum agent is deprived of its location sensor and has only a dirt sensor. Such an agent has just two possible percepts: [Dirty] and [Clean]. It can Suck in response to [Dirty]; what should it do in response to [Clean]? Moving Left fails (forever) if it happens to start in square A, and moving Right fails (forever) if it happens to start in square B. Infinite loops are often unavoidable for simple reflex agents operating in partially observable environments.
Model-based reflex agents
Agent maintains internal state that depends on the percept history and thereby reflects at least some of the unobserved aspects of the current state.
For the braking problem, the internal state is not too extensive— just the previous frame from the camera, allowing the agent to detect when two red lights at the edge of the vehicle go on or off simultaneously. For other driving tasks such as changing lanes, the agent needs to keep track of where the other cars are if it
The interesting part is the function UPDATE-STATE, which is responsible for creating the new internal state description.
A perhaps less obvious point about the internal “state” maintained by a model- based agent is that it does not have to describe “what the world is like now” in a literal sense.
Ex: the taxi may be driving back home, and it may have a rule telling it to fill up with gas on the way home unless it has at least half a tank. Although “driving back home” may seem to an aspect of the world state, the fact of the taxi’s destination is actually an aspect of the agent’s internal state. If you find this puzzling, consider that the taxi could be in exactly the same place at the same time, but intending to reach a different destination.
Goal-based agents:
Knowing something about the current state of the environment is not always enough to decide what to do.
Ex: at a road junction, the taxi can turn left, turn right, or go straight on. The correct decision depends on where the taxi is trying to get to.
Along with a current state description, the agent needs some sort of goal information that describes situations that are desirable
Ex: Going towards passenger’s destination is a goal.
The agent program can combine this with the model to choose actions that achieve the goal.
Sometimes goal satisfaction results immediately from a single action. Sometimes it will be more tricky—Ex: when the agent has to consider long sequences of twists and turns in order to find a way to achieve the goal.
Search and planning are the subfields of AI devoted to finding action sequences that achieve the agent’s goals.
The reflex agent brakes when it sees brake lights. A goal-based agent, in principle, could reason that if the car in front has its brake lights on, it will slow down. Given the way the world usually evolves, the only action that will achieve the goal of not hitting other cars is to brake.
Utility-based agents
Goals alone are not enough to generate high-quality behavior in most environments.
Ex: many action sequences will get the taxi to its destination (thereby achieving the goal) but some are quicker, safer, more reliable, or cheaper than others. Goals just provide a crude binary distinction between “happy” and “unhappy” states.