0% found this document useful (0 votes)
57 views

Unit 1

Uploaded by

Rishabh Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Unit 1

Uploaded by

Rishabh Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Unit 1

Artificial Intelligence
Introduction
“The study of the computations that make it possible to
perceive reason and act”
or
"It is a branch of computer science by which we can create
intelligent machines which can behave like a human, think
like humans, and able to make decisions."
Artificial Intelligence refers to the simulation of human intelligence in machines
that are programmed to think, reason, and learn like humans. AI systems use
algorithms and vast amounts of data to recognize patterns, make decisions, and
improve their performance over time. Artificial Intelligence uses wide range of
technologies, including machine learning, natural language processing, computer
vision, and robotics. These technologies enable AI systems to perform complex
tasks, such as speech recognition and face detection, with remarkable accuracy.

 With the help of AI, you can create such software or devices which can
solve real-world problems very easily and with accuracy such as health
issues, marketing, traffic issues, etc.
 With the help of AI, you can create your personal virtual Assistant, such as
Cortana, Google Assistant, Siri, etc.
 With the help of AI, you can build such Robots which can work in an
environment where survival of humans can be at risk.
 AI opens a path for other new technologies, new devices, and new
Opportunities.
Core Concepts in AI
1. Machine Learning (ML): This is the backbone of AI, where algorithms learn
from data without being explicitly programmed. It involves training an
algorithm on a data set, allowing it to improve over time and make predictions
or decisions based on new data.
2. Neural Networks: Inspired by the human brain, these are networks of
algorithms that mimic the way neurons interact, allowing computers to
recognize patterns and solve common problems in the fields of AI, machine
learning, and deep learning.
3. Deep Learning: A subset of ML, deep learning uses complex neural networks
with many layers to analyze various factors of data.
4. Natural Language Processing (NLP): NLP involves programming computers
to process and analyze large amounts of natural language data, enabling
interactions between computers and humans using natural language.
5. Robotics: While often associated with AI, robotics merges AI concepts with
physical components to create machines capable of performing a variety of
tasks, from assembly lines to complex surgeries.
6. Cognitive Computing: This AI approach mimics human brain processes to
solve complex problems, often using pattern recognition, NLP, and data
mining.
7. Expert Systems: These are AI systems that emulate the decision-making
ability of a human expert, applying reasoning capabilities to reach conclusions.
AI works in five steps
 Input: Data is collected from various sources. This data is then sorted into
categories.
 Processing: The AI sorts and deciphers the data using patterns it has been
programmed to learn until it recognizes similar patterns in the data.
 Outcomes: The AI can then use those patterns to predict outcomes.
 Adjustments: If the data sets are considered as “fail,” AI learns from that
mistake, and the process is repeated again under different conditions.
 Assessments: In this way, AI is constantly learning and improving.

Types of Artificial Intelligence


Based on Capabilities
1. Weak AI or Narrow AI: It is like a specialist for specific task in the world
of Artificial Intelligence. It's a supercomputer that combines Expert
Systems, Machine Learning, and Natural Language Processing, but it's still a
specialist.
2. General AI: General AI is like the holy grail of artificial intelligence.
Picture it as a system that could do any intellectual task with the efficiency
of a human. General AI aims to create machines that think and learn like
humans, but here's the catch: there's no such system in existence yet.
3. Super AI: It's the pinnacle (Top) of machine intelligence, where machines
surpass human capabilities in every cognitive aspect. These machines can
think, reason, solve puzzles, make judgments, plan, learn, and communicate
independently. However, it's important to note that Super AI is currently a
hypothetical concept.
Based on Functionality
1. Reactive Machines: Reactive Machines represent the most basic form of
Artificial Intelligence. These machines live in the present moment and don't
have memories or past experiences to guide their actions. An example of a
reactive machine is IBM's Deep Blue, the chess-playing computer.
2. Limited Memory: Limited Memory machines can remember some past
experiences or data but only for a short period. They use this stored
information to make decisions and navigate situations. A great example of
this type of AI is seen in self-driving cars.
3. Theory of Mind: Theory of Mind AI is still in the realm of research and
development. These AI systems aim to understand human emotions and
beliefs and engage in social interactions much like humans. Machines that
can understand and interact with humans on a deeper, more emotional level.
4. Self-Awareness: Self-Awareness AI is the future frontier of Artificial
Intelligence. These machines will be extraordinarily intelligent, possessing
their own consciousness, emotions, and self-awareness. They'll be smarter
than the human mind itself.

