0% found this document useful (0 votes)
15 views44 pages

Unit 4

The document covers various aspects of planning in artificial intelligence, including planning problems, languages, and techniques such as mean-ends analysis and non-linear planning. It also discusses the block world problem, the STRIPS mechanism for problem-solving, and contrasts planning with general problem-solving methods. Additionally, it touches on machine learning concepts, including different models and techniques like reinforcement learning, adaptive machine learning, and ensemble learning.

Uploaded by

vidyut1234569
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)
15 views44 pages

Unit 4

The document covers various aspects of planning in artificial intelligence, including planning problems, languages, and techniques such as mean-ends analysis and non-linear planning. It also discusses the block world problem, the STRIPS mechanism for problem-solving, and contrasts planning with general problem-solving methods. Additionally, it touches on machine learning concepts, including different models and techniques like reinforcement learning, adaptive machine learning, and ensemble learning.

Uploaded by

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

Planning

UNIT-4
18CSC502J
Artificial Intelligence Dr.Pritee Parwekar
Associate Professor
CSE Dept
Content

► Planning- Planning problems, Simple planning agent


► Planning languages
► Blocks world ,Goal stack planning
► Mean Ends Analysis
► Non-linear Planning
► Conditional planning, Reactive planning
Components of a Planning System

• In any general problem solving systems, elementary


techniques to perform following functions are required

– Choose the best rule (based on heuristics) to be applied


– Apply the chosen rule to get new problem state
– Detect when a solution has been found
– Detect dead ends so that new directions are explored.
Advanced Problem Solving Approaches

• In order to solve nontrivial problems, it is necessary to combine

– Basic problem solving strategies


– Knowledge representation mechanisms
– Partial solutions and at the end combine into complete problem solution
(decomposition)

• Planning refers to the process of computing several steps of a problem solving


before executing any of them.
Choose Rules to apply

• Most widelyusedtechnique for selecting

appropriate rules is to
– first isolatea set of differences betweenthe desired goal state and current state

– identify those rules that are relevant to reducing these difference

– if more rules are found then applyheuristic. information to choose out of them.
Apply Rules

• In simple problem solving system, applying rules was easy as each rule
specifies the problem state that would result from its application.

• In complex problem we deal with rules that specify only a small part of the
complete problem state.
Block World Problem

6
Example: Block World Problem
• Block world problem assumptions
– Square blocks of same size
– Blocks can be stacked one upon another.
– Flat surface (table) on which blocks can be placed.
– Robot arm that can manipulate the blocks. It can hold only one block at a time.

• In block world problem, the state is described by a set of predicates representing


the facts that were true in that state.

• One must describe for every action, each of the changes it makes to the state
description.
Actions (Operations) done by Robot
• UNSTACK (X, Y) : [US (X, Y)]

– Pick up X from its current position on block Y. The arm must be


empty and X has no block on top of it.

• STACK (X, Y): [S (X, Y)]


– Place block X on block Y. Arm must holding X and the top of Y is
clear.

• PICKUP (X): [PU (X) ]

– Pick up X from the table and hold it. Initially the arm must be empty
and top of X is clear.

• PUTDOWN (X): [PD (X)]

– Put block X down on the table. The arm must have been holding
Block World Problem
• Predicates used to describe the state
– ON(X, Y) - Block X on block Y.
-
– ONT(X) - Block X on the table.
-
– CL(X) - Top of X clear.
– HOLD(X)
Robot-Arm holding X.
– AE
Robot-arm empty.
• Logical statements true in this block world.
– Holding X means, arm is not empty
(∃ X) HOLD (X) → ~ AE
– X is on a table means that X is not on the top of any block
(∀ X) ONT (X) → ~ (∃ Y) ON (X, Y)
– Any block with no block on has clear top
(∀ X) (~ (∃ Y) ON (Y,X)) → CL (X)
STRIPS Mechanism
• One such mechanism was used in early robot problem solving system named STRIPS
(developed by Fikes, 1971).

• In this approach, each operation is described by three lists.


–Pre_Cond list contains predicates which haveto betrue before
► operation.
– ADD list contains those predicates which will be true after operation
– DELETE list contain those predicates which are no longer true after operation

• Predicates not included on either of these lists are assumed to be unaffected by the operation.
• Frame axioms(The formulas which specify which properties are not changed as a result of an
action are called frame axioms. )are specified implicitly in STRIPS which greatly reduces
amount of information stored.
Effect of Unstack operation

– Preconditions
– ON(X, Y) Block X on block Y.
– CL(X) Top of X clear.
– AE Robot-arm empty.
– Actions
– HOLD(X)
Robot-Arm holding X
– CL(Y)
Top of Y is clear.
– AE
Robot-arm empty.
STRIPS – Style Operators

• S (X, Y)

– Pre:
CL (Y) Λ HOLD (X)
– Del: CL (Y) Λ HOLD (X) AE Λ
– Add: ON (X, Y)

