0% found this document useful (0 votes)
118 views63 pages

AI Notes 2 Units

AI 5 th sem notes unit 2
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)
118 views63 pages

AI Notes 2 Units

AI 5 th sem notes unit 2
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

Syllabus

BCAI501 ARTIFICIAL INTELLIGENCE


Course Outcome ( CO) Bloom’s Knowledge Level (KL)
At the end of course, the student will be able to understand
CO Understand the basics of theory and practice of AI as a discipline and about intelligent K2
1 agents.
CO Understand search techniques and gaming theory. K2, K3
2
CO The student will learn to apply knowledge representation techniques and problem solving K3 , K4
3 strategies to common AI applications.
CO Student should be aware of techniques used for classification and clustering. K2 , K3
4
CO Student should aware of basics of pattern recognition and steps required for it. K2 , K4
5
DETAILED SYLLABUS 3-0-0
Unit Topic Proposed
Lecture
I INTRODUCTION: Introduction–Definition – Future of Artificial Intelligence – 08
Characteristics of Intelligent Agents– Typical Intelligent Agents – Problem Solving
Approach to Typical AI problems.
PROBLEM-SOLVING METHODS Problem-solving Methods – Search
Strategies- Uninformed – Informed – Heuristics – Local Search Algorithms and
II Optimization Problems – Searching with Partial Observations – Constraint 08
Satisfaction Problems – Constraint Propagation – Backtracking Search – Game
Playing – Optimal Decisions in Games – Alpha – Beta Pruning – Stochastic Games
KNOWLEDGE REPRESENTATION First Order Predicate Logic – Prolog
Programming – Unification – Forward Chaining-Backward Chaining – Resolution –
III Knowledge Representation – Ontological Engineering-Categories and Objects – 08
Events – Mental Events and Mental Objects – Reasoning Systems for Categories
– Reasoning with Default Information
IV SOFTWARE AGENTS Architecture for Intelligent Agents – Agent 08
communication – Negotiation and Bargaining – Argumentation among Agents –
Trust and Reputation in Multi-agent systems.
APPLICATIONS AI applications – Language Models – Information Retrieval-
Information Extraction – Natural Language Processing – Machine Translation
V 08
– Speech Recognition – Robot – Hardware – Perception – Planning – Moving

Text books:
1. S. Russell and P. Norvig, “Artificial Intelligence: A Modern Approach, Prentice Hall, Third Edition, 2009.
2. I. Bratko, ―Prolog: Programming for Artificial Intelligence, Fourth edition, Addison-Wesley
Educational Publishers Inc., 2011.
3. M. Tim Jones, ―Artificial Intelligence: A Systems Approach (Computer Science), Jones and Bartlett
Publishers, Inc.; First Edition, 2008
4. Nils J. Nilsson, ―The Quest for Artificial Intelligence‖, Cambridge University Press, 2009.
5. William F. Clocksin and Christopher S. Mellish, Programming in Prolog: Using the ISO Standard‖,
Fifth Edition, Springer, 2003.
6. Gerhard Weiss, ―Multi Agent Systems‖, Second Edition, MIT Press, 2013.
7. David L. Poole and Alan K. Mackworth, ―Artificial Intelligence: Foundations of Computational
Agents‖, Cambridge University Press, 2010.
UNIT - I

AIM & OBJECTIVES


To understand fundamentals of AI and algorithms required to produce Al systems.

1. Introduction - Foundations of AI

What: AI, or Artificial Intelligence, is the branch of computer science aimed at creating machines capable of performing tasks that typically require human
intelligence, such as reasoning, learning, and perception.

Why: The introduction and definition of AI are crucial for establishing a clear understanding of its scope, capabilities, and implications, guiding research, development,
and ethical considerations.

Where: AI is introduced and defined in academic textbooks, research papers, and industry reports worldwide, providing a foundational framework for students,
researchers, and professionals in the field.

Foundations of AI

In today's world, technology is growing very fast, and we are getting in touch with different new technologies day by day.

Here, one of the booming technologies of computer science is Artificial Intelligence which is ready to create a new revolution in the world by making intelligent
machines. Artificial Intelligence is now all around us. It is currently working with a variety of subfields, ranging from general to specific, such as self-driving cars,
playing chess, proving theorems, playing music, Painting, etc.

AI is one of the fascinating and universal fields of Computer science which has a great scope in future. Al holds a tendency to cause a machine to work as a human.

Definition:

Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial defines “Man-made”, and intelligence defines "thinking power", hence
AI means "a man-made thinking power."

So, we can define AI as:

"It is a branch of computer science by which we can create intelligent machines which can behave like a human, think like humans, and be able to make decisions."

Artificial Intelligence exists when a machine can have human-based skills such as learning, reasoning, and solving problems.

With Artificial Intelligence you do not need to preprogram a machine to do some work, despite that you can create a machine with programmed algorithms which can
work with its own intelligence, and that is the awesomeness of AI. It is believed that AI is not a new technology, and some people say that as per Greek myth, there
were Mechanical men in early days which could work and behave like humans.

Why Artificial Intelligence?

Before Learning about Artificial Intelligence, we should know what is the importance of AI and why we should learn it.

Following are some main reasons to learn about AI:

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.

Goals of Artificial Intelligence

Following are the main goals of Artificial Intelligence:

1. Replicate human intelligence

2. Solve Knowledge-intensive tasks

3. An intelligent connection of perception and action

4. Building a machine which can perform tasks that requires human intelligence such as:

○ Proving a theorem

○ Playing chess

○ Plan some surgical operation

○ Driving a car in traffic

5. Creating some system which can exhibit intelligent behavior, learn new things by itself, demonstrate, explain, and can advise its user

What Comprises Artificial Intelligence?

Artificial Intelligence is not just a part of computer science even though it's so vast and requires lots of other factors which can contribute to it. To create the AI first,
we should know how intelligence is composed, so the Intelligence is an intangible part of our brain which is a combination of Reasoning, learning, problem-solving
perception, language understanding, etc.

To achieve the above factors for a machine or software Artificial Intelligence requires the following discipline:

○ Mathematics

○ Biology

○ Psychology

○ Sociology

○ Computer Science

○ Neurons Study

○ Statistics

Advantages of Artificial Intelligence

Following are some main advantages of Artificial Intelligence:

○ High Accuracy with less errors: AI machines or systems are prone to less errors and high accuracy as it takes decisions as per pre-experience or information.

○ High-Speed: AI systems can be of very high-speed and fast-decision making, because of that AI systems can beat a chess champion in the Chess game.

○ High reliability: AI machines are highly reliable and can perform the same action multiple times with high accuracy.

○ 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.

○ 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.

○ 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.

○ Enhanced Security: AI can be very helpful in enhancing security, as It can detect and respond to cyber threats in real time, helping companies protect their
data and systems.

○ Aid in Research: AI is very helpful in the research field as it assists researchers by processing and analyzing large datasets, accelerating discoveries in fields
such as astronomy, genomics, and materials science.

Disadvantages of Artificial Intelligence

Every technology has some disadvantages, and the same goes for Artificial intelligence. Being so advantageous technology still, it has some disadvantages which we
need to keep in our mind while creating an AI system.

Following are the disadvantages of AI:

○ High Cost: The hardware and software requirement of AI is very costly as it requires lots of maintenance to meet current world requirements.

○ Can't think out of the box: Even we are making smarter machines with AI, but still they cannot work out of the box, as the robot will only do that work for
which they are trained, or programmed.

○ No feelings and emotions: AI machines can be an outstanding performer, but still 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.

○ Increase dependency on machines: With the increment of technology, people are getting more dependent on devices and hence they are losing their mental
capabilities.

○ No Original Creativity: As humans are so creative and can imagine some new ideas but still AI machines cannot beat this power of human intelligence and
cannot be creative and imaginative.
○ Complexity: Making and keeping AI systems can be very complicated and need a lot of knowledge. This can make it hard for some groups or people
to use them.

○ Job Concerns: As AI gets better, it might take away not just basic jobs but also some skilled ones. This worries people about losing jobs in different
fields.

Applications of AI

Artificial Intelligence has various applications in today's society. It is becoming essential for today's time because it can solve complex problems with an efficient
way in multiple industries, such as Healthcare, entertainment, finance, education, etc. AI is making our daily life more comfortable and faster.

Following are some sectors which have the application of Artificial Intelligence:

AI in Astronomy

○ Automated Celestial Object Identification: AI systems can automatically identify and classify celestial objects in astronomical images, aiding in discovering
new stars, galaxies, and other cosmic phenomena. In simple words, AI can spot and sort out things in space by looking at pictures. It's like having a cosmic
detective that finds new stars, galaxies, and other mysterious objects without human help.

○ Exoplanet Hunting: AI helps astronomers find planets outside our solar system by looking at lots of data. It can notice tiny changes in the light from stars,
which tell us there might be planets around them, such as those caused by exoplanet transits.

○ Analyzing Space Information: AI plays a crucial role in the study of space. It assists scientists by carefully examining vast amounts of complex data gathered
from space observations. This helps astronomers uncover sophisticated patterns, unusual phenomena, and connections that might be otherwise very difficult
to notice. Essentially, AI acts as a dedicated assistant, sifting through the cosmic data haystack to find the valuable needles of knowledge.

○ Watching Space Events in Real-time: AI-powered tools can keep a constant eye on the night sky, looking out for sudden happenings like exploding stars
(supernovae) or bursts of powerful gamma rays. This allows scientists to quickly study these events in more detail when they occur.

○ Making Telescopes Smarter: AI is like a brain for telescopes. It helps them work better by changing their settings on the fly. For example, if the weather
gets cloudy or if scientists want to study something specific in space, AI can adjust the telescope to get the best results. It's like having a telescope that can
think and adapt to the situation.

AI in Healthcare

○ Helping Doctors See Inside the Body Better: AI is like a super helper for doctors when they look at pictures of the inside of a patient's body, like X-rays or
MRIs. It uses smart algorithms to find things like problems, tumors, or broken bones very accurately. This means doctors can figure out what's going on faster
and more accurately, which is great for patients and for better diagnosis.

○ Detecting Health Problems Early: AI acts as a health detective. It looks at your health information to find out if you might get certain diseases in the future.
When it sees a high risk, doctors can step in early to help you stay healthy. This is really important for conditions like diabetes and heart problems because
catching them at this time means better treatment and less trouble for the patient.

○ Developing Medications Quickly and Cost-Effectively: AI acts like a super scientist in the lab. It uses certain algorithms to predict how different chemicals
can fight diseases. This helps us make new medicines much quicker and at a low cost. So people can get the treatments they need sooner, and it doesn't cost
as much money to manufacture them.

○ Personalized Treatment Plans: AI looks at your health information, like your genes, what happened to you before, and how you've responded to treatments.
Then, it makes a special plan just for you. This means your treatment works better and doesn't give you as many problems. It's like having a personalized
health coach, which helps in avoiding complications caused by improperly prescribed medicine.

○ Managing Hospital Functions and Resources: AI acts like a manager for hospitals. It helps with things like when patients come in, where to put resources
like doctors and supplies, and how to make sure everything runs well. It can even guess how many patients might come in ahead of time, so hospitals use their
staff and resources in the best way possible.
AI in Gaming

○ Smart Game Characters: AI is like the brains behind game characters that aren't controlled by players. They make these characters, called NPCs, act more
like real people or clever enemies. They can learn from what players do and change their behavior, which makes games more exciting and lifelike. Imagine
playing a game where the bad guys learn and adapt to your moves - that's what AI does.

○ Creating Game Worlds with AI: AI can make parts of video games all on its own. It can create levels, maps, and places to explore without people having to
make them by hand. This means games can have bigger and more interesting worlds because AI does a lot of the work, kind of like a game world builder. It
helps game developers, too.

○ Making Games Look and Feel Real: AI helps to make games look and act more like the real world. They create graphics that look just like the things we
see, and they make how things move in games feel realistic, like in real life. They even guess what players might do next so the game looks smooth and natural.

AI in Finance

○ Identifying and Prevention of Fraud: AI keeps an eye on bank transactions all the time. They act like super detectives who can spot strange things happening
with money, like someone using a credit card in a weird way. When they see something fishy, they raise the alarm and help the bank stop bad people from
stealing money. This happens really fast, without needing people to check every transaction.

○ Automated Trading: AI helps a skilled trader who works automatically. It uses various algorithms to swiftly buy and sell stocks while analyzing all
the market information. This boosts trading strategies, making investments more efficient and profitable.