Advantages of Artificial Intelligence


Following are some main advantages of Artificial Intelligence

o High Accuracy with less errors


o High-Speed
o High reliability
o Useful for risky areas AI machines can be helpful in situations such as
defusing a bomb, exploring the ocean floor, where to employ a human can
be risky.
o Digital Assistant AI can be very useful to provide digital assistant to the
users such as AI technology is currently used by various E-commerce
websites to show the products as per customer requirement.
o Useful as a public utility AI can be very useful for public utilities such as a
self-driving car which can make our journey safer and hassle-free, facial
recognition for security purpose, Natural language processing to
communicate with the human in human-language, etc.
o Enhanced Security
o In Research
Disadvantages of Artificial Intelligence
o High Cost The hardware and software requirement of AI is very costly.
o Can't think out of the box They cannot work out of the box, as the robot
will only do that work for which they are trained, or programmed.
o No feelings and emotions It does not have the feeling so it cannot make
any kind of emotional attachment with human, and may sometime be
harmful for users if the proper care is not taken.
o Increase dependency on machines With the increment of technology,
people are getting more dependent on devices.
o No Original Creativity AI machines cannot beat this power of human
intelligence and cannot be creative and imaginative.
o Complexity: Making and keeping AI systems can be very complicated and
need a lot of knowledge.
o Job Concerns: As AI gets better, it worries people about losing jobs in
different fields.
The Future of Artificial Intelligence
The future of Artificial Intelligence (AI) is both exciting and complex, with the
potential to transform virtually every aspect of our lives. As the technology
continues to evolve, we can expect to see a range of advancements and
developments that will shape the years to come.
Advancements in Machine Learning and Deep Learning: The rapid
progress in machine learning and deep learning techniques will enable the
creation of even more sophisticated and capable AI systems.
Expansion of Autonomous Systems: As the technology becomes more
reliable and safer, we can expect to see these systems become more prevalent
in our daily lives, transforming the way we travel, work, and interact with our
surroundings.
Emergence of General AI: The realization of general AI would represent a
significant milestone in the field and could lead to transformative
breakthroughs in various domains.
Integration with Internet of Things (IoT) and Edge Computing: The
integration of AI with IoT and edge computing will become increasingly
important. This will enable the deployment of AI-powered applications and
services at the edge.
Advancements in Natural Language Processing and Conversational
AI: This could lead to the creation of virtual assistants, chatbots, and other AI-
powered interfaces that can understand and respond to human language in
more meaningful and contextual ways.
Interdisciplinary Collaboration: The future of AI will require close
collaboration between various disciplines, including computer science,
cognitive science, neuroscience, and ethics. This cross-pollination of ideas and
expertise will be crucial for addressing the complex challenges and
opportunities presented by the technology.

Intelligent Agent
An agent can be anything that perceive its environment through sensors and act
upon that environment through actuators. An Agent runs in the cycle
of perceiving, thinking, and acting. An agent can be:

o Human-Agent: A human agent has eyes, ears, and other organs which work
for sensors and hand, legs, vocal tract work for actuators.
o Robotic Agent: A robotic agent can have cameras, infrared range finder,
NLP for sensors and various motors for actuators.
o Software Agent: Software agent can have keystrokes, file contents as
sensory input and act on those inputs and display output on the screen.
Sensor: Sensor is a device which detects the change in the environment and sends
the information to other electronic devices. An agent observes its environment
through sensors.

Actuators: Actuators are the component of machines that converts energy into
motion. The actuators are only responsible for moving and controlling a system.
An actuator can be an electric motor, gears, rails, etc.

Effectors: Effectors are the devices which affect the environment. Effectors can be
legs, wheels, arms, fingers, wings, fins, and display screen.