• US (X, Y)
– Pre: ON (X, Y) Λ CL (X) Λ AE ON (X,
– Del: Y) Λ AE
– Add:
HOLD (X) Λ CL (Y)
STRIPS – Style Operators

• PU (X)

– Pre:
ONT (X) Λ CL (X) Λ
– Del: AE
– Add: ONT (X) Λ AE
HOLD (X)

• PD (X)
HOLD (X)
– Pre:
– Del: HOLD (X) ONT (X) Λ AE
– Add:
Goal stack method - Example
• Logical representation of Initial and Goal states:
– Initial State: ON(B, A) Λ ONT(C) Λ ONT(A) Λ ONT(D) Λ CL(B) ΛCL(C) Λ
CL(D) Λ AE
– Goal State: ON(C, A) Λ ON(B, D) Λ ONT(A) Λ ONT(D) Λ CL(C) Λ CL(B) Λ
AE
Planning vs. Problem Solving

• Planning refers to determining a sequence of actions that are known to achieve a


particular objective when performed.

• Problem solving is finding a plan for a task in an abstract domain. A problem is


difficult if an appropriate sequence of steps to solve it is not known.

• Problem solving includes techniques such as forming efficient algorithms,


heuristics, and performing root cause analysis to find desirable solutions.

• Planning involves setting goals, breaking down tasks, prioritizing actions, and
monitoring progress.
Means-Ends Analysis in Artificial Intelligence

► In means-ends analysis, one solves a problem by considering


the obstacles that stand between the initial problem state and
the goal state. The elimination of these obstacles are then
defined as (simpler) subgoals to be achieved.
Means-Ends Analysis in Artificial Intelligence

► Means-Ends Analysis is problem-solving techniques used in Artificial


intelligence for limiting search in AI programs.
► It is a mixture of Backward and forward search technique.
► The MEA technique was first introduced in 1961 by Allen Newell, and
Herbert A. Simon in their problem-solving computer program, which was
named as General Problem Solver (GPS).
► The MEA analysis process centered on the evaluation of the difference
between the current state and goal state.
► The means-ends analysis process can be applied recursively for a problem. It
is a strategy to control search in problem-solving.
Example of Mean-Ends Analysis

► To solve the above problem, we will first find the differences between
initial states and goal states, and for each difference,
► we will generate a new state and will apply the operators. The operators
we have for this problem are:
► Move
► Delete
► Expand
Thank you
MACHINE LEARNING
Machine learning is a branch of AI which enables machines to learn from past
data or experiences without being explicitly programmed.

Machine learning enables a computer system to make predictions or take some


decisions using historical data without being explicitly programmed.
Machine Learning Process
A Machine Learning system learns from historical data, builds the prediction
models and whenever it receives new data, predicts the output for it..
Goal of machine Learning
The primary objective of machine learning research is to develop
general-purpose algorithms in practical value.

The main purpose of machine learning is to study and design the


algorithms that can be used to produce the predicates from the given
dataset.
Applications of Machine learning

1. Image Recognition
2. Speech Recognition
3. Traffic prediction
4. Product recommendations
5. Self-driving cars
6. Email Spam and Malware Filtering
7. Virtual Personal Assistant
8. Online Fraud Detection
9. Stock Market trading
10. Medical Diagnosis
Challenges for Machine Learning

1. Data Collection
2. Less Amount of Training Data
3. Non-representative Training Data
4. Poor Quality of Data
5. Irrelevant/Unwanted Features
Machine Learning Models
Artificial Neural Network (ANN)

ANN is information processing paradigm that is inspired by


biological nervous system.

Artificial neural networks are built like the human brain, with
neuron nodes interconnected like a web.

It is a computational network based on biological neural


networks that construct the structure of the human brain.
Artificial Neural Network (ANN) vs Biological Neuron

Dendrites from Biological Neural Network represent inputs in Artificial Neural


Networks, cell nucleus represents Nodes, synapse represents Weights, and Axon
represents Output.
Architecture of an artificial neural network

Artificial Neural Network primarily consists of three


layers:
Input Layer: It accepts inputs in several different formats
provided by the programmer.

Hidden Layer: The hidden layer presents in-between input


and output layers. It performs all the calculations to find
hidden features and patterns.

Output Layer: The input goes through a series of


transformations using the hidden layer, which finally results
in output that is conveyed using this layer.
Backpropagation
□ Backpropagation is a supervised learning algorithm, for training Multi-layer Perceptrons (Artificial
Neural Networks).

□ The Backpropagation algorithm looks for the minimum value of the error function in weight
space using a technique called the delta rule or gradient descent.

□ The weights that minimize the error function is then considered to be a solution to the learning
problem.
Support Vector Machine

Support vector machines (SVMs) are powerful supervised machine learning