○ Risk Control: AI helps in examining lots of data to check how risky something is, like giving out loans or making investments. It looks at things like whether
someone can pay back a loan or how safe an investment is. This helps banks and investment firms make smarter choices so they don't lose money and can
help others save and grow their money.

AI in Data Security

○ Anomaly Detection: AI works as a digital detective. It looks at big piles of data and watches for anything strange or out of the ordinary, like someone sneaking
into a digital vault or trying to steal secrets. When it sees something fishy, it raises the alarm, helping to keep important data safe from cyber-attacks.

○ Predicting Threats: AI looks at past troubles and keeps an eye on new dangers that are popping up. By doing this, it can predict what bad things might happen
in the future, like a security breach or a cyberattack. This way, companies can get ready in advance to protect their important data, sort of like putting up a
strong fortress before any attack happens.

○ Automated Safety Response: AI acts like a digital guardian that can respond when there's trouble. If it sees something bad happening, like a cyberattack, it
can automatically take action. It might isolate the part that's under attack. This way, it keeps your important stuff safe in the digital world.

AI in Social Media

○ Smart Suggestions: AI helps as a guide on social media. It watches what you like and what you do, and then it suggests things you might enjoy, like posts,
videos, or ads. It acts as someone who knows your tastes and shows you stuff, you're really into, making your social media experience more enjoyable and
personalized.

○ Virtual Assistants and Chatbots: AI chatbots and virtual assistants act as digital helpers on social media. They're quick to respond and can talk to you just
like a real person. They answer your questions, share information, and even help with problems. It's like having an assistant available 24/7, making your social
media experience smoother and more helpful.

○ Sentiment Analysis: AI can figure out how people feel on social media. It looks at what they say in comments and posts and decides if it's a happy, sad, or
neutral kind of message. This helps companies understand what people think so they can react in the right way. It's like having a mood gauge for the internet
so businesses can make their customers happier.

○ Trend Analysis: AI keeps track of all the chats and what's popular right now. This helps companies and regular folks understand what everyone's thinking
and talking about. It acts as a social media news reporter that keeps customers in the loop about what's hot and what people are buzzing about.

AI in Travel & Transport

○ Optimization of Route: AI plays a crucial role in optimizing travel routes, be it for parcel deliveries, public transportation, or personal trips. It efficiently
calculates the swiftest and most economical paths from one point to another point, resulting in reduced travel time, minimized fuel consumption, and cost
savings. Essentially, it serves as a pocket-sized travel advisor, enhancing the speed and budget-friendliness of your journeys.
○ Smart Security Screening: AI helps in keeping traveling safely. It uses special skills to scan bags and people quickly. It can spot things that might be
dangerous and make security checks faster and smoother. This means you can fly knowing that the airport is working hard to keep you safe without making
your travel a hassle.

○ Chatbots for Travel Support: AI chatbots are like digital travel helpers. These chatbots are capable of aiding you in various tasks such as reserving tickets,
suggesting interesting destinations to explore, and providing responses to your inquiries, much like an affable travel consultant. This elevates the convenience
and pleasure of your travel adventures, as you can access assistance whenever it's required, even during late-night hours.

○ AI Prevents Breakdowns: AI works like a fortune teller for machines like cars, planes, and roads. It predicts when they might get sick and need fixing. This
way, we can fix them before they break down and cause problems. It keeps everything running smoothly, making travel safer and saving a lot of time and
money.

AI in Automotive Industry

○ Self-Driving Cars: AI is like the brain of self-driving cars. It looks at what's happening around the car using various sensors and decides what the car should
do, like turning or stopping. It's like having a super-smart driver that doesn't need a person. This makes cars drive on their own, making travel more convenient
and safer because there's no need for a human to steer.

○ Advanced Driver Assistance Systems (ADAS): AI adds extra smarts to your car to keep you safe. It possesses the capability to autonomously adjust your
vehicle's speed while on the highway, assist in maintaining your lane, and swiftly engage the brakes when detecting potential hazards. These intelligent
functionalities function akin to a co-pilot, ensuring your safety by preventing accidents and ensuring your safe arrival at your intended destination.

○ Streamlining Production Processes: AI watches over machines, checks if they're healthy, and makes sure they don't break. It also helps with ordering
materials and makes sure everything is made just right. This makes things faster, cheaper, and better quality, like having a super factory manager.

○ Voice Recognition: AI-driven voice recognition systems allow drivers to control various functions in their vehicles, such as navigation, music, and
communication, using natural language.

AI in Robotics:

○ Self-Moving Robots: AI makes robots really smart at moving around on their own. It's like giving them a built-in GPS and a clever brain. They can figure
out where to go and how to get there without bumping into things or needing a person to show them the way. This helps them do tasks like delivering packages
or exploring places on their own, making them super independent.

○ Object Recognition and Manipulation: AI gives robots sharp eyes and clever hands. It helps them see objects clearly and then pick them up and move them
just right. This is super useful, especially in places like warehouses, where they can do things like sorting and packing items accurately.

○ Collaboration of Humans and Robots: AI makes it possible for robots to be great team players with people. They can work alongside humans, helping out
and learning from them. If a person does something, the robot can understand and follow their lead. This makes workplaces safer and more efficient, like
having a trusty robot colleague who understands and supports you.

AI in Entertainment

○ Recommendation of Content: AI looks at what customers have liked before, such as movies or music, and suggests new things that they might enjoy. It's
like having a personal entertainment guide, making their experience more enjoyable by offering just what they like.

○ AI as a Creative Assistant: AI acts as a creative sidekick for artists and creators. It can make music, art, and videos or help improve what they create. It's like
having a helper that speeds up the creative process, making it easier to bring new ideas to life. This way, artists can focus more on their vision, and AI handles
the technical bits.

○ Live Event and Performance Enhancements: AI makes live events and performances even cooler. It can translate what people are saying in real time, add
cool effects that blend with what's happening, and even predict what the audience will like. This makes shows and events more exciting and enjoyable for
everyone there. It's like having a magic touch that brings performances to life in new and amazing ways.

AI in Agriculture

○ Crop Observation and Control: AI, with the help of various sensors, acts as a guardian for crops on the farm. It keeps an eye on them, making sure they're
healthy and growing well. It tells farmers when it's the best time to plant, water, and harvest the most crops. It's like having a farm expert who ensures the
fields are super productive so farmers can get the most out of their hard work.

○ Smart Farming for Efficiency: AI makes farming super-efficient. It helps farmers use just the right number of things like fertilizer and pesticides, not too
much and not too little. This means there's less waste, and the crops grow better. It's like having a precise chef in the fie ld, making sure everything is just
perfect for the plants to thrive and produce lots of food.
○ Automated Farming: AI controls a number of machines like tractors and drones. These machines can plant seeds, remove weeds, and spray stuff on crops
all by themselves. They do it super well and exactly as needed, like having expert farmers who never get tired and work perfectly, making farming easier and
more efficient.

○ Monitoring Livestock: AI uses special sensors and smart data analysis to make sure they're healthy and happy. If anything is wrong, it alerts the farmer. This
way, the animals are well taken care of, and the farm can run smoothly. It's like having a watchful friend for the animals, making sure they're okay and the
farm works better.

AI in E-commerce

○ Personalized Product Suggestions: AI looks at what you've looked at and bought before and suggests things you might really like. It's like having a personal
shopper who knows your style, making your online shopping more fun and helping you discover new things you might want to buy. Plus, it's great for the
store because it helps them sell more, and as a customer, it saves your time.

○ Managing Inventory: AI takes care of a store's shelves. It predicts how much of each product people will buy and automatically orders more when needed.
In this manner, there exists an optimal balance of products, preventing excessive stock that ties up funds while also ensuring an adequate supply to prevent
customers from leaving without making a purchase.

○ Dynamic Pricing: Artificial intelligence dynamically adjusts pricing according to demand, market competition, and inventory levels, ensuring customers
receive optimal value while enhancing the store's profitability.

AI in education:

○ Education Content Creation: AI acts as a teaching assistant for educators. It helps them make things like quizzes, lesson plans, and study materials. This
makes teaching easier and better because educators have more time for students, and the materials are top-notch. It's like having a super-efficient helper who
does the paperwork, leaving teachers more time to inspire students.

○ Virtual Learning Assistants: AI is there to answer questions, explain things, and offer help whenever students need it, day or night. This makes learning
easier and more fun because students have someone to turn to whenever they're stuck. It also takes some pressure off teachers because AI can handle common
questions, leaving more time for personalized teaching.

○ Automated Assessment and Instant Feedback: AI acts like a super-speedy homework checker. It looks at your assignments and tests and gives you grades
and feedback right away. This aids in gauging your progress and pinpointing areas for potential enhancement. Furthermore, it alleviates some of your teacher's
grading responsibilities, allowing them to dedicate more time to teaching rather than paper evaluation.

○ Customized Learning Routes: AI figures out what you're good at and where you might need extra help. Then, it gives you the right stuff to learn and the
best way to learn it. This makes learning easier and more fun.

History of Artificial Intelligence

Artificial Intelligence is not a new word and not a new technology for researchers. This technology is much older than you would imagine. Even there are the myths
of Mechanical men in Ancient Greek and Egyptian Myths. Following are some milestones in the history of AI which defines the journey from the AI generation to
till date development.

Maturation of Artificial Intelligence (1943-1952)


○ Year 1943: The first work which is now recognized as AI was done by Warren McCulloch and Walter pits in 1943. They proposed a model of artificial
neurons.

○ Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection strength between neurons. His rule is now called Hebbian learning.

○ Year 1950: The Alan Turing who was an English mathematician and pioneered Machine learning in 1950. Alan Turing publishes "Computing Machinery
and Intelligence" in which he proposed a test. The test can check the machine's ability to exhibit intelligent behavior equivalent to human intelligence, called
a Turing test.

The birth of Artificial Intelligence (1952-1956)

○ Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial intelligence program which was named as "Logic Theorist". This program
had proved 38 of 52 Mathematics theorems, and find new and more elegant proofs for some theorems.

○ Year 1956: The word "Artificial Intelligence" first adopted by American Computer scientist John McCarthy at the Dartmouth Conference. For the first time,
AI coined as an academic field.

At that time high-level computer languages such as FORTRAN, LISP, or COBOL were invented. And the enthusiasm for AI was very high at that time.

The golden years-Early enthusiasm (1956-1974)

○ Year 1966: The researchers emphasized developing algorithms that can solve mathematical problems. Joseph Weizenbaum created the first chatbot in 1966,
which was named ELIZA.

○ Year 1972: The first intelligent humanoid robot was built in Japan, which was named WABOT-1.

The first AI winter (1974-1980)

○ The duration between years 1974 to 1980 was the first AI winter duration. AI winter refers to the time period where computer scientist dealt with a severe
shortage of funding from government for AI researches.

○ During AI winters, an interest of publicity on artificial intelligence was decreased.

A boom of AI (1980-1987)

○ Year 1980: After AI's winter duration, AI came back with an "Expert System". Expert systems were programmed to emulate the decision-making ability of a
human expert.

The second AI winter (1987-1993)

○ The duration between the years 1987 to 1993 was the second AI Winter duration.

○ Again, Investors and government stopped in funding for AI research as due to high cost but not efficient result. The expert system such as XCON was very
cost effective.

The emergence of intelligent agents (1993-2011)

○ Year 1997: In 1997, IBM's Deep Blue achieved a historic milestone by defeating world chess champion.

○ Year 2002: for the first time, AI entered the home in the form of Roomba, a vacuum cleaner.

Year 2006: AI came into the Business world till the year 2006. Companies like Facebook, Twitter, and Netflix also started using AI.

Deep learning, big data and artificial general intelligence (2011-present)

○ Year 2011: In 2011, IBM's Watson won Jeopardy, a quiz shows where it had to solve complex questions as well as riddles. Watson had proved that it could
understand natural language and can solve tricky questions quickly.

○ Year 2012: Google launched an Android app feature, "Google Now", which was able to provide information to the user as a prediction.

○ Year 2014: In the year 2014, Chatbot "Eugene Goostman" won a competition in the infamous "Turing test."

○ Year 2018: The "Project Debater" from IBM debated on complex topics with two master debaters and also performed extremely well.

Now AI has developed to a remarkable level. The concept of Deep learning, big data, and data science are now trending like a boom. Nowadays companies like
Google, Facebook, IBM, and Amazon are working with AI and creating amazing devices.
The future of Artificial Intelligence is inspiring and will come with high intelligence