Following are the main four rules for an AI agent:

 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.
Agents can be classified into different types based on their characteristics, such as
whether they are reactive or proactive, whether they have a fixed or dynamic
environment, and whether they are single or multi-agent systems.
Reactive agents are those that respond to immediate stimuli from their
environment and take actions based on those stimuli. Proactive agents, on the
other hand, take initiative and plan ahead to achieve their goals.
Fixed environments have a static set of rules that do not change, while dynamic
environments are constantly changing and require agents to adapt to new
situations.
Multi-agent systems involve multiple agents working together to achieve a
common goal. These agents may have to coordinate their actions and
communicate with each other to achieve their objectives.
Artificial intelligence is defined as the study of rational agents. A rational agent
could be anything that makes decisions, such as a person, firm, machine, or
software.
An agent is anything that can be viewed as:
 Perceiving its environment through sensors and
 Acting upon that environment through actuators

Structure of an AI Agent
To understand the structure of Intelligent Agents, we should be familiar
with Architecture and Agent programs. Architecture is the machinery that the
agent executes on. It is a device with sensors and actuators,

Agent = Architecture + Agent Program

Examples of agents in artificial intelligence


Intelligent personal assistants: These are agents that are designed to help users
with various tasks, such as scheduling appointments, sending messages, and
setting reminders. Examples of intelligent personal assistants include Siri, Alexa,
and Google Assistant.
Autonomous robots: These are agents that are designed to operate autonomously
in the physical world. They can perform tasks such as cleaning, sorting, and
delivering goods. Examples of autonomous robots include the Roomba vacuum
cleaner and the Amazon delivery robot.
Gaming agents: These are agents that are designed to play games, either against
human opponents or other agents. Examples of gaming agents include chess-
playing agents and poker-playing agents.
Fraud detection agents: These are agents that are designed to detect fraudulent
behavior in financial transactions. They can analyze patterns of behavior to
identify suspicious activity and alert authorities. Examples of fraud detection
agents include those used by banks and credit card companies.
Traffic management agents: These are agents that are designed to manage
traffic flow in cities. They can monitor traffic patterns, adjust traffic lights, and
reroute vehicles to minimize congestion. Examples of traffic management agents
include those used in smart cities around the world.
A software agent has Keystrokes, file contents, received network packages that
act as sensors and displays on the screen, files, and sent network packets acting as
actuators.
A Human-agent has eyes, ears, and other organs which act as sensors, and
hands, legs, mouth, and other body parts act as actuato
actuators.
A Robotic agent has Cameras and infrared range finders which act as sensors
and various motors act as actuators.

Types of Agents
 Simple Reflex Agents
 Model-Based
Based Reflex Agents
 Goal-Based Agents
 Utility-Based Agents
 Learning Agent
 Multi-agent systems
 Hierarchical agents

Simple Reflex Agents


Simple reflex agents ignore the rest of the percept history and act only on the
basis of the current percept
percept. The agent function is based on the condition-
action rule. A condition-action
action rule is a rule that maps a state i.e., a condition to
an action. If the condition is true, then the action is taken, else not.
Model-Based
Based Reflex Agents
It works by finding a rule whose condition matches the current situation. A
model-based
based agent can handle partially observable environments
vironments by the use of
a model about the world.
The agent has to keep track of the internal state which is adjusted by each
percept and that depends on the percept history. The current state is stored inside
the agent which maintains some kind of structure describing the part of the world
which cannot be seen.
Updating the state requires information about:
 How the world evolves independently from the agent?
 How do the agent’s actions affect the world?
Goal-Based Agents
These kinds of agents take decisions based on how far they are currently from
their goal(description
(description of desirable situations). Their every action is intended to
reduce their distance from the goal. This allows the agent a way to choose among
multiple possibilities, selecting th
the one which reaches a goal state.
Utility-Based Agents
The agents which are developed having their end uses as building blocks are
called utility-based
based agents. When there are multiple possible alternatives, then to
decide which one is best, utility
utility-based agents are used. They choose actions based
on a preference (utility) for each state.
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
dge and then is
able to act and adapt automatically through learning. A learning agent has mainly
four conceptual components, which are:
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.
Multi-Agent Systems
These agents interact with other agents to achieve a common goal. They may
have to coordinate their actions and communicate with each other to achieve their
objective.
A multi-agent system (MAS) is a system composed of multiple interacting agents
that are designed to work together to achieve a common goal. These agents may
be autonomous or semi-autonomous and are capable of perceiving their
environment, making decisions, and taking action to achieve the common
objective.
Hierarchical Agents
These agents are organized into a hierarchy, with high-level agents overseeing the
behavior of lower-level agents. The high-level agents provide goals and
constraints, while the low-level agents carry out specific tasks. Hierarchical
agents are useful in complex environments with many tasks and sub-tasks.
Uses of Agents
Agents are used in a wide range of applications in artificial intelligence
Robotics: Agents can be used to control robots and automate tasks in
manufacturing, transportation, and other industries.
Smart homes and buildings: Agents can be used to control heating, lighting,
and other systems in smart homes and buildings, optimizing energy use and
improving comfort.
Transportation systems: Agents can be used to manage traffic flow, optimize
routes for autonomous vehicles, and improve logistics and supply chain
management.
Healthcare: Agents can be used to monitor patients, provide personalized
treatment plans, and optimize healthcare resource allocation.
Finance: Agents can be used for automated trading, fraud detection, and risk
management in the financial industry.
Games: Agents can be used to create intelligent opponents in games and
simulations, providing a more challenging and realistic experience for players.
Natural language processing: Agents can be used for language translation,
question answering, and chatbots that can communicate with users in natural
language.
Cyber Security: Agents can be used for intrusion detection, malware analysis,
and network security.
Environmental monitoring: Agents can be used to monitor and manage
natural resources, track climate change, and improve environmental
sustainability.
Social media: Agents can be used to analyze social media data, identify trends
and patterns, and provide personalized recommendations to users.
Problem Solving Approach to Typical Al Problems
Problems are the issues which come across any system. A solution is needed to
solve that particular problem. Strong intelligence is required to solve such
problems. Traditionally people think that the person who is able to solve more and
more problems is more intelligent than others. It is always said that problem
solving skills demonstrates intelligence hence it becomes a major aspect in
artificial intelligence to solve the problems. In order to understand how exactly
problem solving contributes to intelligence, one needs to find out how intelligent
species solve problems. The classical approach to solving a problem is quite simple
in which, given a problem at hand hit and trial method is used to check for various
solutions to that problem.

Generate and Test


This is a technical name given to the classical way of solving problems where
different combinations are generated to solve the problems, and the one which
solves the problem is taken as the correct solution. The rest of the combinations
that are considered as incorrect solution are destroyed.
Al Components that are required to solve problem
There are six major components of an artificial intelligence system. They are solely
responsible for generating desired results for particular problem. These
components are as follows,
1. Knowledge Representation: It is the major foundation of an artificial
intelligence system. It is used for representing necessary knowledge so as to
generate knowledge base with the help of which AI system can perform tasks and
generate results.
2. Heuristic Searching Techniques: Usually while dealing with the problems the
knowledge base keeps on growing and growing making it difficult to search in that
knowledge base. To tackle with this challenge, heuristic searching techniques can
be used which can provide results (because of certain criteria) efficiently in terms
of time and memory usage.
3. Artificial Intelligence Hardware: Hardware compatibility is major concern
when it comes to deploy software on machines. Hardware must be efficient to
accommodate and produce desire results. Hardware components include each and
every machinery required spanning from memory to processor to communicating
devices. Al systems incomplete without Al hardware.
4. Computer Vision and Pattern Recognition: AI programs capture the inputs on
their own by generating a real world scenario with the help of this component.
Sufficient and compatible hardware enables better patterns gathering that makes a
useful knowledge base.
5. Natural Language Processing: This component processes or analyses written
or spoken languages. Speech recognition is not sufficient to capture real world
data. Acquiring the word sequence and parsing sentence into computer is not just
sufficient to gain knowledge about environment for AI systems. Natural Language
processing plays vital role in understanding of domain of text to AI systems.
6. Artificial Intelligence Language and Support Tools: Artificial Intelligence
languages are almost similar to traditional software development programming
languages with additional feature to capture human brain processes and logic as
much as possible.

What is Problem Solving?


For solving any type problem (task) in real world one needs formal description of
the problem.
One should have clear understanding of following aspects of the problem →
1. What is the Explicit Goal of the Problem
Goals help to organize behavior of systems by limiting the objectives that the agent
is trying to achieve. Goal formulation is based on the current situation and the
agent's performance measure. It is first step towards problem solving.
2. What is Implicit Criteria for Success
That is how success is defined. That will be the ultimate thing system needs to
achieve, which is the problem solution's output.
3. What is the Initial Situation
It means that what is going to be the start state of problem being solved.
4. Ability to Perform
It tells how agents transforms from one situation to another, how operations and
rules are specified which change the states of the problem during solution process.

Well Defined Problems


Problem formulation is the process of deciding what actions and states to consider,
given a goal.
A problem can be defined formally by four components.
Initial state that the agent starts in
A description of the possible actions available to the agent
The goal test
A path cost function
Problem Formulation Types
There are two main kinds of problem formulation ⇒
1) Incremental formulation
2) Complete-state formulation.
1) Incremental formulation
• It involves operators that augment the state description, starting with an empty
state.
• It generates many sequences.
• Memory requirements is less as all states are not explored (exploration will be
done till the goal is found).
2) Complete state formulation
• In this initially we will have some basic configuration represented in initial state.
• Here while doing any action first the conditions on the actions will be checked so
that the configuration state after the action will be same legal state.
• It takes up large memory as complete state space is generated. This formulation
reduces number of sequences generated.
Solving the Problem
Finding the solution of a problem is procedure which involves following phases←
1) Problem definition: Where in detailed specification of inputs and what
constitutes an acceptable solution is described.
2) Problem analysis: Where in problem is studied through various view points
like inputs, to the problem, environment of the problem, expected outputs.
3) Knowledge representation: Where in the known data about the problem and
various expected stimuli from environment is represented in perticular format
which is helpful for taking actions.
4) Problem solving: Where in the selection of best suited techniques for problem
solutions are thought of and finalized.

