ARTIFICIAL INTELLIGENCE
Dr. P V Siva Teja
Associate Professor
Textbooks:
Reference Books:
Syllabus
UNIT-1: Introduction
AI problems, foundation of AI and history of AI intelligent agents: Agents and Environments, the concept of rationality, the nature of environments, structure of agents, problem solving agents, problem formulation.
UNIT-2: Searching
Searching for solutions, uniformed search strategies Breadth first search, depth first Search. Search with partial information (Heuristic search) Hill climbing, A*, AO* Algorithms, Problem reduction, Game Playing-Adversial search, Games, mini-max algorithm, optimal decisions in multiplayer games, Problem in Game playing, Alpha-Beta pruning, Evaluation functions.
UNIT-3: Representation of Knowledge
Knowledge representation issues, predicate logic- logic programming, semantic nets- frames and inheritance, constraint propagation, representing knowledge using rules, rules based deduction systems. Reasoning under uncertainty, review of probability, Bayes' probabilistic interferences and Dempster Shafer theory.
Syllabus
UNIT-4: Logic concepts
First order logic. Inference in first order logic, propositional vs. first order inference, unification & lifts forward chaining, Backward chaining, Resolution, learning from observation Inductive learning, Decision trees, Explanation based learning, Statistical Learning methods, Reinforcement Learning
UNIT-5: Expert Systems
Architecture of expert systems, Roles of expert systems Knowledge Acquisition Meta knowledge Heuristics. Typical expert systems - MYCIN, DART, XCON: Expert systems shells.
Course Outcome’s
CO1 | Describe the foundations and characteristics of intelligent agents and explain the principles behind rational decision-making and environment types. |
CO2 | Apply uninformed and informed search strategies, including game-tree search techniques, and evaluate heuristic performance and pruning in adversarial game problems. |
CO3 | Apply AI knowledge representation techniques and explain probabilistic reasoning approaches such as Bayesian inference and Dempster-Shafer theory. |
CO4 | Apply first-order logic, inference mechanisms, and foundational machine learning techniques including decision trees, inductive learning, and reinforcement learning. |
CO5 | Apply the components, architecture, and functions of expert systems and discuss their applications through real-world examples like MYCIN and XCON. |
UNIT-1: Introduction
AI problems, foundation of AI and history of AI intelligent agents: Agents and Environments, the concept of rationality, the nature of environments, structure of agents, problem solving agents, problem formulation.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE
Artificial Intelligence is one of the booming technologies of computer science, which is ready to create a new revolution in the world by making intelligent machines.
AI 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 holds a tendency to cause a machine to work as a human.
What is Artificial Intelligence?
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 able to make decisions.”
Why Artificial Intelligence?
The definitions of AI are organized into 4 categories:
1. Thinking Humanly
Definition: This is AI modeled after the human brain. It uses science and psychology to understand how people reason and learn.
Goal: To build a computer "mind" that handles information, solves problems, and remembers things exactly like a person does.
Example: A program designed to solve a word puzzle by "thinking out loud" and making the same types of guesses or mistakes a human student might make.
2. Acting Humanly
Definition: This is AI that focuses on behavior. It doesn’t matter how the computer "thinks" internally, as long as it acts like a person on the outside.
Goal: To perform tasks - like speaking, moving, or reacting - so well that a human cannot tell the difference between the AI and another person.
Example: A digital assistant on your phone that can crack jokes, understand your tone of voice, and have a natural-sounding conversation with you.
3. Thinking Rationally
Definition: This is AI based on "The Laws of Thought." It relies on strict logic and math rather than human emotion or habits.
Goal: To create a system that can take any piece of information and use perfect logic to reach an undeniably correct conclusion.
Example: An "Expert System" used by doctors that follows a long list of "If/Then" rules to diagnose a specific illness based on a patient's symptoms.
4. Acting Rationally
Definition: This is AI that acts as a "Rational Agent." It looks at its surroundings and chooses the action that has the best chance of success.
Goal: To create an independent machine that can achieve a goal efficiently, even in confusing or changing situations.
Example: A self-driving car that perceives a red light, calculates the distance, and decides to apply the brakes at the perfect moment to stop safely.
Foundations of AI
1. Philosophy
Logic and reasoning
Nature of mind and intelligence
Turing Test
2. Mathematics
Formal logic (propositional and predicate)
Probability and statistics
Optimization and algorithms
3. Computer Science
Data structures and programming
Search and computational complexity
Languages like LISP, Prolog, Python
4. Psychology / Cognitive Science
Human problem-solving models
Cognitive architectures (e.g., SOAR, ACT-R)
5. Neuroscience
Brain structure and neural functioning
Basis for neural networks and deep learning
6. Linguistics
Syntax, semantics, and language modeling
Natural Language Processing (NLP)
7. Economics and Game Theory
Learning and memory processes
Decision-making and utility theory
Multi-agent interactions and strategies
8. Control Theory / Cybernetics
Feedback systems
Robotics and autonomous control
History of AI
1931 – 1955: Foundational Theory
1956 – 1979: The Birth of "AI" and Early Optimism
1980 – 2011: Expert Systems and Neural Revivals
2012 – 2022: The Deep Learning & Generative Era
2023 – 2026: The Age of Autonomous Agents
Applications of Artificial Intelligence:-
Agents in Artificial Intelligence
An AI system can be defined as the study of the rational agent and its environment. The agents sense the environment through sensors and act on their environment through actuators. An AI agent can have mental properties such as knowledge, belief, intention, etc.
What is an Agent?
An agent can be anything that perceive its environment through sensors and act upon that environment through actuators. An Agent runs in the cycle of perceiving, thinking, and acting. An agent can be:
Sensor: Sensor is a device which detects the change in the environment and sends the information to other electronic devices. An agent observes its environment through sensors.
Actuators: Actuators are the component of machines that converts energy into motion. The actuators are only responsible for moving and controlling a system. An actuator can be an electric motor, gears, rails, etc.
Effectors: Effectors are the devices which affect the environment. Effectors can be legs, wheels, arms, fingers, wings, fins, and display screen.
Intelligent Agents
An intelligent agent is an autonomous entity which act upon an environment using sensors and actuators for achieving goals. An intelligent agent may learn from the environment to achieve their goals. A thermostat is an example of an intelligent agent.
Following are the main four rules for an AI agent:
Agents and Environments
What is an Agent?
An agent is an entity that perceives its environment through sensors and acts upon that environment through actuators to achieve its goals.
What is an Environment?
The environment is everything external to the agent that the agent interacts with. It provides percepts (input) and receives actions (output).
THE CONCEPT OF RATIONALITY
A rational agent, often known as a rational being, is a person or entity to does the best actions possible given the circumstances and information at hand. A rational agent can be any decision-making entity, such as a person, corporation, machine, or software.
Rationality : What is rational at any given time depends on four things:
PEAS Representation
PEAS is a type of model on which an AI agent works upon. When we define an AI agent or rational agent, then we can group its properties under PEAS representation model. It is made up of four words:
Example: Self Driven Cars
Example of Agents with their PEAS representation
Agent | Performance Measure (P) | Environment (E) | Actuators (A) | Sensors (S) |
Self-Driving Car | Safety, legality, comfort, fuel efficiency, speed | Roads, traffic, pedestrians, weather, road signs | Steering, accelerator, brakes, horn, signals | Cameras, Lidar, Radar, GPS, ultrasonic sensors |
Vacuum Cleaner Robot | Cleanliness, area covered, energy efficiency | Rooms, dirt, furniture, walls, obstacles | Wheels, suction motor, cleaning brushes | Dirt sensors, bump sensors, cliff sensors, IR sensors |
Chess-Playing Agent | Win the game, minimize opponent’s score | Chessboard, rules, opponent's moves | Move generator, piece mover (virtual or robotic arm) | Board state sensors, opponent move input (camera or software) |
Online Shopping Agent | Best deal, accuracy, customer satisfaction, speed | Online stores, user needs, product listings | Web navigation, mouse/keyboard input, order placement | Web data scraper, user preference input, product ratings |
Smart Assistant (e.g., Siri) | Accuracy, response time, user satisfaction, task completion | Home/office, internet, user's speech | Voice output, app control, message sender | Microphones, speech recognition, location, internet data |
The Nature of Environment (or) Features of Environment
As per Russell and Norvig, an environment can have various features from the point of view of an agent:
1. Fully observable vs Partially Observable 2. Static vs Dynamic
3. Discrete vs Continuous 4. Deterministic vs Stochastic
5. Single-agent vs Multi-agent 6. Episodic vs sequential
7. Known vs Unknown 8. Accessible vs Inaccessible
When an agent’s sensors allow access to complete state of the environment at each point of time, then the task environment is fully observable, whereas, if the agent does not have complete and relevant information of the environment, then the task environment is partially observable.
Example: In the Checker Game, the agent observes the environment completely while in Poker Game, the agent partially observes the environment because it cannot see the cards of the other agent.
Note: Fully Observable task environments are convenient as there is no need to maintain the internal state to keep track of the world.
If the environment changes with time, such an environment is dynamic; otherwise, the environment is static.
Example: Crosswords Puzzles have a static environment while the Physical world has a dynamic environment.
3. Discrete vs. Continuous
If an agent has the finite number of actions and states, then the environment is discrete otherwise continuous.
Example: In Checkers game, there is a finite number of moves – Discrete A truck can have infinite moves while reaching its destination – Continuous.
4. Deterministic vs. Stochastic
If the agent’s current state and action completely determine the next state of the environment, then the environment is deterministic whereas if the next state cannot be determined from the current state and action, then the environment is Stochastic.
Example: Image analysis – Deterministic Taxi driving – Stochastic (cannot determine the traffic behavior)
5. Single-agent vs. Multiagent
When a single agent works to achieve a goal, it is known as Single-agent, whereas when two or more agents work together to achieve a goal, they are known as Multiagents.
Example: Playing a crossword puzzle – single agent Playing chess –multiagent (requires two agents)
6. Episodic vs. Sequential
If the agent’s episodes are divided into atomic episodes and the next episode does not depend on the previous state actions, then the environment is episodic, whereas, if current actions may affect the future decision, such environment is sequential.
Example: Part-picking robot – Episodic Chess playing – Sequential
7. Known vs. Unknown
In a known environment, the agents know the outcomes of its actions, but in an unknown environment, the agent needs to learn from the environment in order to make good decisions.
Example: A tennis player knows the rules and outcomes of its actions while a player needs to learn the rules of a new video game.
Note: A known environment is partially observable, but an unknown environment is fully observable.
8. Accessible vs Inaccessible
If an agent can obtain complete and accurate information about the state's environment, then such an environment is called an Accessible environment else it is called inaccessible.
Example: Imagine an empty room equipped with highly accurate temperature sensors. These sensors can provide real-time temperature measurements at any point within the room. An agent placed in this room can obtain complete and accurate information about the temperature at different locations. It can access this information at any time, allowing it to make decisions based on the precise temperature data. This environment is accessible because the agent can acquire complete and accurate information about the state of the room, specifically its temperature.
STRUCTURE OF AGENTS (OR) TYPES OF AI AGENTS
Agents can be grouped into five classes based on their degree of perceived intelligence and capability. All these agents can improve their performance and generate better action over the time. These are given below:
1.Simple Reflex Agent
1. Simple Reflex agent:
2. Model-based reflex agent
The following information has been extracted from the image provided:
a. How the world evolves.
b. How the agent's action affects the world.
3. Goal-based agents
4. Utility-based agents
5. Learning Agents
a. Learning element: It is responsible for making improvements by learning from environment.
b. Critic: Learning element takes feedback from critic which describes that how well the agent is doing with respect to a fixed performance standard.
c. Performance element: It is responsible for selecting external action.
d. Problem generator: This component is responsible for suggesting actions that will lead to new and informative experiences.
PROBLEM SOLVING AGENTS
A Problem-Solving Agent is a type of goal-based intelligent agent that decides what to do by finding sequences of actions that lead to the desired goal. It is widely used in AI for tasks like path finding, puzzle-solving, and decision-making.
(or)
Problem-solving agents are an essential part of artificial intelligence (AI), designed to tackle complex challenges and achieve specific goals in dynamic environments. These agents work by defining problems, formulating strategies, and executing solutions, making them indispensable in areas like robotics, decision-making, and autonomous systems.
Step | Description |
1. Goal Formulation | The agent determines the goal it wants to achieve. |
2. Problem Formulation | The agent defines the problem as a search task (states, actions, goal test). |
3. Search | The agent explores possible actions using a search algorithm. |
4. Execution | The agent performs the actions in the chosen solution path. |
Types of Problems in AI
In AI, problems are classified based on their characteristics and how they affect the problem-solving process. Understanding these types helps in designing effective problem-solving agents.
Classification Criteria
AI problems can be categorized into three main types:
Each type has unique implications for AI agent design and strategy.
1. Ignorable Problems
Definition: These are problems where certain solution steps can be skipped or ignored without affecting the overall outcome.
Characteristics:
Examples:
2. Recoverable Problems
Definition: Problems where agents can undo or correct their actions, allowing flexibility in the problem-solving process.
Characteristics:
Examples:
3. Irrecoverable Problems
Definition: Problems where actions are irreversible, making careful planning critical.�Characteristics:
Examples:
Steps in Problem Solving in Artificial Intelligence (AI)
Problem-solving in AI involves a systematic process where agents identify a challenge, develop strategies, and execute solutions to achieve a goal. Below are the key steps:
1. Problem Identification
2. Formulating the Problem
3. Strategy Formulation
4. Execution and Monitoring
5. Learning and Adaptation
Well-defined problems and solutions
Component | Description |
1. Initial State | The starting point of the problem. |
2. Action Set | A list of all actions the agent can take from any state. |
3. Transition Model | Describes the result of applying an action to a state (i.e., next state). |
4. Goal Test | A procedure to test if the current state is the goal state. |
5. Path Cost | A function that assigns a numeric cost to each path (used for optimization). |
PROBLEM FORMULATION
Problem formulation is the process by which an agent defines the task it needs to solve. This involves specifying the initial state, goal state, actions, constraints, and the criteria for evaluating solutions. Effective problem formulation is crucial for the success of the agent in finding optimal or satisfactory solutions.
Steps in Problem Formulation
Techniques for Problem Solving in AI
AI agents use a variety of techniques to solve problems efficiently. These techniques include search algorithms, constraint satisfaction methods, optimization techniques, and machine learning approaches. Each is suited to specific problem types.
1. Search Algorithms
a. Uninformed Search
These algorithms explore the problem space without prior knowledge about the goal’s location.
Examples:
b. Informed Search
These algorithms use heuristics to guide the search process, making them more efficient.
Examples:
2. Constraint Satisfaction Problems (CSP)
Definition: Problems where the solution must satisfy a set of constraints.
Techniques:
3. Optimization Techniques
a. Linear Programming
What It Is: Optimizing a linear objective function subject to linear constraints.
Example: Allocating resources to maximize profit in a factory.
b. Metaheuristics
What It Is: Approximation methods for solving complex problems.
Examples:
4. Machine Learning
a. Supervised Learning
What It Is: Learning from labeled data to make predictions.
Example: Predicting house prices based on historical data.
b. Reinforcement Learning
What It Is: Learning optimal behaviors through rewards and penalties.
Example: Training a robot to navigate a maze by rewarding correct moves.
5. Natural Language Processing (NLP)
a. Language Understanding
What It Is: Processing and interpreting human language.
Example: Voice assistants like Siri understanding spoken commands.
b. Applications
Examples: