Unit 5 AI Notes
Unit 5 AI Notes
Planning – planning problem – Simple planning agent – Blocks world problem – Mean Ends
analysis Learning - Machine learning - Learning concepts, methods and models Introduction to
expert system – architecture of expert systems.
Planning
Planning Problem:
3. Actions: A set of actions that can be taken to change the state of the world.
Types of Planning:
Planning Techniques:
1. Forward planning: Planning from the initial state to the goal state.
2. Backward planning: Planning from the goal state to the initial state.
1. States:
2. Actions:
- Actions can be described using preconditions (what needs to be true before the action can be
taken) and effects (what changes after the action is taken).
3. Goals:
4. Plan:
- A plan is a sequence of actions that transforms the initial state into a goal state.
Common Representations:
Components of planning
- Domain description: A description of the planning domain, including the objects, actions, and
constraints.
- Problem instance: A specific instance of the planning problem, including the initial state and
goal.
2. Planning Algorithm:
- Search algorithm: An algorithm that searches for a plan, such as forward or backward search.
- Heuristic function: A function that estimates the distance from a state to the goal.
3. Plan Representation:
- Plan structure: A representation of the plan, such as a sequence of actions or a partial order
plan.
- Plan execution: The process of executing the plan in the real world.
4. Knowledge Base:
- Domain knowledge: A knowledge base that contains information about the planning domain.
- Action models: Models of the actions that can be taken in the domain.
6. Plan Evaluation:
- Plan quality metrics: Metrics used to evaluate the quality of the plan, such as cost or duration.
- Plan validation: The process of validating the plan to ensure it is correct and feasible.
Applications:
A simple planning agent is a type of intelligent agent that uses planning to achieve its goals. Here's
a basic outline:
Characteristics:
2. Planning: The agent uses planning to generate a sequence of actions to achieve its goals.
Components:
Example:
A simple planning agent for a robot might have the goal of navigating to a specific location. The
planner would generate a sequence of actions (e.g., move forward, turn left) to achieve the goal.
Benefits:
Limitations:
The Blocks World problem involves a set of blocks with different colors and sizes, and a robotic
arm that can manipulate the blocks. The goal is to move the blocks from an initial configuration
to a goal configuration.
Key Features:
2. Robotic arm: The robotic arm can pick up and move blocks.
Example:
Goal State: ONTABLE (A), ON (B, A), ON(C, B), ON (D, C), CLEAR (D)
-3 C 3 D
-2 A 2 C
-1 D 1 B
0 B 0 A
Algorithm
Unstack (C, A)
Putdown (C)
Unstack (A, D)
Putdown (A) 0 B 0 D 0 A 0 C
Unstack (D, B)
Putdown (D) H= 0
Pickup (B)
Stack (B, A) 3 D
Pickup (C) 2 C
Stack (C, B) 1 B
Pickup (D) 0 A
Stack (D, C)
H= 6
SRMIST, RAMAPURAM Dr.M.Veeramanikandan, AP/Mechanical
Means-Ends Analysis
Key Concepts:
3. Detect differences: Identify the differences between the current state and the goal state.
4. Apply operators: Select and apply operators to reduce the differences between the current state
and the goal state.
Applications:
Benefits:
1. Efficient problem-solving: MEA can efficiently solve complex problems by focusing on the
differences between the current state and the goal state.
Example:
Let's look at an example where we know the starting state and the desired state. In this issue, we
must detect differences between the beginning state and the goal state and apply operators to obtain
the goal state.
Move
Delete
Expand
1. Evaluating the initial state: In the first step, we'll evaluate the initial state and compare it to
the Goal state to see what the differences evaluating the initial state: In the first step, we'll
evaluate the initial state and compare it to the Goal state to see what the differences are.
2. Applying the Delete operator: As you can see, the first difference is that there's no dot
symbol in the Goal state, whereas there is in the initial state, so we'll use the Delete operator to
remove it.
4. Applying the Expand Operator: In the third phase, a new state is created, and we will
compare it to the desired state. There is still one difference between the states, which is the size
of the square, so we will use the Expand operator to construct the desired state.
Machine learning
Machine learning is a subfield of artificial intelligence that involves training algorithms to learn
from data and make predictions or decisions.
Learning Concepts:
1. Supervised learning: The algorithm learns from labeled data to make predictions.
2. Unsupervised learning: The algorithm learns from unlabeled data to identify patterns.
3. Reinforcement learning: The algorithm learns through trial and error by interacting with an
environment.
3. Neural networks: A model inspired by the human brain that can learn complex patterns.
Models:
1. Parametric models: Models that assume a specific distribution of data (e.g., linear
regression).
2. Non-parametric models: Models that don't assume a specific distribution of data (e.g.,
decision trees).
3. Deep learning models: Models that use multiple layers of neural networks to learn complex
patterns.
Applications:
1. Image classification: Machine learning can be used to classify images into different
categories.
2. Natural language processing: Machine learning can be used to analyze and generate human
language.
Benefits:
1. Improved accuracy: Machine learning can improve the accuracy of predictions and
decisions.
2. Automation: Machine learning can automate tasks that would otherwise require human effort.
3. Scalability: Machine learning can handle large amounts of data and scale to meet the needs of
complex applications.
Expert systems are a crucial subset of artificial intelligence (AI) that simulate the decision-
making ability of a human expert. These systems use a knowledge base filled with domain-
specific information and rules to interpret and solve complex problems. For example, a medical
expert system can analyze a patient’s symptoms and suggest possible diagnoses or
treatments. Similarly, a financial expert system can evaluate market trends and
recommend investment strategies.
An expert system is made up of several interconnected components, each playing a crucial role
in its functionality. Let’s break them down:
The working mechanism of an expert system begins when a non-expert user submits
a query through the user interface.
This query is then processed by the inference engine, which applies logical
rules and reasoning techniques to analyze the input.
The inference engine interacts with the knowledge base, retrieving relevant facts, rules,
and heuristics contributed by expert users.
Based on this structured knowledge, the system derives conclusions and formulates an
appropriate response.
Finally, the expert system provides advice or recommendations to the user, assisting
in decision-making or problem-solving without requiring direct human expert intervention.
Depending on their structure and application, expert systems can be categorized into different
types.
One of the most common types is Rule-Based Expert Systems, which rely on if-then rules to
process information and make decisions. These rules are typically crafted by domain experts and
serve as the system’s reasoning mechanism. A well-known example is MYCIN, an early medical
diagnosis system that identified bacterial infections.
Another category is Frame-Based Expert Systems, which organize knowledge using frames,
similar to objects in programming. These frames store attributes and values related to specific
concepts, making them useful in natural language processing and other knowledge
representation tasks.
For situations involving uncertainty and imprecision, fuzzy logic Systems come into play.
These systems don’t operate on strict true/false values but instead allow for degrees of
truth. Fuzzy control systems, commonly used in household appliances like washing machines
and air conditioners, leverage this approach to optimize performance based on variable input
conditions.
Integrate artificial neural networks to learn patterns from data and improve decision-making.
These systems are widely used in applications like image recognition and speech processing,
where traditional rule-based approaches might struggle.
A more advanced hybrid approach is Neuro-Fuzzy Expert Systems, which merge the learning
capabilities of neural networks with the uncertainty-handling strengths of fuzzy logic. These
systems are particularly useful in financial forecasting and automated control systems, where
both structured learning and flexible reasoning are necessary.
There have been several significant real-world expert systems developed over the years. Some
of them are given below:
MYCIN uses backward chaining to diagnose bacterial infections, such as meningitis and
bacteremia. It identifies the bacteria causing the infection by asking the doctor a series of
questions about the patient’s symptoms and test results.
Significance: Although not used clinically, MYCIN greatly influenced the development of
medical expert systems.
2. DENDRAL : One of the earliest AI systems in chemistry, could analyze mass spectrometry
data to predict molecular structures.
3. R1/XCON: R1, also known as XCON, was developed in the late 1970s by Digital Equipment
Corporation (DEC) and is one of the most commercially successful expert systems.
R1/XCON was used to configure orders for new computer systems. It would select the
appropriate hardware and software components based on the customer’s requirements.
4. PXDES: PXDES is an expert system designed for the medical field, particularly in the
diagnosis of lung cancer.
PXDES could analyze patient data, including imaging results, to determine both the type and
the stage of lung cancer. It helps in deciding the best course of treatment based on the
patient’s specific condition.
CaDet can identify potential signs of cancer in its early stages by analyzing patient data and
symptoms. It works by comparing patient data with known patterns and indicators of cancer.
DXplain suggests possible diseases based on the symptoms and findings provided by a
doctor. It acts as a reference tool, offering a differential diagnosis list that doctors can use to
check their own diagnoses.
1. Medical Diagnosis: Expert systems assist doctors by analyzing symptoms and medical
history to suggest possible diagnoses or treatment options. For example, MYCIN, an early
expert system, helped identify bacterial infections and recommend antibiotics.
2. Financial Services: In finance, expert systems are used for credit scoring, fraud detection,
and investment advice. They analyze financial data and patterns to make informed decisions.
3. Technical Support: Expert systems can troubleshoot and provide solutions for technical
issues. They guide users through problem-solving steps based on pre-defined rules and
knowledge.
1. Consistency: Expert systems provide consistent and reliable recommendations, reducing the
variability that can occur with human decision-making.
2. Availability: They are available 24/7 and can handle multiple queries simultaneously,
providing timely assistance and support.
SRMIST, RAMAPURAM Dr.M.Veeramanikandan, AP/Mechanical
3. Cost-Effectiveness: By automating expert-level decision-making, organizations can save on
the costs associated with hiring and training human experts.
2. Lack of Flexibility: Expert systems are limited to the rules and knowledge they are
programmed with. They may struggle with novel or ambiguous situations that fall outside
their predefined rules.
3. Maintenance: Regular updates and maintenance are required to keep the knowledge base
current and relevant, which can be resource-intensive.