Problem Solving Agents


1. Approach of Problem Solving Agent

Problem Sequence of Successful


Generate Act
Solving Agent Actions States
Goal based agents are also called as problem solving agent.
Problem solving agent adapt to the task environment understand goal and achieve
success -
Problem solving agents determine sequence of actions which generate successful
state. Problem solving agent can be aimed at maximizing performance measure
there by developing intelligent problem solving agent.
2. Steps in Problem Solving
Problem solving agent achieves success by taking following approach to problem
solution -
Step 1: Goal setting
Agent set the goal by considering the environment.
Step 2: Goal formulation
The goals set in step 1 are formalized in the frame work. The key activity in goal
formulation is
1) To observe current state. 2) To tabulate agents performance measures.
Step 3: Problem formulation
After formulating goal, it is required to find out what will be the sequence of
actions which generate goal state.
Problem formulation is a way of looking at actions and states generated because of
actions, which leads to success.
Step 4: Search in unknown environment
If the task environment is unknown then agent first tries different sequence of
actions and gathers knowledge (i.e. learning). Then agent gets known set of actions
which leads to goal state. Thus agent search for describable sequence of actions
this process is called as searching process.
Step 5: Execution phase
Once the solution is given by the search algorithm then the actions suggested by
the algorithm are executed. This is the execution phase. Solution guides agent for
doing the actions. After executing the actions agent again formulate new goal.
Step 5: Execution phase
Once the solution is given by the search algorithm then the actions suggested by
the algorithm are executed. This is the execution phase. Solution guides agent for
doing the actions. After executing the actions agent again formulate new goal.
3. Algorithm
Procedure or method: Problem solving agent (unknown space, percept).
Results: An action.
Input: P→ percept (Environment perception)
Static:
1) A → An action sequence, initially with null value.
2) S→ State-current state.
3) G→ Goal - A goal initially null.
4) P→ Problem - A real world situation.
State- update state (State, percept)
If (s) is empty then do
g← Formulate goal (s)
P← Formulate problem (s, g)
S← Search (p)
G← First (s)
S← Rest (s)
Return a Procedure
4. Example of Problem Solving Agent
Consider following simple problem solving agent. Working in open-loop system.
Open-loop system means agent is assumed to be working in following environment
-
1) Static environment: Where in problem formulation and solution is done by
ignoring the changes that can occur in environment.
2) Observable environment: Where in agent has complete knowledge of
environment.
3) Discrete environment: Where in the idea of enumerating "alternative courses of
actions" is implemented.
4) Deterministic environment: Where in next state is configured from current
state.
Questions and Answers related to topics
Q.1 Define an agent.
Ans.: An agent is anything (a program, a machine assembly) that can be viewed as
perceiving its environment through sensors and acting upon that environment
through actuators.
Q.2 Define rational agent.
Ans.: A rational agent is agent which always works as per the expected
performance. It is a agent who always acts perfectly as per the expectation. It tries
to maximize expected behavioural performance.
Q.3 Give the general model of learning agent.
Ans.: Learning agent model have four component -
1) Learning Element - Which is responsible for making improvements.
2) Performance Elements - Which is responsible for selecting external actions.
3) Critic - It tells how agent is doing. (that is it evaluates output).
4) Problem Generator - It responsible for suggesting actions.
Q.4 What is role of agent program?
Ans.: Agent program is important and central part of agent system. It drives the
agent, which means that it analyzes date and provides probable actions agent could
take. An agent program is internally implemented as agent function. An agent
program takes input as the current percept from the sensor and return an action to
the effectors (Actuator).
Q.5 List down the characteristics of intelligent agent.
Ans.: 1) The IA must learn and improve through interaction with the environment.
2) The IA must adapt online and in the real time situation.
3) The IA must accommodate new problem solving rules incrementally.
4) The IA must have memory which must exhibit storage and retrieval capacities.
Q.6 Define abstraction.
Ans.: In artificial intelligence the abstraction is commonly used to account for the
use of various levels in details in a given representation language or the ability to
change from one level to another while preserving useful properties. Abstraction
has been mainly studied in problem solving, theorem proving, knowledge
representation and machine learning. In such context, abstraction is defined as
mapping between formalism that reduces the computational complexity of the task
in question.
Q.7 State the concept of rationality.
Ans.: Rationality is the capacity to generate maximally successfull behaviour
given the available information. Rationality also indicates the capacity to compute
the perfectly rational decision given the initially available information. The
capacity to select the optimal combination of computation - sequence plus the
action, under the constraint that the action must be selected by the computation is
also rationality.
Perfect rationality constraints an agent's actions to provide the maximum
expectations of success given the information available.
Q.8 What are the functionalities of the agent function?
Ans.: Agent function is a mathematical function which maps each and every
possible percept sequence to a possible action.
The major functionality of the agent function is to generate the possible action to
each and every percept. It helps the agent to get the list of possible actions the
agent can take. Agent function can be represented in the tabular form.
Q.9 Define basic agent program.
Ans.: The basic agent program is a concrete implementation of the agent function
which runs on the agent architecture. Agent program puts bound on the length of
percent sequence and considers only required percept sequences. Agent program
implements the functions of percept sequence and action which are external
characteristics of the agent.
Agent program takes input as the current percept from the sensor and return an
action to the effectors (Actuators).
Q.10 What are the four components to define a problem? Define them.
Ans.: The four components to define a problem are,
1. Initial state - It is the state in which agent starts in.
2. A description of possible actions - It is the description of possible actions
which are available to the agent.
3. The goal test - It is the test that determines whether a given state is goal (final)
state.
4. A path cost function - It is the function that assigns a numeric cost (value) to
each path. The problem-solving agent is expected to choose a cost-function that
reflects its own performance measure.

You might also like