1.2 Future of AI

What: The future of AI is likely to see advances in general intelligence, automation, personalized experiences, and ethical governance, profoundly transforming
industries and society.

Why: Studying AI's future is essential to prepare for its impacts, harness its potential responsibly, and address ethical, social, and economic challenges that may arise.

Where: AI will be used in future applications across healthcare, education, transportation, finance, and smart cities, enhancing efficiency, decision-making, and
quality of life.

The future of artificial intelligence (AI) is poised to be transformative across multiple dimensions of society, technology, and industry. Here are some key trends and
predictions for the future of AI:

Advances in General AI

● Towards Artificial General Intelligence (AGI): While current AI is highly specialized (narrow AI), there is ongoing research aimed at developing AGI—
machines capable of performing any intellectual task a human can do. This could revolutionize how we interact with machines, making them more adaptable
and autonomous.
● Learning Efficiency: Future AI systems will likely become more efficient in learning from fewer data points, reducing the need for large datasets and making
AI more accessible across different applications.

AI in Healthcare

● Personalized Medicine: AI will play a crucial role in analyzing genetic, environmental, and lifestyle data to tailor personalized treatment plans. AI-driven drug
discovery will accelerate the development of new treatments.
● Healthcare Diagnostics: AI will enhance diagnostic capabilities, potentially outperforming human doctors in certain areas by analyzing medical images,
genomic data, and electronic health records with greater accuracy.

AI and Robotics

● Autonomous Systems: Advances in AI will lead to more sophisticated autonomous robots that can operate in complex environments, from self-driving cars to
drones for delivery and surveillance.
● Human-Robot Collaboration: AI-powered robots will increasingly collaborate with humans in industries like manufacturing, agriculture, and service sectors,
improving efficiency and safety.

Ethics and Governance

● AI Ethics: As AI becomes more integrated into daily life, there will be a growing emphasis on developing ethical guidelines and regulations to ensure
responsible AI use. Issues like bias, fairness, transparency, and accountability will be at the forefront.
● AI Regulation: Governments and international bodies will likely implement more comprehensive regulations to manage the risks associated with AI, especially
in critical areas like autonomous weapons, surveillance, and data privacy.

AI in Business and Industry

● Automation and Workforce Transformation: AI-driven automation will continue to reshape industries by taking over routine tasks, leading to workforce
transformations. Reskilling and upskilling will become essential to prepare workers for AI-integrated environments.
● Decision-Making and Strategy: AI will enhance business decision-making by providing deeper insights through predictive analytics, helping companies
optimize operations, reduce costs, and innovate faster.

AI in Education

● Personalized Learning: AI will create customized learning experiences for students, adapting content and pace to individual needs, thereby improving
educational outcomes.
● Intelligent Tutoring Systems: These systems will become more advanced, providing real-time feedback and support to students, helping them overcome
learning challenges more effectively.

AI and Creativity

● Generative AI: AI will increasingly contribute to creative fields such as art, music, and writing. Tools like generative models will assist artists, designers, and
creators in producing new forms of content, potentially blurring the lines between human and machine creativity.
● Co-Creation: AI could become a collaborator in creative processes, offering suggestions, generating ideas, and even participating in real-time creation
alongside human creators.

AI and Society

● AI and Social Good: AI will be used to address global challenges such as climate change, poverty, and healthcare access, contributing to social good through
applications like environmental monitoring, disaster response, and resource management.
● Impact on Privacy and Security: As AI systems become more pervasive, concerns about data privacy and security will intensify. AI will be both a tool for
cybersecurity and a potential threat if misused.

AI and Quantum Computing

● Quantum AI: The future could see the convergence of AI and quantum computing, leading to breakthroughs in solving complex problems that are currently
intractable, such as optimizing large-scale systems or simulating molecular interactions for drug discovery.

Interdisciplinary AI

● Cross-Disciplinary Collaboration: AI will increasingly be integrated with other fields like biology, neuroscience, and material science, leading to innovations
that can transform industries and lead to new scientific discoveries.
AI Democratization

● Accessible AI Tools: The development of low-code and no-code AI platforms will make AI technology more accessible to non-experts, enabling a wider range
of people and organizations to develop and deploy AI solutions.

Long-Term Challenges and Risks

● Superintelligence: Theoretical discussions around the development of AI that surpasses human intelligence (superintelligence) will continue. While still
speculative, the potential implications of superintelligent AI will drive significant philosophical, ethical, and policy debates.
● AI Alignment: Ensuring that AI systems act in alignment with human values and goals will be a critical challenge, particularly as AI systems become more
autonomous and powerful.

Turing Test
The Turing Test was proposed by Alan Turing in 1950 in his famous paper “Computing Machinery and Intelligence”.
It is a test to determine whether a machine can exhibit intelligent behavior indistinguishable from that of a human.

Setup

 In its classical form, there are three participants:

1. Human Interrogator (Judge) – asks questions through a text-based interface.

2. Human Respondent – answers questions naturally.

3. Machine (AI system) – also answers questions.

 The interrogator communicates with both the human and the machine without seeing them (e.g., via text chat).

 If the machine’s responses are indistinguishable from the human’s, the machine is said to have passed the Turing Test.

Diagram

Human Judge

Asks Questions

---------------------

| |

Human Machine

(Respondent) (AI)

| |

-----> Text Answers <----

Significance

 First operational definition of intelligence in machines.

 Encouraged research into Natural Language Processing (NLP), reasoning, and knowledge representation.

Criticism

1. Focuses only on imitation of human behavior, not true understanding.

2. A machine may “pass” the test using tricks (e.g., chatbot style) without real intelligence.

3. Human-like conversation ≠ real cognitive abilities (e.g., learning, perception).

4. Alternative tests exist (e.g., Total Turing Test, Chinese Room Argument).

The Turing Test evaluates whether a machine can think like a human, by checking if it can converse naturally enough to fool a human judge.

Characteristics of Intelligent Agents

What: An AI agent is a software program designed to interact with its environment, perceive the data it receives, and take actions based on that data to achieve
specific goals

Why: An intelligent agent is a program that can make decisions or perform a service based on its environment, user input and experiences.

Where: Intelligent agents, or AI agents, are used in many aspects of life, including businesses, customer service, and everyday tasks

3.1 What is an Agent:


AI agents have been around since the 1980s when computer scientists began exploring how to develop smart software that could interact like humans. Since then, the
concept has evolved to include AI agents that can make decisions and complete tasks independently.

An AI agent is a software program designed to interact with its environment, perceive the data it receives, and take actions based on that data to achieve specific goals.
AI agents simulate intelligent behavior, and they can be as simple as rule-based systems or as complex as advanced machine learning models. They use predetermined
rules or trained models to make decisions and might need external control or supervision.

An autonomous AI agent is an advanced software program that can operate independently without human control. It can think, act, and learn on its own, without
needing constant input from humans. These agents are widely used in different industries, like healthcare, finance, and banking, to make things run smoother and
more efficiently. They can adjust to new situations, learn from their experiences, and make decisions using their own internal systems.

For example:
AutoGPT is an AI agent that can generate human-like text responses. It can comprehend the context of the conversation and generate relevant responses
accordingly.

BabyAGI is an autonomous AI agent that can independently learn and perform tasks like understanding natural language, analyzing images, identifying
objects, following simple commands, etc.

AgentGPT is an intelligent virtual agent designed to interact with customers and provide them with personalized recommendations. It can understand natural
language and provide relevant responses based on customer queries.

Both AI tools and AI agents can perform tasks autonomously to an extent.

Characteristics of an AI agent

While AI tools and agents are software programs designed to automate tasks, specific key characteristics differentiate AI agents as more sophisticated AI software.

You can consider an AI tool as an AI agent when it has the following characteristics:

Autonomy: An AI virtual agent is capable of performing tasks independently without requiring constant human intervention or input.

Perception: The agent function senses and interprets the environment they operate in through various sensors, such as cameras or microphones.
Reactivity: An AI agent can assess the environment and respond accordingly to achieve its goals.

Reasoning and decision-making: AI agents are intelligent tools that can analyze data and make decisions to achieve goals. They use reasoning techniques and
algorithms to process information and take appropriate actions.

Learning: They can learn and enhance their performance through machine, deep, and reinforcement learning elements and techniques.

Communication: AI agents can communicate with other agents or humans using different methods, like understanding and responding to natural language,
recognizing speech, and exchanging messages through text.

Goal-oriented: They are designed to achieve specific goals, which can be pre-defined or learned through interactions with the environment.

So far, we have a basic understanding of an agent in AI or intelligent agent definition. But how does an AI agent work? Let’s break it down in the next section as we
understand the structure of an agent.

Understanding the structure of an AI agent

At its core, an AI agent is made up of four components: the environment, sensors, actuators, and the decision-making mechanism.
Environment
The environment refers to the area or domain in which an AI agent operates. It can be a physical space, like a factory floor, or a digital space, like a website.

Sensors
Sensors are the tools that an AI agent uses to perceive its environment. These can be cameras, microphones, or any other sensory input that the AI agent can use to
understand what is happening around it.

Actuators
Actuators are the tools that an AI agent uses to interact with its environment. These can be things like robotic arms, computer screens, or any other device the AI
agent can use to change the environment.

Decision-making mechanism
A decision-making mechanism is the brain of an AI agent. It processes the information gathered by the sensors and decides what action to take using the actuators.
The decision-making mechanism is where the real magic happens.
AI agents use various decision-making mechanisms, such as rule-based systems, expert systems, and neural networks, to make informed choices and perform tasks
effectively.

Learning system
The learning system enables the AI agent to learn from its experiences and interactions with the environment. It uses techniques like reinforcement learning, supervised
learning, and unsupervised learning to improve the performance of the AI agent over time.

By understanding the environment, sensors, actuators, and decision-making mechanisms, developers can create AI agents to perform specific tasks accurately and
efficiently. As AI technology evolves, we can expect new types of AI agents with even more sophisticated structures and capabilities.
With the AI agent definition and intelligent agent purpose known to you, it’s time to dive deeper into the agent function and analyze how an AI agent works in our
upcoming section.

How does an AI agent work?

An AI agent works by perceiving its environment, processing information, and taking action to achieve specific goals or tasks. The process usually involves the
following steps:

Step 1: Perceiving the environment


An autonomous AI agent first needs to gather information about its environment. It can do so using sensors or collecting data from various sources.

Step 2: Processing input data


The agent takes the knowledge gathered in Step 1 and prepares it for processing. This may include organizing the data, creating a knowledge base, or making internal
representations that the agent can understand and work with.

Step 3: Decision-making
The agent uses reasoning techniques like logic or statistical analysis to make an informed decision based on its knowledge base and goals. This can involve applying
pre-determined rules or machine learning algorithms.

Step 4: Planning and executing an action


The agent makes a plan or a series of steps to reach its goals. This may involve creating a step-by-step strategy, optimizing resource allocation, or considering various
limitations and priorities. Based on its plan, the agent executes all the steps to achieve the desired goal. It can also receive feedback or new information from the
environment, which can be used to adjust its future actions or update its knowledge base.

Step 5: Learning and Improvement


After taking action, the agent can learn from its own experiences. This feedback loop allows the agent to improve performance and adapt to new situations and
environments.

In conclusion, autonomous AI agents collect and analyze data, preprocess it, make decisions based on machine learning algorithms, take action, and receive feedback.
Now, let us simplify the working of an autonomous AI agent by taking the example of AutoGPT and BabyAGI, the modern-day and most commonly used autonomous
agents.
1.4 Typical intelligent Agents

What: A typical intelligent agent is an autonomous entity in AI that perceives its environment, makes decisions, and takes actions to achieve specific goals, often
using algorithms and data.

Why: Studying intelligent agents is crucial for understanding how AI systems can operate independently, make decisions, and interact with the world, which is
foundational for developing advanced AI applications.

Where: Intelligent agents are used in various fields, including robotics, autonomous vehicles, virtual assistants, and gaming, where they perform tasks like navigation,
decision-making, and user interaction.

In the realm of AI, Intelligent Agents stand as pivotal entities, driving automation and decision-making with cognitive abilities. This article explores the concept,
architecture, functionalities, and real-world applications of these agents, shaping the modern AI landscape.

Understanding Intelligent Agents


Intelligent agents represent a subset of AI systems demonstrating intelligent behavior, including adaptive learning, planning, and problem-solving. It operates in
dynamic environments, where it makes decisions based on the information available to them. These agents dynamically adjust their behavior, learning from past
experiences to improve their approach and aiming for accurate solutions. The design of an intelligent agent typically involves four key components:

1. Perception: Agents have sensors or mechanisms to observe and perceive aspects of their environment. This may involve collecting data from the physical
world, accessing databases, or receiving input from other software components.

2. Reasoning: Agents possess computational or cognitive capabilities to process the information they perceive. They use algorithms, logic, or machine
learning techniques to analyze data, make inferences, and derive insights from the available information.

3. Decision-Making: Based on their perception and reasoning, agents make decisions about the actions they should take to achieve their goals. These
decisions are guided by predefined objectives, which may include optimizing certain criteria or satisfying specific constraints.

4. Action: Agents execute actions in their environment to affect change and progress towards their goals. These actions can range from simple operations,
such as sending a message or adjusting parameters, to more complex tasks, such as navigating a virtual world or controlling physical devices.

Examples of Intelligent Agents include self-driving cars, recommendation systems, virtual assistants, and game-playing AI.

Rational Agents and Rationality in Decision-Making:

Intelligent agents are characterized by their rationality in decision-making, which aims to attain optimal outcomes or, in uncertain scenarios, the best-expected
outcome.

A rational agent can be said to those who do the right thing, It is an autonomous entity designed to perceive its environment, process information, and act in a way
that maximizes the achievement of its predefined goals or objectives. Rational agents always aim to produce an optimal solution.

Rationality in AI refers to the principle that such agents should consistently choose actions that are expected to lead to the best possible outcomes, given their current
knowledge and the uncertainties present in the environment. This principle of rationality guides the behavior of intelligent agents in the following ways:

● Perception and Information Processing: Rational agents strive to perceive and process information efficiently to gain the most accurate understanding
of their environment.

● Reasoning and Inference: They employ logical reasoning and probabilistic inference to make informed decisions based on available evidence and prior
knowledge.

● Decision-Making Under Uncertainty: When faced with uncertainty, rational agents weigh the probabilities of different outcomes and choose actions that
maximize their expected utility or achieve the best possible outcome given the available information.

● Adaptation and Learning: Rational agents adapt their behavior over time based on feedback and experience, continuously refining their decision-making
strategies to improve performance and achieve their goals more effectively.

Example of a rational agent is a chess-playing AI, which selects moves with the highest likelihood of winning.

How Intelligent Agent work Inside?


An agent’s internal workings involve Agent program that run on computing device and process the data comes from the environment through its architecture. Let’s
discuss how an agent works from the inside using program and architecture:

1. Agent architecture
1. Environment: Environment is the area around the agent that it interacts with. An environment can be anything like a physical space, a room or a virtual
space like a game world or the internet.
2. Sensors: Sensors are tools that an AI agent uses to perceive their environment. They can be anything physical like cameras, microphones, temperature
sensors or a software sensor that reads data from files.
3. Actuators: Actuators are tools that AI agents use to interact with their environment through some actions. They can be any physical actuators like wheels,
motors, robotic hands, or computer screens or they can be software actuators that send messages.
4. Effectors: Effectors take instructions from decision making mechanism and translates them into actions and these actions are performed through actuators.

Program or Decision-making mechanism:

This is the brain of the AI agent; this mechanism processes the information that is received through sensors and makes decisions through that data using programs.
Let’s understand how the agent’s program executes the operations.
● The decision-making mechanism, often referred to as the agent’s program, processes information from sensors and makes decisions based on that data.
● The program takes current precepts as input and generates actions for the actuators.
● It embodies the agent function, which maps percepts to actions based on the agent’s goals and objectives.
● Various types of agent programs exist, such as simple reflex agents, model-based reflex agents, goal-based agents, and utility-based agents.
These programs differ in how they process percepts and generate actions, depending on the agent’s design and task requirements.
For example, a simple reflex agent may have a program that directly maps percept states to actions without considering past or future precepts for a two-state vacuum
environment. This decision will be executed through effectors.

AI - Agents & Environments

An AI system is composed of an agent and its environment. The agents act in their environment. The environment may contain other agents.

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.
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.

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 wi th the aim of
obtaining useful information is an important part of rationality.

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

Rationality of an agent depends on the following −

The performance measures, which determine the degree of success.

Agent’s Percept Sequence till now.

The agent’s prior knowledge about the environment.

The actions that the agent can carry out.

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).

The Structure of Intelligent Agents


Agent’s structure can be viewed as −

Agent = Architecture + Agent Program


Architecture = the machinery that an agent executes on.
Agent Program = an implementation of an agent function.

Simple Reflex Agents


They choose actions only based on the current percept.
They are rational only if a correct decision is made only on the basis of current precept.
Their environment is completely observable.

Condition-Action Rule − It is a rule that maps a state (condition) to an action.

Model Based Reflex Agents


They use a model of the world to choose their actions. They maintain an internal state.

Model − knowledge about “how the things happen in the world”.

Internal State − It is a representation of unobserved aspects of current state depending on percept history.

Updating the state requires the information about −

How the world evolves.


How the agent’s actions affect the world.

Goal Based Agents


They choose their actions in order to achieve goals. Goal-based approach is more flexible than reflex agent since the knowledge supporting a
decision is explicitly modeled, thereby allowing for modifications.
Goal − It is the description of desirable situations.

Utility Based Agents


They choose actions based on a preference (utility) for each state.

Goals are inadequate when −

There are conflicting goals, out of which only few can be achieved.

Goals have some uncertainty of being achieved and you need to weigh likelihood of success against the importance of a goal.
The Nature of Environments
Some programs operate in the entirely artificial environment confined to keyboard input, database, computer file systems and character output
on a screen.
In contrast, some software agents (software robots or softbots) exist in rich, unlimited softbots domains. The simulator has a very detailed,
complex environment. The software agent needs to choose from a long array of actions in real time. A softbot designed to scan the online
preferences of the customer and show interesting items to the customer works in the real as well as an artificial environment.
The most famous artificial environment is the Turing Test environment, in which one real and other artificial agents are tested on equal ground.
This is a very challenging environment as it is highly difficult for a software agent to perform as well as a human.

Turing Test
The success of an intelligent behavior of a system can be measured with Turing Test.

Two persons and a machine to be evaluated participate in the test. Out of the two persons, one plays the role of the tester. Each of them sits in
different rooms. The tester is unaware of who is machine and who is a human. He interrogates the questions by typing and sending them to both
intelligences, to which he receives typed responses.
This test aims at fooling the tester. If the tester fails to determine machine’s response from the human response, then the machine is said to be
intelligent.

Properties of Environment
The environment has multifold properties −

Discrete / Continuous − If there are a limited number of distinct, clearly defined, states of the environment, the environment is discrete
(For example, chess); otherwise it is continuous (For example, driving).
Observable / Partially Observable − If it is possible to determine the complete state of the environment at each time point from the
percepts it is observable; otherwise it is only partially observable.

Static / Dynamic − If the environment does not change while an agent is acting,
then it is static; otherwise it is dynamic.

Single agent / Multiple agents − The environment may contain other agents
which may be of the same or different kind as that of the agent.
Accessible / Inaccessible − If the agent’s sensory apparatus can have access
to the complete state of the environment, then the environment is accessible to
that agent.
Deterministic / Non-deterministic − If the next state of the environment is
completely determined by the current state and the actions of the agent, then
the environment is deterministic; otherwise it is non-deterministic.
Episodic / Non-episodic − In an episodic environment, each episode consists of
the agent perceiving and then acting. The quality of its action depends just on
the episode itself. Subsequent episodes do not depend on the actions in the
previous episodes. Episodic environments are much simpler because the agent
does not need to think ahead.

Simple Reflex Agent

 Idea: Acts only on the basis of the current percept, ignoring history.
 Uses condition–action rules (if–then rules).
 Works well in fully observable environments, but fails in partially observable ones.

[Percept] → [Condition-Action Rules] → [Action]

Model-Based Reflex Agent

 Idea: Maintains an internal model of the world to handle partially observable environments.
 Uses both current percepts and stored state information to decide actions.

[Percept] → [State + Model of World] → [Condition-Action Rules] → [Action]

Goal-Based Agent

 Idea: Goes beyond rules — actions are chosen to achieve a specific goal.
 Requires search and planning.
 More flexible than reflex agents.

[Percept] → [Model of World] → [Goal Information] → [Search/Planning] → [Action]

Utility-Based Agent

 Idea: Not only achieves goals but also tries to achieve them in the best possible way.
 Uses a utility function (happiness, profit, safety, etc.) to evaluate outcomes.

[Percept] → [Model of World] → [Utility Function] → [Decision/Action]

Learning Agent

 Idea: Improves its performance with experience.


 Has components like:
o Learning element (improves agent by learning),
o Performance element (executes actions),
o Critic (gives feedback),
o Problem Generator (suggests exploration).

[Environment] ↔ [Performance Element] → [Action]

[Learning Element + Critic + Problem Generator]

Summary Table:

Agent Type Key Feature

Simple Reflex Uses condition–action rules only

Model-Based Maintains internal state + model


Agent Type Key Feature

Goal-Based Uses goals to decide actions

Utility-Based Optimizes actions using utility

Learning-Based Improves via feedback & experience

PEAS Representation of AI agent

PEAS stands for performance measure, environment, actuators and sensors. It is a framework that is used
to describe an AI agent. It’s a structured approach to design and understand AI systems.
1. Performance measure: Performance measure is a criterion that measures the success of the
agent. It is used to evaluate how well the agent is achieving its goal.
For example, in a spam filter system, the performance measure could be minimizing the
number of spam emails reaching the inbox.
2. Environment: The environment represents the domain or context in which the agent operates
and interacts. This can range from physical spaces like rooms to virtual environments such as
game worlds or online platforms like the internet.
3. Actuators: Actuators are the mechanisms through which the AI agent performs actions or
interacts with its environment to achieve its goals. These can include physical actuators like
motors and robotic hands, as well as digital actuators like computer screens and text-to-speech
converters.
4. Sensors: Sensors enable the AI agent to gather information from its environment, providing
data that informs its decision-making process and actions. These sensors can capture various
environmental parameters such as temperature, sound, movement, or visual input. Examples
of sensors include cameras, microphones, temperature sensors, and motion sensors.

Applications of Intelligent Agents

Intelligent agents find applications across a wide range of domains, revolutionizing industries and
enhancing human capabilities. Some notable applications include:
1. Autonomous Systems: Intelligent agents power autonomous vehicles, drones, and robots,
enabling them to perceive their surroundings, navigate complex environments, and make
decisions in real-time.
2. Personal Assistants: Virtual personal assistants like Siri, Alexa, and Google Assistant
employ intelligent agents to understand user queries, retrieve relevant information, and
perform tasks such as scheduling appointments, setting reminders, and controlling smart home
devices.
3. Recommendation Systems: E-commerce platforms, streaming services, and social media
platforms utilize intelligent agents to analyze user preferences and behavior, providing
personalized recommendations for products, movies, music, and content.
4. Financial Trading: Intelligent agents are employed in algorithmic trading systems to analyze
market data, identify trading opportunities, and execute trades autonomously, maximizing
returns and minimizing risks.

Challenges for Intelligent Agents


Despite their immense potential, intelligent agents also pose several challenges and considerations:

1. Ethical and Legal Implications: Intelligent agents raise ethical concerns regarding privacy,
bias, transparency, and accountability. Developers must ensure that agents behave ethically
and comply with legal regulations and societal norms.
2. Robustness and Reliability: Agents must be robust and reliable in dynamic and uncertain
environments. They should be capable of handling unexpected situations, adversarial attacks,
and noisy or incomplete data.
3. Interpretability: Understanding and interpreting the decisions made by intelligent agents is
crucial for building trust and transparency. Explainable AI techniques are essential for
providing insights into the reasoning process and decision-making of agents.
4. Scalability and Efficiency: As AI systems become increasingly complex and data-intensive,
scalability and efficiency become critical considerations. Designing agents that can scale to
large-scale deployments and operate efficiently with limited computational resources is
essential.

Conclusion
Intelligent Agents are essential components driving automation and decision-making in AI. These
agents, equipped with adaptive learning, planning, and problem-solving capabilities, dynamically
adjust their behavior to achieve accurate solutions. Examples such as self-driving cars,
recommendation systems, virtual assistants, and game-playing AI illustrate the diverse applications
of intelligent agents in shaping the modern AI landscape. As AI advances, Intelligent Agents will
continue to lead innovation and shape the future of technology.

1.5 Problem Solving Approach to Typical AI problems.

What: The problem-solving approach in AI involves defining the problem, collecting and preparing data,
selecting and training a model, evaluating its performance, and deploying it for real-world use.

Why: Studying this approach is essential to ensure AI solutions are accurate, efficient, and aligned with
goals, helping avoid common pitfalls like bias or overfitting.

Where: This approach can be applied across various domains, such as healthcare, finance, marketing,
and more, wherever AI is used to solve complex problems or optimize processes.

Solving AI problems effectively requires a structured approach, which helps ensure that solutions are
accurate, efficient, and aligned with the intended goals. Here’s a comprehensive explanation of the
problem-solving approach for typical AI problems:

1. Problem Definition
● Understand the Problem Context: Begin by thoroughly understanding the problem you are
trying to solve. What is the specific task, challenge, or opportunity? For instance, is the goal to
classify images, predict future trends, or generate new content?
● Specify Objectives and Goals: Clearly define what success looks like. This includes identifying
the desired output (e.g., labels for images, numerical predictions), performance metrics (e.g.,
accuracy, precision, recall), and any constraints (e.g., time, resources, legal restrictions).
● Identify Stakeholders: Understand who the end-users or stakeholders are and how they will
interact with the AI solution. This ensures the problem-solving process is user-centric.

2. Data Collection and Preparation

● Data Collection: Gather the relevant data required to train, validate, and test the AI model. This
could involve scraping data from the web, using existing datasets, or collecting new data through
sensors or surveys.
● Data Exploration: Conduct an exploratory data analysis (EDA) to understand the data's structure,
distribution, and potential patterns. Tools like histograms, scatter plots, and correlation matrices
are useful here.
● Data Cleaning: Clean the data by handling missing values, correcting errors, and removing
duplicates. It may also involve dealing with outliers and noise in the data.
● Feature Engineering: Transform raw data into meaningful features that can improve the
performance of the AI model. This might include normalization, scaling, encoding categorical
variables, and creating new features based on domain knowledge.

3. Model Selection

● Choose an Appropriate Model: Based on the problem type (e.g., classification, regression,
clustering, reinforcement learning), select a suitable model or algorithm. For example, decision
trees, support vector machines, or neural networks.
● Consider Simplicity vs. Complexity: Start with simple models to establish a baseline and
gradually move to more complex models if necessary. Simpler models are often easier to interpret
and faster to train.
● Baseline Model: Develop a simple baseline model to serve as a reference point. This helps gauge
whether more sophisticated models are truly improving performance.

4. Model Training

● Data Splitting: Split the dataset into training, validation, and test sets. The training set is used to
fit the model, the validation set helps tune hyperparameters, and the test set assesses the model’s
performance on unseen data.
● Training the Model: Use the training data to optimize the model’s parameters. This involves
selecting an appropriate loss function and using optimization techniques like gradient descent to
minimize the loss.
● Hyperparameter Tuning: Optimize the model’s hyperparameters (e.g., learning rate,
regularization parameters) using techniques like grid search, random search, or Bayesian
optimization to improve performance.

5. Model Evaluation
● Evaluate on Validation Set: Use the validation set to evaluate the model’s performance.
Common metrics include accuracy, precision, recall, F1-score for classification tasks, or mean
squared error for regression tasks.
● Cross-Validation: To ensure that the model's performance is robust and not overly dependent on
a particular split of the data, use techniques like k-fold cross-validation.
● Error Analysis: Analyze errors by examining cases where the model performs poorly.
Understanding why the model fails in certain scenarios can provide insights for improvement.

6. Model Optimization

● Refinement and Iteration: Based on the evaluation, refine the model by adjusting features,
tuning hyperparameters, or experimenting with different algorithms. Iterate this process to
progressively improve the model’s performance.
● Ensemble Methods: Consider using ensemble techniques, such as bagging, boosting, or stacking,
to combine multiple models and improve overall performance.

7. Deployment

● Model Deployment: Once the model performs satisfactorily, deploy it into a production
environment where it can be used by end-users or integrated into applications.
● Scalability Considerations: Ensure that the model can handle large-scale data and user
interactions in a real-world setting.
● Real-Time Monitoring: Implement monitoring tools to track the model’s performance post-
deployment, checking for issues like data drift or performance degradation over time.

8. Maintenance and Updates

● Continuous Monitoring: Regularly monitor the model's performance and make updates as
needed. This includes retraining the model with new data to keep it relevant.
● Feedback Loops: Establish mechanisms for users to provide feedback on the model's outputs.
Use this feedback to further refine and improve the model.
● Version Control: Maintain version control for different models and datasets to ensure
reproducibility and track changes over time.

9. Documentation and Reporting

● Comprehensive Documentation: Document the entire process, including data sources, model
choices, hyperparameters, and evaluation metrics. This ensures transparency and facilitates future
modifications or audits.
● Reporting to Stakeholders: Present the results and findings in a clear and concise manner,
tailored to the audience. Use visualizations and summaries to explain how the AI solution meets
the problem’s objectives.

10. Ethical Considerations

● Bias and Fairness: Assess the model for potential biases that could result in unfair or
discriminatory outcomes. Implement strategies to mitigate these biases, such as rebalancing the
dataset or using fairness-aware algorithms.
● Transparency and Explainability: Ensure that the AI model's decision-making process is
transparent and understandable, especially in critical applications like healthcare or finance.
● Privacy and Security: Protect the data used in the AI process and ensure compliance with privacy
regulations. Implement security measures to safeguard the model and its outputs.

Problem Solving Approach Using Example:

To illustrate the problem-solving approach to a typical AI problem, let's walk through an example:
Building an AI model to predict whether a customer will churn (leave a service) or not for a
telecommunications company.

1. Problem Definition

● Understand the Problem: The goal is to predict whether a customer will churn, allowing the
company to take proactive measures to retain them.

● Specify Objectives and Goals: The objective is to build a model that predicts customer churn
with high accuracy. The key performance metrics might include accuracy, precision, recall, and
the F1-score. The business goal is to reduce churn rates, which directly impacts revenue.

2. Data Collection and Preparation

● Data Collection: The company collects data from various sources, including customer
demographics, service usage patterns, billing information, and customer support interactions. This
data may include features like age, contract type, monthly charges, and whether the customer has
called support.

● Data Exploration: Perform exploratory data analysis (EDA) to understand the data distribution,
detect anomalies, and identify trends. For instance, you might discover that customers with higher
monthly charges are more likely to churn.

● Data Cleaning: Clean the data by handling missing values (e.g., filling with median values or
removing records), correcting errors, and removing duplicates. For example, if the 'tenure' (length
of time with the company) is missing, decide whether to fill it with an average or remove those
records.
● Feature Engineering: Create new features or modify existing ones to improve the model's ability
to predict churn. For example, you might create a new feature indicating the percentage of time a
customer has called support, which could be a strong indicator of dissatisfaction.

3. Model Selection

● Choose an Appropriate Model: Since this is a classification problem (churn or no churn),


consider algorithms like Logistic Regression, Decision Trees, Random Forests, or Gradient
Boosting Machines.

● Baseline Model: Start with a simple Logistic Regression model to set a baseline. This provides a
reference point for evaluating more complex models.

● Consider Simplicity vs. Complexity: If Logistic Regression performs well, you may not need
more complex models. However, if the data is complex and nonlinear, consider more sophisticated
models like Random Forests or XGBoost.

4. Model Training

● Data Splitting: Split the data into training (70%), validation (15%), and test sets (15%). The
training set is used to train the model, the validation set helps tune hyperparameters, and the test
set is used for final evaluation.

● Training the Model: Use the training set to fit the model. For example, with a Random Forest
model, you train it by optimizing for criteria like Gini impurity or entropy to split the data.

● Hyperparameter Tuning: Use techniques like grid search or random search to find the best
hyperparameters (e.g., the number of trees in a Random Forest or the maximum depth of each
tree).

5. Model Evaluation

● Evaluate on Validation Set: Evaluate the model's performance on the validation set using metrics
like accuracy, precision, recall, and F1-score. For example, you might find that the model has an
accuracy of 85%, with a recall of 90%, indicating it correctly identifies most of the churners.

● Cross-Validation: Use k-fold cross-validation to ensure the model generalizes well and isn’t
overfitting to a particular split of the data.
● Error Analysis: Analyze cases where the model predicts churn incorrectly. For instance, if high-
value customers are being predicted as non-churners and then leave, this might indicate the model
needs better handling of certain features like service satisfaction.

6. Model Optimization

● Refinement and Iteration: Based on the error analysis, you might refine the model by adding
new features, like customer sentiment from support interactions, or by trying a different algorithm
like Gradient Boosting.

● Ensemble Methods: Consider combining multiple models to improve performance. For instance,
you might use a combination of Logistic Regression, Random Forest, and XGBoost in an
ensemble model to get better predictions.

7. Deployment

● Model Deployment: Once satisfied with the model’s performance, deploy it into the company's
customer management system. The model can now predict the likelihood of churn in real-time as
new data comes in.

● Scalability Considerations: Ensure the model can handle large amounts of data and make
predictions quickly, which is crucial for real-time customer engagement.

● Real-Time Monitoring: Set up monitoring to track the model's performance over time. This
includes checking if the model's accuracy degrades as new data comes in or if there's data drift
(e.g., significant changes in customer behavior).

8. Maintenance and Updates

● Continuous Monitoring: Regularly retrain the model with new data to ensure it remains accurate.
For instance, if the company introduces a new service plan, this might change customer behavior,
requiring the model to be updated.

● Feedback Loops: Collect feedback from the customer service team on the model's predictions. If
they find that the model is consistently wrong in certain scenarios, use this information to refine
the model further.

● Version Control: Keep track of different model versions and datasets used. This helps in
reproducing results and ensuring consistency when rolling out updates.
9. Documentation and Reporting

● Comprehensive Documentation: Document the entire process, including data sources, feature
engineering techniques, model choices, and performance metrics. This is important for
transparency and future reference.

● Reporting to Stakeholders: Present the model’s performance and business impact to


stakeholders. Use visualizations and clear language to explain how the model reduces churn and
increases customer retention.

10. Ethical Considerations

● Bias and Fairness: Assess whether the model inadvertently introduces bias, such as unfairly
predicting higher churn rates for certain demographic groups. Implement strategies to mitigate
these biases, like rebalancing the dataset or using fairness-aware algorithms.

● Transparency and Explainability: Ensure that the model's predictions are explainable,
especially in cases where decisions might affect customer interactions. For instance, if a customer
is flagged as likely to churn, the company should understand why.

● Privacy and Security: Ensure customer data is handled securely, adhering to data privacy
regulations such as GDPR. Protect the model from being exploited or reverse-engineered.

Important questions of Unit 1 (Short Answer, Medium Answer and Long Answer Type)

1. Differentiate between Artificial Intelligence, Machine Learning & Deep Learning.


(AKTU 2022-23) [Medium Answer]
2. Define Artificial Intelligence. List the Six disciplines needed for an Intelligent system
to Pass the Turing Test. [Medium Answer]
3. Define the four categories of Intelligent system. (AKTU 2022-23) [Long Answer]
4. Describe the four categories under which AI is classified. (AKTU 2016 -17) [Long
Answer]
5. Differentiate between goal based and utility-based agents. [Medium Answer]
6. Identify some advantages and disadvantages of Artificial Intelligence. [Medium
Answer]
7. Describe the history of Artificial Intelligence in brief. [Long Answer]
8. What are the goals of Artificial Intelligence? [Short Answer]
9. Define learning agent with example. [Short Answer]

UNIT-II

Search Algorithms in Artificial Intelligence

Search algorithms are one of the most important areas of Artificial Intelligence. This topic will explain
all about the search algorithms in AI.
In this topic, we will learn various problem-solving search algorithms.

2.1 Problem-solving agents/methods:

In Artificial Intelligence, Search techniques are universal problem-solving methods. Rational agents or
Problem-solving agents in AI mostly used these search strategies or algorithms to solve a specific
problem and provide the best result. Problem-solving agents are the goal-based agents and use atomic
representation.

2.2 Search Strategies

Search Algorithm Terminologies:

○ Search: Searching is a step-by-step procedure to solve a search-problem in a given search space.


A search problem can have three main factors:

a. Search Space: Search space represents a set of possible solutions, which a system may
have.

b. Start State: It is a state from where agent begins the search.

c. Goal test: It is a function which observe the current state and returns whether the goal
state is achieved or not.