algorithms which are used both for classification and regression. But
generally, they are used in classification problems.

Support Vectors are simply the co-ordinates of individual observation.

Working of SVM
□ AnSVM model is basically a representation of different classes in a
hyper-plane in multidimensional space.
□ The hyper-plane will be generated in an iterative manner by SVM so that the
error can be minimized.
□ The goal of SVM is to divide the datasetsinto classes to find a
maximum marginal hyper-plane (MMH).
Support Vector Machine
Support Vectors − Data points that are closest to the hyper-plane is called support
vectors.
The followings are important concepts in SVM −

□ Hyper-plane − It is a decision plane or space which is divided between a set of objects


having different classes.

□Margin − It is the gap between two lines on the closet data points of different classes.
Large margin is considered as a good margin and small margin is considered as a bad
margin.
Identify the right hyper-plane

Here, we have three hyper-planes (A, B and C) and all


are separating the classes well. Now, How can we
identify the right hyper-plane?

Here, maximizing the distances between nearest


data point (either class) and hyper-plane will help us
to decide the right hyper-plane. This distance is
called as Margin.

Above, we can see that the margin for hyper-plane C is high as compared to both A and B. Hence, we name the right
hyper-plane as C
□ In the above example hyper-plane B as it has higher margin
compared to A. Here, hyper-plane B has a classification error
and A has classified all correctly. Therefore, the right hyper-plane is
A.
Reinforcement learning

It is a feedback-based learning method. in which a learning agent gets a reward for


each right action and gets a penalty for each wrong action is about taking suitable
action to maximize reward in a particular situation.

It is employed by various software and machines to find the best possible behavior
or path it should take in a specific situation.
Input: The input should be an initial state from which the model will start.
Output: There are many possible output as there are variety of solution to a particular problem
Training: The training is based upon the input, The model will return a state and the user will
decide to reward or punish the model based on its output.
The model keeps continues to learn.
□ The best solution is decided based on the maximum reward.
Reinforcement learning Example

We have an agent and a reward, with many hurdles in between. The agent is supposed to find the
best possible path to reach the reward. The following problem explains the problem more
easily.
The image shows robot, diamond and fire. The goal of the robot is to get the reward that is the
diamond and avoid the trouble that is fire. The robot learns by trying all the possible paths and then
choosing the path which gives him the reward with the least hurdles. Each right step will give the
robot a reward and each wrong step will subtract the reward of the robot. The total reward will be
calculated when it reaches the final reward that is the diamond.
Applications of Reinforcement Learning

Robotics for industrial automation.


Machine learning and data processing
To create training systems that provide custom instruction and
materials according to the requirement of students.
Adaptive machine learning
Fourth generation of machine intelligence
Adaptive machine learning models are implemented in production with a
process that automatically samples and re-labels data that is sent to the model
for inference.

This data is used for regularly evaluating model performance online in real
time.

When metrics start to decay on the new data, tuning is triggered automatically.

This feature is continually running in the background to adapt Toloka models to


your data.
Multi Agent based learning
A multi-agent system consists of multiple decision-making agents which
interact in a shared environment to achieve common or conflicting goals.

Goal while design MAS :


To incentivize certain behaviors in agents
How to design algorithms enabling one or more agents to achieve specified
goals
How information is communicated and propagated among agents
How norms, conventions and roles may emerge in MAS.
Ensemble Learning

Ensemble is the art of combining diverse set of learners (individual models) together to improvise
on the stability and predictive power of the model.

It is a machine learning technique that enhances accuracy and resilience in forecasting by merging
predictions from multiple models.

It aims to mitigate errors or biases that may exist in individual models by leveraging the collective
intelligence of the ensemble.
Distributed Learning

► Distributed learning refers to the process of training machine learning models using multiple
computing resources that are interconnected.
► Distributed learning harnesses the collective computational power of a network of machines or
nodes.
► By dividing the workload and data across multiple nodes, distributed learning enables parallel
processing, leading to faster and more efficient training of machine learning models.
► In distributed learning process :
The data is divided into smaller subsets, which are processed independently on different machines
simultaneously.
Each machine performs computations on its assigned subset of data and communicates the results
with the other machines to collectively update and optimize the model’s parameters.
This collaborative process of training allows for parallelization, enabling faster convergence and
increased efficiency in model training.
Speedup Learning

► Speedup learning is a branch of machine learning that studies learning mechanisms for speeding
up problem solvers based on problem-solving experience.
► Input :
to a speedup learner typically consists of observations of prior problem-solving experience,
which may include traces of the problem solver’s operations and/or solutions to solve the problems.
► Output :
is knowledge that the problem solver can exploit to find solutions more quickly than before
learning without seriously effecting the solution quality.
► Distinctive feature of speedup learning:
learned knowledge is intended solely to facilitate faster solution times compared to the solver
without the knowledge.
Thank You

You might also like