AI UNIT-1 All Notes
AI UNIT-1 All Notes
Unit No: 01
The goal of strong AI is to create machines that can reason, think, understand natural language,
learn from experience, and demonstrate creativity. The development of strong AI raises significant
ethical, social, and philosophical questions due to its potential implications on society and human
life.
Computer Vision: Computer vision enables machines to understand and interpret visual
information from the world, such as images and videos. Techniques like image recognition, object
detection, and facial recognition are essential for various AI applications.
Robotics: AI and robotics often go hand-in-hand, as AI enables robots to perceive, reason, and act
in their environments. AI-powered robots can carry out tasks autonomously or semi-autonomously,
ranging from simple household chores to complex industrial operations.
Search and Optimization: Many AI problems involve searching through large solution spaces to
find the best or optimal solution. Search algorithms, like depth-first search, breadth-first search, and
A* search, play a vital role in solving problems efficiently.
Game Theory: Game theory is relevant to AI, especially in the context of multi-agent systems and
decision-making. It helps model strategic interactions between different agents and predict their
behavior in competitive environments.
Expert Systems: Expert systems are AI systems that mimic the decision-making of human experts
in specific domains. They use knowledge representation and reasoning techniques to provide advice
and recommendations based on their expert-level knowledge.
Ethical Considerations: As AI systems become more powerful and prevalent, ethical
considerations are crucial in guiding their development and deployment. Discussions around bias,
fairness, transparency, and accountability are integral to responsible AI development.
History of AI:
Early Concepts (Ancient Times to 20th Century):
Ancient civilizations, such as the Greeks and Egyptians, had myths and stories about artificial beings
coming to life, like the myth of Pygmalion and Galatea.
In the 13th century, the philosopher Ramon Llull designed a mechanical device called the "Ars
Generalis Ultima" that aimed to generate knowledge mechanically.
In the 17th century, mathematician and philosopher Gottfried Wilhelm Leibniz proposed a universal
language of symbols to represent all human knowledge, a concept relevant to symbolic AI.
AI Winter (1970s-1980s):
After initial enthusiasm, progress in AI research slowed due to high expectations that were not met.
Funding and interest in AI decreased during this period, leading to what was known as the "AI
winter."
2.Computer Vision:
AI algorithms can interpret and analyze images and videos, enabling applications like facial
recognition, object detection, and image classification.
AI is used in autonomous vehicles for interpreting the environment and making real-time decisions.
3.Recommender Systems:
AI-powered recommendation engines are used by platforms like Netflix, Amazon, and Spotify to
suggest personalized content based on user preferences.
4.Healthcare:
AI is used in medical imaging for diagnosing diseases like cancer and identifying abnormalities in
X-rays and MRIs.
AI-powered tools aid in drug discovery and the development of personalized treatment plans.
5.Finance:
AI algorithms are used for fraud detection, credit risk assessment, and algorithmic trading in the
financial industry.
6.Gaming:
AI is employed in games to create intelligent and adaptive non-player characters (NPCs) and
opponents, enhancing the gaming experience.
7.Robotics:
AI-driven robots can perform tasks in manufacturing, logistics, and healthcare, among other
industries.
8.Autonomous Systems:
Self-driving cars and drones use AI for navigation and obstacle avoidance.
AI-enabled drones have applications in agriculture, surveillance, and disaster response.
9.Business Analytics:
AI is utilized for data analysis and pattern recognition, enabling companies to gain insights, make
predictions, and optimize processes.
10.Creative Applications:
AI-generated art, music, and literature have become prevalent, with algorithms capable of creating
new content based on existing examples.
Applications of AI:
Computer Vision Applications:
Image Recognition: AI can identify and classify objects and patterns in images, used in various
applications like security, healthcare, and autonomous vehicles.
Facial Recognition: AI-powered facial recognition is used for authentication, security, and
identifying individuals in photos and videos.
Object Detection: AI algorithms can detect and locate specific objects within images or videos,
useful for surveillance and autonomous vehicles.
Healthcare:
Medical Image Analysis: AI assists in diagnosing diseases from medical images, such as detecting
tumors in MRI scans or identifying diabetic retinopathy from eye images.
Drug Discovery: AI is used to analyze vast amounts of data and identify potential drug candidates
more efficiently.
Personalized Medicine: AI helps tailor treatment plans based on individual patient data and genetic
information.
Autonomous Vehicles:
Self-Driving Cars: AI algorithms enable autonomous vehicles to navigate, perceive their
environment, and make real-time decisions for safe driving.
Finance:
Fraud Detection: AI is employed to detect fraudulent activities in financial transactions, helping to
prevent fraud and enhance security.
Algorithmic Trading: AI-based algorithms analyze market data and execute trades autonomously,
optimizing trading strategies.
Gaming:
AI in Games: AI is used to create intelligent non-player characters (NPCs) that interact with players
in video games, providing more immersive and challenging gameplay.
Robotics:
Industrial Automation: AI-powered robots are used in manufacturing for tasks like assembly,
welding, and quality control.
Healthcare Robots: AI-driven robots assist in patient care, rehabilitation, and surgery.
Recommendation Systems:
E-commerce: AI-powered recommendation engines suggest products based on user behavior and
preferences, enhancing the shopping experience.
Personal Assistants and Chatbots:
Customer Service: AI chatbots provide instant customer support and answer common queries for
businesses.
Virtual Personal Assistants: AI-powered personal assistants help users manage schedules, tasks,
and reminders.
Climate Science:
AI is used for climate modeling, weather prediction, and analyzing climate data to understand and
address climate change challenges.
State of ART:
Deep Learning: Deep learning, a subset of machine learning, had become the cornerstone of many
AI applications. Deep neural networks, especially convolutional neural networks (CNNs) and
recurrent neural networks (RNNs), showed exceptional performance in computer vision, natural
language processing, and speech recognition tasks.
Natural Language Processing (NLP): NLP had made significant strides, with transformer-based
models like BERT (Bidirectional Encoder Representations from Transformers) and GPT
(Generative Pre-trained Transformer) achieving state-of-the-art results in various NLP benchmarks.
These models demonstrated the ability to understand context and semantics in language, enabling
more human-like interactions with AI systems.
Computer Vision: Computer vision was witnessing remarkable progress, with advanced CNN
architectures achieving exceptional accuracy in image classification, object detection, segmentation,
and face recognition tasks. AI-powered computer vision applications were being widely used in
industries like healthcare, security, automotive, and entertainment.
Autonomous Systems: The development of self-driving cars and autonomous drones had advanced
considerably. Companies were testing and deploying autonomous vehicles in controlled
environments and specific geographies, with the aim of enhancing safety and efficiency in
transportation.
2. Zero Risks
Another big benefit of AI is that humans can overcome many risks by letting AI robots do them for
us. Whether it be defusing a bomb, going to space, exploring the deepest parts of oceans, machines
with metal bodies are resistant in nature and can survive unfriendly atmospheres. Moreover, they
can provide accurate work with greater responsibility and not wear out easily.
Example:
One example of zero risks is a fully automated production line in a manufacturing facility. Robots
perform all tasks, eliminating the risk of human error and injury in hazardous environments.
3. 24x7 Availability
There are many studies that show humans are productive only about 3 to 4 hours in a day. Humans
also need breaks and time offs to balance their work life and personal life. But AI can work endlessly
without breaks. They think much faster than humans and perform multiple tasks at a time with
accurate results. They can even handle tedious repetitive jobs easily with the help of AI algorithms.
Example:
An example of this is online customer support chatbots, which can provide instant assistance to
customers anytime, anywhere. Using AI and natural language processing, chatbots can answer
common questions, resolve issues, and escalate complex problems to human agents, ensuring
seamless customer service around the clock.
4.Digital Assistance
Some of the most technologically advanced companies engage with users using digital assistants,
which eliminates the need for human personnel. Many websites utilize digital assistants to deliver
user-requested content. We can discuss our search with them in conversation. Some chatbots are
built in a way that makes it difficult to tell whether we are conversing with a human or a chatbot.
Example:
We all know that businesses have a customer service crew that must address the doubts and concerns
of the patrons. Businesses can create a chatbot or voice bot that can answer all of their clients'
questions using AI.
5. New Inventions
In practically every field, AI is the driving force behind numerous innovations that will aid humans
in resolving the majority of challenging issues.
For instance, recent advances in AI-based technologies have allowed doctors to detect breast cancer
in a woman at an earlier stage.
Example:
Another example of new inventions is self-driving cars, which use a combination of cameras,
sensors, and AI algorithms to navigate roads and traffic without human intervention. Self-driving
cars have the potential to improve road safety, reduce traffic congestion, and increase accessibility
for people with disabilities or limited mobility. They are being developed by various companies,
including Tesla, Google, and Uber, and are expected to revolutionize transportation.
6. Unbiased Decisions
Human beings are driven by emotions, whether we like it or not. AI on the other hand, is devoid of
emotions and highly practical and rational in its approach. A huge advantage of Artificial
Intelligence is that it doesn't have any biased views, which ensures more accurate decision-making.
Example:
An example of this is AI-powered recruitment systems that screen job applicants based on skills and
qualifications rather than demographics. This helps eliminate bias in the hiring process, leading to
an inclusive and more diverse workforce.
7. Perform Repetitive Jobs
We will be doing a lot of repetitive tasks as part of our daily work, such as checking documents for
flaws and mailing thank-you notes, among other things. We may use artificial intelligence to
efficiently automate these menial chores and even eliminate "boring" tasks for people, allowing
them to focus on being more creative.
Example:
An example of this is using robots in manufacturing assembly lines, which can handle repetitive
tasks such as welding, painting, and packaging with high accuracy and speed, reducing costs and
improving efficiency.
8. Daily Applications
Today, our everyday lives are entirely dependent on mobile devices and the internet. We utilize a
variety of apps, including Google Maps, Alexa, Siri, Cortana on Windows, OK Google, taking
selfies, making calls, responding to emails, etc. With the use of various AI-based techniques, we
can also anticipate today’s weather and the days ahead.
Example:
About 20 years ago, you must have asked someone who had already been there for instructions
when you were planning a trip. All you need to do now is ask Google where Bangalore is. The best
route between you and Bangalore will be displayed, along with Bangalore's location, on a Google
map.
9. AI in Risky Situations
One of the main benefits of artificial intelligence is this. By creating an AI robot that can perform
perilous tasks on our behalf, we can get beyond many of the dangerous restrictions that humans
face. It can be utilized effectively in any type of natural or man-made calamity, whether it be going
to Mars, defusing a bomb, exploring the deepest regions of the oceans, or mining for coal and oil.
Example:
For instance, the explosion at the Chernobyl nuclear power facility in Ukraine. As any person who
came close to the core would have perished in a matter of minutes, at the time, there were no AI-
powered robots that could assist us in reducing the effects of radiation by controlling the fire in its
early phases.
Risk of AI:
1. High Costs
The ability to create a machine that can simulate human intelligence is no small feat. It requires
plenty of time and resources and can cost a huge deal of money. AI also needs to operate on the
latest hardware and software to stay updated and meet the latest requirements, thus making it quite
costly.
2. No Creativity
A big disadvantage of AI is that it cannot learn to think outside the box. AI is capable of learning
over time with pre-fed data and past experiences, but cannot be creative in its approach. A classic
example is the bot Quill who can write Forbes earning reports. These reports only contain data and
facts already provided to the bot. Although it is impressive that a bot can write an article on its
own, it lacks the human touch present in other Forbes articles.
3. Unemployment
One application of artificial intelligence is a robot, which is displacing occupations and increasing
unemployment (in a few cases). Therefore, some claim that there is always a chance of
unemployment as a result of chatbots and robots replacing humans.
For instance, robots are frequently utilized to replace human resources in manufacturing
businesses in some more technologically advanced nations like Japan. This is not always the case,
though, as it creates additional opportunities for humans to work while also replacing humans in
order to increase efficiency.
AI applications automate the majority of tedious and repetitive tasks. Since we do not have to
memorize things or solve puzzles to get the job done, we tend to use our brains less and less. This
addiction to AI can cause problems to future generations.
5. No Ethics
Ethics and morality are important human features that can be difficult to incorporate into an AI.
The rapid progress of AI has raised a number of concerns that one day, AI will grow
uncontrollably, and eventually wipe out humanity. This moment is referred to as the AI
singularity.
6. Emotionless
Since early childhood, we have been taught that neither computers nor other machines have
feelings. Humans function as a team, and team management is essential for achieving goals.
However, there is no denying that robots are superior to humans when functioning effectively, but
it is also true that human connections, which form the basis of teams, cannot be replaced by
computers.
7. No Improvement
Humans cannot develop artificial intelligence because it is a technology based on pre-loaded facts
and experience. AI is proficient at repeatedly carrying out the same task, but if we want any
adjustments or improvements, we must manually alter the codes. AI cannot be accessed and
utilized akin to human intelligence, but it can store infinite data.
Intelligent Agents:
What is Agent:
❖ Agent are software entities that carry out some set of operations on behalf of a user or
another program.
❖ Agent is anything that can be viewed as perceiving its environment through sensors and
acting upon the environment through Effectors.
Agent is :
Agent is a part of AI system that takes actions or decisions based on the information it perceives
from the environment.
For example, Robot Agent utilizes information it senses from the environment using the sensors in
order to carry out a particular action.
On the other hand, Human Agent uses sensory organs to sense the environment and takes
particular actions and decisions regarding the body parts of the human.
Structure of AI Agents
• Interaction of the Agent with the environment uses Sensors and Effectors. Sensors
perceive the environment and the actuators or effectors act upon that environment.
1. Perception: Perception is a passive interaction between the agent and the environment
where the environment remains unchanged when the agent takes up information from the
environment. This involves gaining information using 'Sensors' from the surroundings
without any change to the surroundings.
2. Action: Action is an active interaction between the agent and the environment where
the environment changes when the action is performed. This involves utilization of an
'Effector' or an 'Actuator' which completes an action but leads to changes in the
surroundings while doing so.
• Intelligent Agent:
An intelligent agent is a program that can make decisions or perform a service based on its
environment, user input and experiences. These programs can be used to autonomously gather
information on a regular, programmed schedule or when prompted by the user in real time. An
intelligent agent is also referred to as a bot, which is short for robot.
Typically, an agent program, using parameters the user has provided, searches all or some part
of the internet, gathers information the user is interested in, and presents it to them on a
periodic or requested basis. Data intelligent agents can extract any specifiable information,
such as keywords or publication date.
Types of Agents
Agents can be grouped into five classes based on their degree of perceived intelligence and
capability :
• Simple Reflex Agents
• Model-Based Reflex Agents
• Goal-Based Agents
• Utility-Based Agents
• Learning Agent
• Multi-agent systems
• Hierarchical agents
Simple reflex agents ignore the rest of the percept history and act only on the basis of
the current percept. Percept history is the history of all that an agent has perceived to date.
The agent function is based on the condition-action rule. A condition-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. This agent function only succeeds when the environment is fully
observable. For simple reflex agents operating in partially observable environments, infinite
loops are often unavoidable. It may be possible to escape from infinite loops if the agent
can randomize its actions.
Problems with Simple reflex agents are :
• Very limited intelligence.
• No knowledge of non-perceptual parts of the state.
• Usually too big to generate and store.
• If there occurs any change in the environment, then the collection of rules needs
to be updated.
It works by finding a rule whose condition matches the current situation. A model-based
agent can handle partially observable environments 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:
These kinds of agents take decisions based on how far they are currently from
their goal(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 the one which reaches a goal state. The knowledge that supports its decisions is
represented explicitly and can be modified, which makes these agents more flexible. They
usually require search and planning. The goal-based agent’s behavior can easily be
changed.
Goal-Based Agents
Utility-Based Agents
The agents which are developed having their end uses as building blocks are called utility-
based agents. When there are multiple possible alternatives, then to decide which one is
best, utility-based agents are used. They choose actions based on a preference (utility) for
each state. Sometimes achieving the desired goal is not enough. We may look for a quicker,
safer, cheaper trip to reach a destination. Agent happiness should be taken into
consideration. Utility describes how “happy” the agent is. Because of the uncertainty in the
world, a utility agent chooses the action that maximizes the expected utility. A utility
function maps a state onto a real number which describes the associated degree of
happiness.
Utility-Based Agents
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. 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.
Learning Agent
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.
MAS can be used in a variety of applications, including transportation systems, robotics,
and social networks. They can help improve efficiency, reduce costs, and increase
flexibility in complex systems. MAS can be classified into different types based on their
characteristics, such as whether the agents have the same or different goals, whether the
agents are cooperative or competitive, and whether the agents are homogeneous or
heterogeneous.
• In a homogeneous MAS, all the agents have the same capabilities, goals, and
behaviors.
• In contrast, in a heterogeneous MAS, the agents have different capabilities,
goals, and behaviors.
This can make coordination more challenging but can also lead to more flexible and robust
systems.
Cooperative MAS involves agents working together to achieve a common goal, while
competitive MAS involves agents working against each other to achieve their own goals. In
some cases, MAS can also involve both cooperative and competitive behavior, where
agents must balance their own interests with the interests of the group.
MAS can be implemented using different techniques, such as game theory, machine
learning, and agent-based modeling. Game theory is used to analyze strategic interactions
between agents and predict their behaviour.
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.
• Hierarchical agents are agents that 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.
This structure allows for more efficient and organized decision-making in
complex environments.
• Hierarchical agents can be implemented in a variety of applications, including
robotics, manufacturing, and transportation systems. They are particularly useful
in environments where there are many tasks and sub-tasks that need to be
coordinated and prioritized.
• In a hierarchical agent system, the high-level agents are responsible for setting
goals and constraints for the lower-level agents. These goals and constraints are
typically based on the overall objective of the system. For example, in a
manufacturing system, the high-level agents might set production targets for the
lower-level agents based on customer demand.
Uses of Agents
• 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.
• Cybersecurity: 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.
Autonomous vehicles can also be considered intelligent robotic agents. They use
sensors, Global Positioning System navigation and cameras for reactive decision-making in
the real world to manoeuvre through traffic.
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 precept sequence to an action.
Good Behaviour:
Concept of Rationality:
Rationality is nothing but status of being reasonable, sensible, and having good sense of
judgment.
Rationality is concerned with expected actions and results depending upon what the agent
has perceived. Performing actions with the aim of obtaining useful information is an
important part of rationality.
What is rational at any given time depends on four things:
“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, that is the task of rational agent is to improve
the performance measure depends on percept sequence”
What is Ideal Rational Agent?
An ideal rational agent is the one, which is capable of doing expected actions to maximize
its performance measure, on the basis of −
• Its percept sequence
• Its built-in knowledge base
A rational agent always performs right action, where the right action means the action that
causes the agent to be most successful in the given percept sequence. The problem the agent
solves is characterized by Performance Measure, Environment, Actuators, and Sensors
(PEAS).
Nature of Environments:
• The environment is the Task Environment (problem) for which the Rational Agent is the
solution. Any task environment is characterised on the basis of PEAS.
• Performance – What is the performance characteristic which would either make the agent
successful or not. For example, as per the previous example clean floor, optimal energy
consumption might be performance measures.
• Environment – Physical characteristics and constraints expected. For example, wood
floors, furniture in the way etc
• Actuators – The physical or logical constructs which would take action. For example for
the vacuum cleaner, these are the suction pumps
• Sensors – Again physical or logical constructs which would sense the environment. From
our previous example, these are cameras and dirt sensors.
Example:
Some Another Examples:
Full or Partial Observability- The agent's sensors do not need to pre-store any information if
they have complete access. Partial access may be sensor inaccuracy or insufficient environmental
data, such as limited access to hostile territory.
Number of Agents — A single agent environment is used for the vacuum cleaner, but for
driverless taxis, each driverless cab is a different agent, resulting in a multi-agent environment.
Static — How frequently does the surrounding environment change? Is it possible for the agent
to learn about the surroundings and then perform the same thing every time?
Episodic — A response to a precept is discrete if it is not reliant on the preceding one, i.e. it is
stateless (static methods in Java). A sequential environment exists when a recent decision
impacts future decisions.
Prepared by….
Mrs. Pranjali S.Bahalkar
Assi. Prof. AI&DS Dept.