○ Search tree: A tree representation of search problem is called Search tree. The root of the search
tree is the root node which is corresponding to the initial state.

○ Actions: It gives the description of all the available actions to the agent.

○ Transition model: A description of what each action do, can be represented as a transition model.

○ Path Cost: It is a function which assigns a numeric cost to each path.

○ Solution: It is an action sequence which leads from the start node to the goal node.

○ Optimal Solution: If a solution has the lowest cost among all solutions.

Properties of Search Algorithms:

Following are the four essential properties of search algorithms to compare the efficiency of these
algorithms:
Completeness: A search algorithm is said to be complete if it guarantees to return a solution if at least
any solution exists for any random input.

Optimality: If a solution found for an algorithm is guaranteed to be the best solution (lowest path cost)
among all other solutions, then such a solution for is said to be an optimal solution.

Time Complexity: Time complexity is a measure of time for an algorithm to complete its task.

Space Complexity: It is the maximum storage space required at any point during the search, as the
complexity of the problem.

Types of search algorithms

Based on the search problems we can classify the search algorithms into uninformed (Blind search) search
and informed search (Heuristic search) algorithms.

2.3 Uninformed/Blind Search:


The uninformed search does not contain any domain knowledge such as closeness, the location of the
goal. It operates in a brute-force way as it only includes information about how to traverse the tree and
how to identify leaf and goal nodes. Uninformed search applies a way in which search tree is searched
without any information about the search space like initial state operators and test for the goal, so it is
also called blind search. It examines each node of the tree until it achieves the goal node.

It can be divided into five main types:

○ Breadth-first search

○ Uniform cost search

○ Depth-first search

○ Iterative deepening depth-first search

○ Bidirectional Search

2.4 Informed Search

Informed search algorithms use domain knowledge. In an informed search, problem information is
available which can guide the search. Informed search strategies can find a solution more efficiently than
an uninformed search strategy. Informed search is also called a Heuristic search.

A heuristic is a way which might not always be guaranteed for best solutions but guaranteed to find a
good solution in reasonable time.

Informed search can solve much complex problem which could not be solved in another way.

An example of informed search algorithms is a traveling salesman problem.

1. Greedy Search

2. A* Search

Uninformed Search Algorithms

Uninformed search is a class of general-purpose search algorithms which operates in brute force-way.
Uninformed search algorithms do not have additional information about state or search space other than
how to traverse the tree, so it is also called blind search.
Following are the various types of uninformed search algorithms:

1. Breadth-first Search

2. Depth-first Search

3. Depth-limited Search

4. Iterative deepening depth-first search

5. Uniform cost search

6. Bidirectional Search

1. Breadth-first Search:

○ Breadth-first search is the most common search strategy for traversing a tree or graph. This
algorithm searches breadthwise in a tree or graph, so it is called breadth-first search.

○ BFS algorithm starts searching from the root node of the tree and expands all successor node at
the current level before moving to nodes of next level.

○ The breadth-first search algorithm is an example of a general-graph search algorithm.

○ Breadth-first search implemented using FIFO queue data structure.

Advantages:

○ BFS will provide a solution if any solution exists.

○ If there are more than one solutions for a given problem, then BFS will provide the minimal
solution which requires the least number of steps.

Disadvantages:

○ It requires lots of memory since each level of the tree must be saved into memory to expand the
next level.

○ BFS needs lots of time if the solution is far away from the root node.

Example:

In the below tree structure, we have shown the traversing of the tree using BFS algorithm from the root
node S to goal node K. BFS search algorithm traverse in layers, so it will follow the path which is shown
by the dotted arrow, and the traversed path will be:

1. S---> A--->B---->C--->D---->G--->H--->E---->F---->I---->K

Time Complexity: Time Complexity of BFS algorithm can be obtained by the number of nodes traversed
in BFS until the shallowest Node. Where the d= depth of shallowest solution and b is a node at every
state.

T (b) = 1+b2+b3+.......+ bd= O (bd)

Space Complexity: Space complexity of BFS algorithm is given by the Memory size of frontier which
is O(bd).

Completeness: BFS is complete, which means if the shallowest goal node is at some finite depth, then
BFS will find a solution.

Optimality: BFS is optimal if path cost is a non-decreasing function of the depth of the node.

2. Depth-first Search
○ Depth-first search isa recursive algorithm for traversing a tree or graph data structure.

○ It is called the depth-first search because it starts from the root node and follows each path to its
greatest depth node before moving to the next path.

○ DFS uses a stack data structure for its implementation.

○ The process of the DFS algorithm is similar to the BFS algorithm.

Advantage:

○ DFS requires very less memory as it only needs to store a stack of the nodes on the path from root
node to the current node.

○ It takes less time to reach to the goal node than BFS algorithm (if it traverses in the right path).

Disadvantage:

○ There is the possibility that many states keep re-occurring, and there is no guarantee of finding
the solution.

○ DFS algorithm goes for deep down searching and sometime it may go to the infinite loop.

Example:

In the below search tree, we have shown the flow of depth-first search, and it will follow the order as:

Root node--->Left node ----> right node.

It will start searching from root node S, and traverse A, then B, then D and E, after traversing E, it will
backtrack the tree as E has no other successor and still goal node is not found. After backtracking it will
traverse node C and then G, and here it will terminate as it found goal node.
Completeness: DFS search algorithm is complete within finite state space as it will expand every node
within a limited search tree.

Time Complexity: Time complexity of DFS will be equivalent to the node traversed by the algorithm. It
is given by:

T(n)= 1+ n2+ n3 +.........+ nm=O(nm)

Where, m= maximum depth of any node and this can be much larger than d (Shallowest solution depth)

Space Complexity: DFS algorithm needs to store only single path from the root node, hence space
complexity of DFS is equivalent to the size of the fringe set, which is O(bm).

Optimal: DFS search algorithm is non-optimal, as it may generate a large number of steps or high cost
to reach to the goal node.

3. Depth-Limited Search Algorithm:

A depth-limited search algorithm is similar to depth-first search with a predetermined limit. Depth-limited
search can solve the drawback of the infinite path in the Depth-first search. In this algorithm, the node at
the depth limit will be treated as it has no successor nodes further.

Depth-limited search can be terminated with two Conditions of failure:

○ Standard failure value: It indicates that the problem does not have any solution.

○ Cutoff failure value: It defines no solution for the problem within a given depth limit.

Advantages:

Depth-limited search is Memory efficient.

Disadvantages:

○ Depth-limited search also has a disadvantage of incompleteness.

○ It may not be optimal if the problem has more than one solution.

Example:

Completeness: DLS search algorithm is complete if the solution is above the depth-limit.

Time Complexity: Time complexity of DLS algorithm is O(bℓ).


Space Complexity: Space complexity of DLS algorithm is O(b×ℓ).

Optimal: Depth-limited search can be viewed as a special case of DFS, and it is also not optimal even if
ℓ>d.

4. Uniform-cost Search Algorithm:

Uniform-cost search is a searching algorithm used for traversing a weighted tree or graph. This algorithm
comes into play when a different cost is available for each edge. The primary goal of the uniform-cost
search is to find a path to the goal node which has the lowest cumulative cost. Uniform-cost search
expands nodes according to their path costs form the root node. It can be used to solve any graph/tree
where the optimal cost is in demand. A uniform-cost search algorithm is implemented by the priority
queue. It gives maximum priority to the lowest cumulative cost. Uniform cost search is equivalent to BFS
algorithm if the path cost of all edges is the same.

Advantages:

○ Uniform cost search is optimal because at every state the path with the least cost is chosen.

Disadvantages:

○ It does not care about the number of steps involve in searching and only concerned about path
cost. Due to which this algorithm may be stuck in an infinite loop.

Example:
Completeness:

Uniform-cost search is complete, such as if there is a solution, UCS will find it.

Time Complexity:

Let C* is Cost of the optimal solution, and ε is each step to get closer to the goal node. Then the number
of steps is = C*/ε+1. Here we have taken +1, as we start from state 0 and end to C*/ε.

Hence, the worst-case time complexity of Uniform-cost search isO(b1 + [C*/ε])/.

Space Complexity:

The same logic is for space complexity so, the worst-case space complexity of Uniform-cost search is
O(b1 + [C*/ε]).

Optimal:

Uniform-cost search is always optimal as it only selects a path with the lowest path cost.

5. Iterative deepening depth-first Search:

The iterative deepening algorithm is a combination of DFS and BFS algorithms. This search algorithm
finds out the best depth limit and does it by gradually increasing the limit until a goal is found.
This algorithm performs depth-first search up to a certain "depth limit", and it keeps increasing the depth
limit after each iteration until the goal node is found.

This Search algorithm combines the benefits of Breadth-first search's fast search and depth-first search's
memory efficiency.

The iterative search algorithm is useful for uninformed search when the search space is large, and depth
of the goal node is unknown.

Advantages:

○ It Combines the benefits of BFS and DFS search algorithms in terms of fast search and memory
efficiency.

Disadvantages:

○ The main drawback of IDDFS is that it repeats all the work of the previous phase.

Example:

Following tree structure is showing the iterative deepening depth-first search. IDDFS algorithm performs
various iterations until it does not find the goal node. The iteration performed by the algorithm is given
as:

1'st Iteration-----> A
2'nd Iteration----> A, B, C
3'rd Iteration------>A, B, D, E, C, F, G
4'th Iteration------>A, B, D, H, I, E, C, F, K, G
In the fourth iteration, the algorithm will find the goal node.

Completeness:

This algorithm is complete if the branching factor is finite.

Time Complexity:

Let's suppose b is the branching factor and depth is d then the worst-case time complexity is O(bd).

Space Complexity:

The space complexity of IDDFS will be O(bd).

Optimal:

The IDDFS algorithm is optimal if path cost is a non- decreasing function of the depth of the node.

6. Bidirectional Search Algorithm:

Bidirectional search algorithm runs two simultaneous searches, one form initial state called as forward-
search and other from goal node called as backward-search, to find the goal node. Bidirectional search
replaces one single search graph with two small subgraphs in which one starts the search from an initial
vertex and other starts from goal vertex. The search stops when these two graphs intersect each other.

Bidirectional search can use search techniques such as BFS, DFS, DLS, etc.

Advantages:

○ Bidirectional search is fast.

○ Bidirectional search requires less memory


Disadvantages:

○ Implementation of the bidirectional search tree is difficult.

○ In bidirectional search, one should know the goal state in advance.

Example:

In the below search tree, a bidirectional search algorithm is applied. This algorithm divides one graph/tree
into two sub-graphs. It starts traversing from node 1 in the forward direction and starts from goal node
16 in the backward direction.

The algorithm terminates at node 9 where two searches meet.

Completeness: Bidirectional Search is complete if we use BFS in both searches.

Time Complexity: Time complexity of bidirectional search using BFS is O(bd).

Space Complexity: Space complexity of bidirectional search is O(bd).

Optimal: Bidirectional search is Optimal.


2.2 Informed Search Strategies :

Best First Search (BFS)

Best First Search is a graph/tree search algorithm that explores a graph by expanding the most
promising node according to a given evaluation function.

 It is informed search (uses heuristics).

 It tries to reach the goal faster by always choosing the node that seems closest to the goal.

Algorithm (Steps)

1. Put the start node in the OPEN list (priority queue).

2. If OPEN list is empty → failure.

3. Pick the node n from OPEN that has the lowest heuristic value h(n).

4. If n is the goal, return success.

5. Else, expand n (generate successors).

6. Put successors into OPEN, ordered by their heuristic values.

7. Repeat until goal is found.

Evaluation Function

 Typically uses heuristic function h(n) = estimated cost from node n to goal.

 Best First Search chooses the node with the lowest h(n).

Example 1: Route Finding (Romania Map Problem)

Imagine we want to go from Arad → Bucharest (as in Russell & Norvig’s AI book).
We use heuristic values = straight-line distances to Bucharest.

Steps:

 Start at Arad (h=366).

 Expand neighbors:

o Sibiu (h=253), Timisoara (h=329), Zerind (h=374).

 Choose Sibiu (lowest h=253).

 Expand Sibiu’s neighbors: Fagaras (h=176), Rimnicu Vilcea (h=193).

 Next pick Fagaras (176).

 Expand Fagaras → Bucharest (h=0).


 Goal found ✅

Thus, BFS guided us toward Bucharest by always choosing the city “closest” (by heuristic).

Example 2: Simple Graph Search

Suppose we want to go from S → G.

/\

(h=4) (h=2)

/ \

A B

(h=3) (h=1)

| |

G(h=0) G(h=0)

Steps:

 Start at S (h=4).

 Neighbors: A (h=3), B (h=2). Choose B.

 Expand B → Goal found ✅.

Here, BFS reached G quickly by using the heuristic values.

Diagram (Flow)

Start

[Priority Queue]

Pick node with lowest h(n)

Expand & add children

Repeat until Goal


Advantages

 More efficient than uninformed searches (like BFS/DFS).

 Uses heuristics → can reduce search space.

Disadvantages

 Not guaranteed to find optimal path (it’s greedy).

 Performance depends on the quality of heuristic.

Best First Search = “Always expand the node that looks best (closest to goal) according to
heuristic h(n).”

A* Search Algorithm in Artificial Intelligence

An Introduction to A* Search Algorithm in AI

A* (pronounced "A-star") is a powerful graph traversal and pathfinding algorithm widely used in artificial
intelligence and computer science. It is mainly used to find the shortest path between two nodes in a
graph, given the estimated cost of getting from the current node to the destination node. The main
advantage of the algorithm is its ability to provide an optimal path by exploring the graph in a more
informed way compared to traditional search algorithms such as Dijkstra's algorithm.

Algorithm A* combines the advantages of two other search algorithms: Dijkstra's algorithm and Greedy
Best-First Search. Like Dijkstra's algorithm, A* ensures that the path found is as short as possible but
does so more efficiently by directing its search through a heuristic similar to Greedy Best-First Search. A
heuristic function, denoted h(n), estimates the cost of getting from any given node n to the destination
node.

The main idea of A* is to evaluate each node based on two parameters:

1. g(n): the actual cost to get from the initial node to node n. It represents the sum of the costs of
node n outgoing edges.

2. h(n): Heuristic cost (also known as "estimation cost") from node n to destination node n. This
problem-specific heuristic function must be acceptable, meaning it never overestimates the actual
cost of achieving the goal. The evaluation function of node n is defined as f(n) = g(n) h(n).
Algorithm A* selects the nodes to be explored based on the lowest value of f(n), preferring the nodes
with the lowest estimated total cost to reach the goal. The A* algorithm works:

1. Create an open list of found but not explored nodes.

2. Create a closed list to hold already explored nodes.

3. Add a starting node to the open list with an initial value of g

4. Repeat the following steps until the open list is empty or you reach the target node:

a. Find the node with the smallest f-value (i.e., the node with the minor g(n) h(n)) in the open
list.

b. Move the selected node from the open list to the closed list.

c. Create all valid descendants of the selected node.

d. For each successor, calculate its g-value as the sum of the current node's g value and the
cost of movingfrom the current node to the successor node. Update the g-value of the
tracker when a better path is found.

e. If the follower is not in the open list, add it with the calculated g-value and calculate its h-
value. If it is already in the open list, update its g value if the new path is better.

f. Repeat the cycle. Algorithm A* terminates when the target node is reached or when the
open list empties, indicating no paths from the start node to the target node. The A* search
algorithm is widely used in various fields such as robotics, video games, network routing,
and design problems because it is efficient and can find optimal paths in graphs or
networks.

However, choosing a suitable and acceptable heuristic function is essential so that the algorithm performs
correctly and provides an optimal solution.

How does the A* Search algorithm work in Artificial Intelligence?

The A* (pronounced "letter A") search algorithm is a popular and widely used graph traversal algorithm
in artificial intelligence and computer science. It is used to find the shortest path from a start node to a
destination node in a weighted graph. A* is an informed search algorithm that uses heuristics to guide the
search efficiently. The search algorithm A* works as follows:
The algorithm starts with a priority queue to store the nodes to be explored. It also instantiates two data
structures g(n): The cost of the shortest path so far from the starting node to node n and h(n), the estimated
cost (heuristic) from node n to the destination node. It is often a reasonable heuristic, meaning it never
overestimates the actual cost of achieving a goal. Put the initial node in the priority queue and set its g(n)
to 0. If the priority queue is not empty, Remove the node with the lowest f(n) from the priority queue.
f(n) = g(n) h(n). If the deleted node is the destination node, the algorithm ends, and the path is found.
Otherwise, expand the node and create its neighbors. For each neighbor node, calculate its initial g(n)
value, which is the sum of the g value of the current node and the cost of moving from the current node
to a neighboring node. If the neighbor node is not in priority order or the original g(n) value is less than
its current g value, update its g value and set its parent node to the current node. Calculate the f(n) value
from the neighbor node and add it to the priority queue.

If the cycle ends without finding the destination node, the graph has no path from start to finish. The key
to the efficiency of A* is its use of a heuristic function h(n) that provides an estimate of the remaining
cost of reaching the goal of any node. By combining the actual cost g (n) with the heuristic cost h (n), the
algorithm effectively explores promising paths, prioritizing nodes likely to lead to the shortest path. It is
important to note that the efficiency of the A* algorithm is highly dependent on the choice of the heuristic
function. Acceptable heuristics ensure that the algorithm always finds the shortest path, but more
informed and accurate heuristics can lead to faster convergence and reduced search space.

Local Search in AI

 Local search algorithms are search methods that start with a candidate solution and iteratively
improve it by making small local changes.

 Unlike other search algorithms, they:

o Use a single current state (not paths).

o Don’t keep track of explored nodes.

o Are useful for optimization problems (e.g., scheduling, traveling salesman).

Applications

 N-Queens problem (place queens on a chessboard without attack).


 Traveling Salesman Problem (TSP).

 Job scheduling.

 Neural network weight optimization.

Hill Climbing Algorithm

 Hill Climbing is a local search algorithm that continuously moves in the direction of increasing
value (uphill) to find the peak of a function.

 Similar to climbing a hill where you can only see the neighboring step.

Algorithm (Steps)

1. Start with an initial solution (state).

2. Evaluate neighbors of the current state.

3. If a neighbor has a better value, move to that neighbor.

4. Repeat until no better neighbor exists → local maximum found.

Types

1. Simple Hill Climbing – chooses the first better neighbor.

2. Steepest-Ascent Hill Climbing – chooses the best neighbor among all.

3. Stochastic Hill Climbing – chooses a random better neighbor.

Example 1: Hill Climbing on Function

Suppose we want to maximize


f(x)=−x2+10xf(x) = -x^2 + 10xf(x)=−x2+10x

 Start at x = 2 (f(2)=16).

 Neighbors: x=3 (f(3)=21), x=4 (f(4)=24), …

 Continue moving until x=5 → f(5)=25.

 Beyond that, f(6)=24 (smaller).

 Stop at x=5 (local maximum). ✅

Example 2: N-Queens Problem

 Place 4 queens on a chessboard such that no two attack each other.

 Start with a random arrangement.

 Count number of attacking pairs = heuristic value.

 Move a queen in its column to reduce conflicts.

 Repeat until no attacks remain → solution found.

Diagram (Conceptual)

Value (heuristic)
/\

/ \ Goal

/ \______

/ \

/ \

Start → climb → Peak (Local/Global Max)

Limitations of Hill Climbing

1. Local Maximum – May get stuck at a peak that is not global maximum.

2. Plateau – Flat area with no improvement, algorithm may stop.

3. Ridges – Difficult to climb if steep in one direction but shallow in others.

Ways to Overcome

 Random Restart Hill Climbing (try from different random states).

 Simulated Annealing (occasionally accept worse moves).

 Genetic Algorithms (population-based search).

In short:

 Local Search explores solutions without considering paths.

 Hill Climbing = greedy local search that keeps moving uphill until stuck at a maximum.

Constraint Satisfaction Problems (CSP) in Artificial Intelligence


Finding a solution that meets a set of constraints is the goal of constraint satisfaction problems (CSPs), a
type of AI issue. Finding values for a group of variables that fulfill a set of restrictions or rules is the aim
of constraint satisfaction problems. For tasks including resource allocation, planning, scheduling, and
decision-making, CSPs are frequently employed in AI.

There are mainly three basic components in the constraint satisfaction problem:

Variables: The things that need to be determined are variables. Variables in a CSP are the objects that
must have values assigned to them in order to satisfy a particular set of constraints. Boolean, integer, and
categorical variables are just a few examples of the various types of variables, for instance, could stand
in for the many puzzle cells that need to be filled with numbers in a sudoku puzzle.

Domains: The range of potential values that a variable can have is represented by domains. Depending
on the issue, a domain may be finite or limitless. For instance, in Sudoku, the set of numbers from 1 to 9
can serve as the domain of a variable representing a problem cell.

Constraints: The guidelines that control how variables relate to one another are known as constraints.
Constraints in a CSP define the ranges of possible values for variables. Unary constraints, binary
constraints, and higher-order constraints are only a few examples of the various sorts of constraints. For
instance, in a sudoku problem, the restrictions might be that each row, column, and 3×3 box can only
have one instance of each number from 1 to 9.

Constraint Satisfaction Problems (CSP) representation:

● The finite set of variables V1, V2, V3 ……………..Vn.


● Non-empty domain for every single variable D1, D2, D3 …………..Dn.
● The finite set of constraints C1, C2 …….…, Cm.
○ where each constraint Ci restricts the possible values for variables,
○ e.g., V1 ≠ V2
○ Each constraint Ci is a pair <scope, relation>
○ Example: <(V1, V2), V1 not equal to V2>
○ Scope = set of variables that participate in constraint.
○ Relation = list of valid variable value combinations.
○ There might be a clear list of permitted combinations.
Perhaps a relation that is abstract and that allows for
membership testing and listing.

Constraint Satisfaction Problems (CSP) algorithms:

● The backtracking algorithm is a depth-first search algorithm that methodically investigates


the search space of potential solutions up until a solution is discovered that satisfies all the
restrictions. The method begins by choosing a variable and giving it a value before repeatedly
attempting to give values to the other variables. The method returns to the prior variable and
tries a different value if at any time a variable cannot be given a value that fulfills the
requirements. Once all assignments have been tried or a solution that satisfies all constraints
has been discovered, the algorithm ends.
● The forward-checking algorithm is a variation of the backtracking algorithm that condenses
the search space using a type of local consistency. For each unassigned variable, the method
keeps a list of remaining values and applies local constraints to eliminate inconsistent values
from these sets. The algorithm examines a variable’s neighbors after it is given a value to see
whether any of its remaining values become inconsistent and removes them from the sets if
they do. The algorithm goes backward if, after forward checking, a variable has no more
values.
● Algorithms for propagating constraints are a class that uses local consistency and inference
to condense the search space. These algorithms operate by propagating restrictions between
variables and removing inconsistent values from the variable domains using the information
obtained.

Real-world Constraint Satisfaction Problems (CSP):


● Scheduling: A fundamental CSP problem is how to efficiently and effectively schedule
resources like personnel, equipment, and facilities. The constraints in this domain specify the
availability and capacity of each resource, whereas the variables indicate the time slots or
resources.
● Vehicle routing: Another example of a CSP problem is the issue of minimizing travel time
or distance by optimizing a fleet of vehicles’ routes. In this domain, the constraints specify
each vehicle’s capacity, delivery locations, and time windows, while the variables indicate the
routes taken by the vehicles.
● Assignment: Another typical CSP issue is how to optimally assign assignments or jobs to
humans or machines. In this field, the variables stand in for the tasks, while the constraints
specify the knowledge, capacity, and workload of each person or machine.
● Sudoku: The well-known puzzle game Sudoku can be modeled as a CSP problem, where the
variables stand in for the grid’s cells and the constraints specify the game’s rules, such as
prohibiting the repetition of the same number in a row, column, or area.
● Constraint-based image segmentation: The segmentation of an image into areas with
various qualities (such as color, texture, or shape) can be treated as a CSP issue in computer
vision, where the variables represent the regions and the constraints specify how similar or
unlike neighboring regions are to one another.

Constraint Satisfaction Problems (CSP) benefits:

● conventional representation patterns


● generic successor and goal functions
● Standard heuristics (no domain-specific expertise).

Constraint Propagation:

Constraint propagation is a fundamental technique in artificial intelligence (AI), particularly in solving


constraint satisfaction problems (CSPs). Here’s a breakdown of the concept:
What is Constraint Propagation?
Constraint propagation is the process of reducing the domains of variables in a CSP by iteratively
applying constraints. This helps in simplifying the problem and making the search for solutions more
efficient.
Key Concepts
1. Variables: Elements that need to be assigned values.
2. Domains: Possible values that can be assigned to the variables.
3. Constraints: Rules that define permissible combinations of values for the variables.
How It Works
1. Initialization: Start with the initial domains of all variables.
2. Propagation: Apply constraints to reduce the domains of variables.
3. Iteration: Repeat the propagation step until a stable state is reached, where no further reduction
is possible.
Example
Consider a simple CSP with two variables, X and Y, each with domains {1, 2, 3}, and a constraint (X
\neq Y). Constraint propagation will iteratively reduce the domains as follows:
 If X is assigned 1, then Y cannot be 1, so Y’s domain becomes {2, 3}.
 If Y is then assigned 2, X cannot be 2, so X’s domain is reduced to {1, 3}.
This process continues until a stable state is reached.
Applications
Constraint propagation is widely used in various AI applications, including:
 Scheduling: Assigning tasks to time slots without conflicts.
 Planning: Creating a sequence of actions to achieve a goal.
 Resource Allocation: Assigning resources to tasks while meeting all constraints.
Algorithms
Several algorithms are used for constraint propagation, each with its strengths and weaknesses. These
algorithms help in efficiently narrowing down the search space and finding solutions to CSPs

Backtracking Search:

Backtracking search is a fundamental algorithm used in artificial intelligence (AI) to solve constraint
satisfaction problems (CSPs) and other complex problems. Here’s a detailed explanation:

What is Backtracking Search?


Backtracking search is a depth-first search algorithm that incrementally builds candidates for solutions
and abandons a candidate (backtracks) as soon as it determines that the candidate cannot possibly be
completed to a valid solution1.
Key Concepts
1. Variables: Elements that need to be assigned values.
2. Domains: Possible values that can be assigned to the variables.
3. Constraints: Rules that define permissible combinations of values for the variables.

How It Works
1. Initialization: Start with an empty assignment.
2. Selection: Choose an unassigned variable.
3. Assignment: Assign a value to the chosen variable.
4. Consistency Check: Check if the current assignment is consistent with the constraints.
5. Recursion: If the assignment is consistent, recursively try to assign values to the remaining
variables.
6. Backtrack: If the assignment is not consistent, or if further assignments do not lead to a solution,
undo the last assignment (backtrack) and try the next possible value 12.
Example
Consider the N-Queens problem, where the goal is to place N queens on an N×N chessboard so that no
two queens threaten each other. The backtracking algorithm would:
 Place a queen in the first row.
 Move to the next row and place another queen in a position that doesn’t conflict with the first.
 Continue this process, backtracking whenever a conflict is found, until all queens are placed.
Applications
Backtracking search is widely used in various AI applications, including:
 Puzzle Solving: Sudoku, N-Queens, and other puzzles.
 Scheduling: Assigning tasks to time slots without conflicts.
 Resource Allocation: Assigning resources to tasks while meeting all constraints.
Advantages and Limitations
Advantages:
 Simple and easy to implement.
 Effective for problems with a small search space.
Limitations:
 Can be inefficient for large problems due to its exhaustive nature.
 May require optimization techniques like constraint propagation to improve performance 13.

Game Playing:

Game playing in artificial intelligence (AI) involves developing algorithms and computer programs that
can play games, often at a high level of proficiency. This field has been a significant area of research
and development in AI due to the structured nature of games and the clear objectives they provide.
Here’s an overview:

Key Concepts

1. Game Representation: Games are represented using states (positions in the game) and actions
(moves that transition from one state to another).

2. Search Algorithms: AI uses search algorithms to explore possible moves and outcomes. Common
algorithms include:

o Minimax: A decision rule for minimizing the possible loss for a worst-case scenario. It is
used in two-player games like chess and tic-tac-toe1.

o Alpha-Beta Pruning: An optimization of the minimax algorithm that reduces the number
of nodes evaluated in the search tree1.

Types of Game Playing AI

1. Rule-Based Systems: These systems use predefined rules to make decisions. They are effective
for simpler games with clear rules.

2. Machine Learning-Based Systems: These systems learn from experience and improve over
time. They are particularly effective for complex games like Go and modern video games 1.

Notable Examples

 Deep Blue: IBM’s chess-playing computer that defeated world champion Garry Kasparov in
19971.

 AlphaGo: Developed by DeepMind, it was the first AI to defeat a world champion in the game of
Go, a game known for its complexity1.

Applications

 Game Development: AI is used to create intelligent non-playable characters (NPCs) and enhance
player experience in video games2.

 Education and Training: AI-driven games are used for educational purposes and military training
simulations1.

 Research: Game playing provides a controlled environment to test and develop new AI algorithms
and techniques1.

Techniques

 Minimax Algorithm: Used for two-player games, it involves generating all possible moves and
choosing the one that maximizes the player’s minimum gain 1.

 Monte Carlo Tree Search (MCTS): A heuristic search algorithm used for decision-making
processes, particularly in games with large search spaces1.

Game playing in AI continues to evolve, with advancements in machine learning and computational
power driving new innovations.

Optimal Decision in Games:

Optimal decision-making in games involves choosing the best possible move or strategy to maximize a
player’s chances of winning, given the rules and constraints of the game. Here are some key concepts
and methods used in making optimal decisions in games:

Key Concepts

1. Game Tree: A graphical representation of all possible moves in a game, starting from the initial
state and branching out to all possible future states.

2. Utility Function: A function that assigns a numerical value to each possible outcome of the game,
representing the desirability of that outcome for a player.

3. Minimax Algorithm: A decision rule used for minimizing the possible loss for a worst-case
scenario. It is commonly used in two-player zero-sum games like chess and tic-tac-toe1.

Minimax Algorithm

The minimax algorithm is a recursive method used to determine the optimal move for a player, assuming
that the opponent is also playing optimally. Here’s how it works:

1. Generate the Game Tree: Create a tree of all possible moves from the current state to the terminal
states (end of the game).

2. Evaluate Terminal States: Use the utility function to assign values to the terminal states.

3. Backpropagate Values: Starting from the terminal states, propagate the values back up the tree.
For each node:

o If it’s the maximizing player’s turn (MAX), choose the move with the highest value.

o If it’s the minimizing player’s turn (MIN), choose the move with the lowest value.

4. Choose Optimal Move: The root node’s value will indicate the best move for the maximizing
player12.

Alpha-Beta Pruning

Alpha-beta pruning is an optimization technique for the minimax algorithm. It reduces the number of
nodes evaluated in the game tree by “pruning” branches that cannot possibly influence the final
decision. This makes the search process more efficient 1.

Example
Consider a simple game where two players, MAX and MIN, take turns. The game tree might look like
this:

MAX

/ \

MIN MIN

/ \ / \

3 5 2 9

 MAX will choose the branch that maximizes the minimum value that MIN can force (i.e., the left
branch with value 3).

 MIN will choose the branch that minimizes the maximum value that MAX can achieve (i.e., the
left branch with value 3).

Applications

Optimal decision-making is crucial in various AI applications, including:

 Board Games: Chess, Go, and checkers.

 Video Games: Creating intelligent non-playable characters (NPCs).

 Economic Models: Decision-making in competitive markets.

Understanding and implementing optimal decision-making algorithms like minimax and alpha-beta
pruning can significantly enhance the performance of AI in game-playing scenarios

Alpha Beta Pruning:

Alpha-beta pruning is an optimization technique for the minimax algorithm, primarily used in decision-
making processes for games and other adversarial scenarios. Here’s a detailed explanation:
What is Alpha-Beta Pruning?

Alpha-beta pruning reduces the number of nodes evaluated in the search tree by the minimax
algorithm. It achieves this by eliminating branches that cannot influence the final decision, thus
improving efficiency without affecting the accuracy of the outcome 12.

Key Concepts

1. Alpha: The best value that the maximizer (player trying to maximize the score) can guarantee at
that level or above. Initially set to (-\infty).

2. Beta: The best value that the minimizer (player trying to minimize the score) can guarantee at that
level or below. Initially set to (+\infty).

How It Works

1. Initialization: Start with the initial values of alpha and beta.

2. Traversal: Traverse the game tree using the minimax algorithm.

3. Pruning: At each node, update the values of alpha and beta. If at any point, beta becomes less than
or equal to alpha, prune (cut off) that branch as it cannot affect the final decision.

Example

Consider a simple game tree where the maximizer and minimizer take turns:

MAX

/ \

MIN MIN

/ \ / \

3 5 2 9
 Step 1: MAX starts with (\alpha = -\infty) and (\beta = +\infty).

 Step 2: MIN at the left branch evaluates its children (3 and 5). It updates (\beta) to 3 after
evaluating the first child.

 Step 3: Since 3 is less than 5, MIN does not need to evaluate the second child (5) further, and
prunes that branch.

 Step 4: MAX then evaluates the right branch, where MIN evaluates its children (2 and 9). It
updates (\beta) to 2 after evaluating the first child.

 Step 5: Since 2 is less than 9, MIN prunes the branch with 9.

Pseudocode

Here’s a simplified pseudocode for alpha-beta pruning:

Python

def minimax(node, depth, alpha, beta, maximizingPlayer):

if depth == 0 or node is a terminal node:

return evaluate(node)

if maximizingPlayer:

maxEval = -infinity

for child in node.children:

eval = minimax(child, depth - 1, alpha, beta, False)

maxEval = max(maxEval, eval)


alpha = max(alpha, eval)

if beta <= alpha:

break

return maxEval

else:

minEval = +infinity

for child in node.children:

eval = minimax(child, depth - 1, alpha, beta, True)

minEval = min(minEval, eval)

beta = min(beta, eval)

if beta <= alpha:

break

return minEval

AI-generated code. Review and use carefully. More info on FAQ.

Applications

Alpha-beta pruning is widely used in AI for:

 Board Games: Chess, Go, and checkers.

 Video Games: Enhancing the efficiency of AI opponents.


 Decision-Making: Any scenario involving adversarial decision-making

Stochastic Games:

Stochastic games, also known as Markov games, are a type of game theory model that incorporates
randomness into the decision-making process. These games involve multiple players making decisions
in a sequence of stages, where the outcome of each stage depends not only on the players’ actions but
also on random events.

Key Concepts

1. States: Different situations or configurations in the game.

2. Actions: Choices available to players at each state.

3. Transition Probabilities: Probabilities that determine how the game moves from one state to
another based on the players’ actions and random events.

4. Rewards: Payoffs received by players based on the state and actions taken.

Simple Example: Dice Game

Let’s consider a simple dice game involving two players, Player A and Player B. The game proceeds as
follows:

1. Initial State: Both players start with a score of 0.

2. Actions: Each player can choose to roll a die or pass.

3. Transition: If a player rolls the die, the outcome (1 to 6) is added to their score. If they pass, their
score remains the same.

4. Randomness: The outcome of the die roll is random, with each number (1 to 6) having an equal
probability of 1/6.

5. Objective: The first player to reach or exceed a score of 10 wins the game.
Game Play

 Player A’s Turn: Player A decides to roll the die. The outcome is 4, so Player A’s score becomes
4.

 Player B’s Turn: Player B also decides to roll the die. The outcome is 5, so Player B’s score
becomes 5.

 Player A’s Turn: Player A rolls again and gets a 3. Player A’s score is now 7.

 Player B’s Turn: Player B rolls and gets a 6. Player B’s score is now 11, and Player B wins the
game.

Analysis

In this game, the players’ decisions (to roll or pass) and the random outcomes of the die rolls determine
the progression and outcome of the game. The randomness introduces uncertainty, making it a stochastic
game.

Applications

Stochastic games are used in various fields, including:

 Economics: Modeling market dynamics and competition.

 Biology: Studying evolutionary strategies.

 Artificial Intelligence: Developing algorithms for decision-making under uncertainty

Important questions of Unit 2 (Short Answer, Medium Answer and Long Answer Type)

1. Differentiate between local search and global search [Medium Answer]


2. Explain the concept of Alpha-Beta pruning. Write alpha-beta search algorithm. [Medium Answer]

3. What is Heuristic Search? Explain with Example. Also write the Heuristic Function for: (i) Traveling
Salesman Problem (ii) Tic-tac-toe. (AKTU 2016 -17) [Long Answer]
4. Discuss the performance of A* algorithm when the heuristic function either under-estimate or
overestimate the value of State. (AKTU 2016 -17) [Long Answer]
5. Define Back Tracking Search (AKTU 2022-23) [Short Answer]
6. Define Constraint Satisfaction Problem (AKTU 2022-23) [Short Answer]

You might also like