Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views62 pages

AI Unit 5 Notes

The document discusses various aspects of Artificial Intelligence, focusing on Natural Language Processing (NLP) and planning systems. It covers planning techniques like classical, hierarchical, and temporal planning, as well as the components of planning systems, including representation, search, and heuristics. Additionally, it details NLP techniques, phases, and their applications in analyzing human language, emphasizing the growing importance and benefits of NLP in various industries.

Uploaded by

Sundar
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)
8 views62 pages

AI Unit 5 Notes

The document discusses various aspects of Artificial Intelligence, focusing on Natural Language Processing (NLP) and planning systems. It covers planning techniques like classical, hierarchical, and temporal planning, as well as the components of planning systems, including representation, search, and heuristics. Additionally, it details NLP techniques, phases, and their applications in analyzing human language, emphasizing the growing importance and benefits of NLP in various industries.

Uploaded by

Sundar
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/ 62

GOVINDRAO WANJARI COLLEGE OF ENGINEERING & TECHNOLOGY

148,149 SALAI GODHANI, HUDKESWAR ROAD, NAGPUR

DEPARTMENT OF INFORMATION TECHNOLOGY

Sub Code: BTITC702 Subject: Artificial Intelligence Sem: VII Sem


………………………………………………………………………………………………………

Unit No. 5

Natural Language processing & Expert, Fuzzy logics Systems: Planning: Overview, Components of a
planning system, Goal stack planning, Hierarchical planning and other planning techniques.
Natural Language processing: Introduction, Syntactic processing, Semantic analysis, Discourse &
pragmatic processing. Learning: Forms of learning, Inductive learning, Learning decision trees,
explanation based learning, Learning using relevant information, Neural net learning & genetic learning.
Expert Systems: Representing and using domain knowledge, Expert system shells and knowledge
acquisition, Fuzzy sets & fuzzy logics.

Planning in AI
Introduction
Artificial intelligence (AI) has fundamentally changed several industries and has become a part of daily
life. Planning, which entails putting together a series of actions to accomplish a particular objective, is
one of the fundamental elements of AI. In this Artificial Intelligence tutorial, we will explore planning in
AI, involving applying algorithms and approaches to create the best plans possible, which can improve
the efficacy and efficiency of AI systems.

What is Planning in AI?


Planning in AI is the process of coming up with a series of actions or procedures to accomplish a
particular goal. It entails assessing the existing situation, identifying the intended outcome, and
developing a strategy that specifies the steps to take to get there. It is not confined to a particular
industry; it may also be used in robots, video games, logistics, as well as healthcare.
Different types of planning in AI

AI planning comes in different types, each suitable for a particular situation. Popular different types of
planning in ai include:

 Classical Planning: In this style of planning, a series of actions is created to accomplish a goal in
a predetermined setting. It assumes that everything is static and predictable.

 Hierarchical planning: By dividing large problems into smaller ones, hierarchical planning makes
planning more effective. A hierarchy of plans must be established, with higher-level plans
supervising the execution of lower-level plans.

 Temporal Planning: Planning for the future considers time restrictions and interdependencies
between actions. It ensures that the plan is workable within a certain time limit by taking into
account the duration of tasks.

Components of planning system in AI


A planning system in AI is made up of many crucial parts that cooperate to produce successful plans.
These components of planning system in ai consist of:

 Representation: The component that describes how the planning problem is represented is
called representation. The state space, actions, objectives, and limitations must all be defined.

 Search: To locate a series of steps that will get you where you want to go, the search
component searches the state space. To locate the best plans, a variety of search techniques,
including depth-first search & A* search, can be used.

 Heuristics: Heuristics are used to direct search efforts and gauge the expense or benefit of
certain actions. They aid in locating prospective routes and enhancing the effectiveness of the
planning process.
Goal Stack Planning

Introduction :
Planning is process of determining various actions that often lead to a solution.

Planning is useful for non-decomposable problems where subgoals often interact.

Goal Stack Planning (in short GSP) is the one of the simplest planning algorithm that
is designed to handle problems having compound goals. And it utilizes STRIP as a
formal language for specifying and manipulating the world with which it is working.

This approach uses a Stack for plan generation. The stack can contain Sub-goal and
actions described using predicates. The Sub-goals can be solved one by one in any
order.

Algorithm:
Push the Goal state in to the Stack

Push the individual Predicates of the Goal State into the Stack
Loop till the Stack is empty

Pop an element E from the stack

IF E is a Predicate

IF E is True then

Do Nothing

ELSE

Push the relevant action into the Stack

Push the individual predicates of the Precondition of the action into the Stack

Else IF E is an Action

Apply the action to the current State.

Add the action ‘a’ to the plan

Explanation:
The Goal Stack Planning Algorithms works will the stack. It starts by pushing the
unsatisfied goals into the stack. Then it pushes the individual subgoals into the stack
and its pops an element out of the stack. When popping an element out of the stack
the element could be either a predicate describing a situation about our world or it
could be an action that can be applied to our world under consideration. So based on
the kind of element we are popping out from the stack a decision has to be made. If it
is a Predicate. Then compares it with the description of the current world, if it is
satisfied or is already present in our current situation then there is nothing to do
because already its true.On the contrary if the Predicate is not true then we have to
select and push relevant action satisfying the predicate to the Stack.
A dvert is em en t

So after pushing the relevant action into the stack its precondition should also has to
be pushed into the stack. In order to apply an operation its precondition has to be
satisfied. In other words the present situation of the world should be suitable enough
to apply an operation. For that, the preconditions are pushed into the stack once after
an action is pushed.

Example :

The below example is from block world domain.

Lets start here with the example above, the initial state is our current description of
our world. The Goal state is what we have to achieve. The following list of actions
can be applied to the various situation in our problem.

First step is to push the goal into the stack.

Next push the individual predicates of the goal into the stack.
Now pop an element out from the stack

The popped element is indicated with a strike-through in the above diagram. The
element is ON(B,D) which is a predicate and it is not true in our current world. So the
next step is to push the relevant action which could achieve the subgoal ON(B,D) in to
the stack.

Now again push the precondition of the action Stack(B,D) into the stack.
The preconditions are highlighted with red and the actions are marked with Bold.
Now coming to the point we have to make the precondition to become true in order to
apply the action. Here we need to note an interesting thing about the preconditions
that, it can be pushed into the stack in any order but in certain situations we have to
make some exception and that is clearly seen in the above diagram. The
HOLDING(B) is pushed first and CLEAR(D) is pushed next indicating that the
HOLDING subgoal has to be done second comparing with the CLEAR. Because we
are considering the block world with single arm robot and everything that we usually
do here is depending on the robotic arm if we first achieve HOLDING(D) then we
have to undo the subgoal in order the achieve some other subgoal. So if our compound
goal has HOLDING (x) subgoal, achieve it at the end.
A dvert is em en t

Lets go back to our example here,

POP an element out from the stack.


After popping we see that CLEAR(D) is true in the current world model so we don’t
have to do anything.

So again pop the stack,


The popped element is HOLDING(B) which is a predicate and note that it is not true
in our current world. So we have to push the relevant action into the stack. Inorder to
make the HOLDING(D) to be true there are possibly two action that can
achieve it.One is PICKUP(D) and the other is UNSTACK(D,y). But now in-order to
choose the best among the two actions available we have to think ahead and utilize the
heuristics possibly. For instance if we choose PICKUP(B) then first of all BLOCK D
should be available on the table. For that we have to UNSTACK(B,D) and it will
achieve HOLDING(B) which is what we want but if we use PICKUP then we need to
PUTDOWN(B) making HOLDING(B) false and then use PICKUP(B) action to
achieve HOLDING(B) again which can be easily achieved by using UNSTACK. So
the best action is UNSTACK(B,y) and it also makes the current situation more close
to the goal state. The variable y indicates any block below D.

Lets push the action UNSTACK(B,C) into the stack.


Now push the individual precondition of UNSTACK(B,C) into the stack.

POP the stack. Note here that on popping we could see that ON(B,C) ,CLEAR(B)
AND ARMEMPTY are true in our current world. So dont do anything.
A dvert is em en t
Now again pop the stack .

When we do that we will get an action, so just apply the action to the current world
and add that action to plan list.

Plan= { UNSTACK(B,C) }
Again pop an element. Now its STACK(B,D) which is an action so apply that to the
current state and add it to the PLAN.

PLAN= { UNSTACK(B,C), STACK(B,D) }


Now the stack will look like the one given below and our current world is like the one
above.

Again pop the stack. The popped element is a predicate and it is not true in our current
world so push the relevant action into the stack.
STACK(C,A) is pushed now into the stack and now push the individual preconditions
of the action into the stack.

Now pop the stack. We will get CLEAR(A) and it is true in our current world so do
nothing.

Next element that is popped is HOLDING(C) which is not true so push the relevant
action into the stack.
In order to achieve HOLDING(C) we have to push the action PICKUP(C) and its
individual preconditions into the stack.

Now doing pop we will get ONTABLE(C) which is true in our


current world.Next CLEAR(C) is popped and that also is achieved.Then PICKUP(C)
is popped which is an action so apply it to the current world and add it to the PLAN.
The world model and stack will look like below,
A dvert is em en t
PLAN= { UNSTACK(B,C), STACK(B,D) ,PICKUP(C) }

Again POP the stack, we will get STACK(C,A) which is an action apply it to the
world and insert it to the PLAN.
PLAN= { UNSTACK(B,D), STACK(B,D) ,PICKUP(C) ,STACK(C,A) }

Now pop the stack we will get CLEAR(C) which is already achieved in our current
situation. So we don’t need to do anything. At last when we pop the element we will
get all the three subgoal which is true and our PLAN will contain all the necessary
actions to achieve the goal.

PLAN= { UNSTACK(B,D), STACK(B,D) ,PICKUP(C) ,STACK(C,A) }


Natural language processing

Natural language processing (NLP) is a subset of artificial intelligence, computer


science, and linguistics focused on making human communication, such as speech and
text, comprehensible to computers.

NLP is used in a wide variety of everyday products and services. Some of the most
common technologies that use NLP are voice-activated digital assistants on
smartphones, email-scanning programs used to identify spam, and translation apps
that decipher foreign languages.

What are NLP techniques?

NLP encompasses a wide range of techniques to analyze human language. Some of


the most common techniques you will likely encounter in the field include:

 Sentiment analysis: An NLP technique that analyzes text to identify its


sentiments, such as “positive,” “negative,” or “neutral.” Sentiment analysis is
commonly used by businesses to better understand customer feedback.

 Summarization: An NLP technique that summarizes a longer text in order to


make it more manageable for time-sensitive readers. Some common texts this
technology can summarize include reports and articles.

 Keyword extraction: An NLP technique that analyzes a text to identify the


most important keywords or phrases. Keyword extraction is commonly used
for search engine optimization (SEO), social media monitoring, and business
intelligence purposes.
 Tokenization: The process of breaking characters, words, or subwords down
into “tokens” that the program can analyze. Tokenization undergirds common
NLP tasks like word modeling, vocabulary building, and frequent word
occurrence.

NLP benefits

Whether it’s being used to quickly translate a text from one language to another or
producing business insights by running sentiment analysis on hundreds of reviews,
NLP provides both businesses and consumers with a variety of benefits.

Unsurprisingly, then, you can expect to see more of it in the coming years. According
to research by Fortune Business Insights, they project the global market for NLP to
grow from $29.71 billion in 2024 to $158.04 billion in 2032 [1].

Some common benefits of NLP include:

 The ability to analyze both structured and unstructured data, such as speech,
text messages, and social media posts.

 Improving customer satisfaction and experience by identifying insights using


sentiment analysis.

 Reducing costs by employing NLP-enabled AI to perform specific tasks, such


as chatting with customers via chatbots or analyzing large amounts of text
data.

 Better understanding a target market or brand by conducting NLP analysis on


relevant data like social media posts, focus group surveys, and reviews.
Phases of Natural Language Processing (NLP)

Natural Language Processing (NLP) is a field within artificial intelligence that allows
computers to comprehend, analyze, and interact with human language effectively. The
process of NLP can be divided into five distinct phases: Lexical Analysis, Syntactic
Analysis, Semantic Analysis, Discourse Integration, and Pragmatic Analysis. Each
phase plays a crucial role in the overall understanding and processing of natural
language.

Phase of Natural Language Processing

First Phase of NLP: Lexical and Morphological Analysis

Tokenization

The lexical phase in Natural Language Processing (NLP) involves scanning text and
breaking it down into smaller units such as paragraphs, sentences, and words. This
process, known as tokenization, converts raw text into manageable units called tokens
or lexemes. Tokenization is essential for understanding and processing text at the
word level.

In addition to tokenization, various data cleaning and feature extraction techniques are
applied, including:

 Lemmatization: Reducing words to their base or root form.

 Stopwords Removal: Eliminating common words that do not carry significant


meaning, such as "and," "the," and "is."

 Correcting Misspelled Words: Ensuring the text is free of spelling errors to


maintain accuracy.

These steps enhance the comprehensibility of the text, making it easier to analyze and
process.

Morphological Analysis

Morphological analysis is another critical phase in NLP, focusing on identifying


morphemes, the smallest units of a word that carry meaning and cannot be further
divided. Understanding morphemes is vital for grasping the structure of words and
their relationships.

Types of Morphemes

1. Free Morphemes: Text elements that carry meaning independently and make
sense on their own. For example, "bat" is a free morpheme.
2. Bound Morphemes: Elements that must be attached to free morphemes to
convey meaning, as they cannot stand alone. For instance, the suffix "-ing" is a
bound morpheme, needing to be attached to a free morpheme like "run" to form
"running."

Importance of Morphological Analysis

Morphological analysis is crucial in NLP for several reasons:

 Understanding Word Structure: It helps in deciphering the composition of


complex words.

 Predicting Word Forms: It aids in anticipating different forms of a word


based on its morphemes.

 Improving Accuracy: It enhances the accuracy of tasks such as part-of-speech


tagging, syntactic parsing, and machine translation.

By identifying and analyzing morphemes, the system can interpret text correctly at the
most fundamental level, laying the groundwork for more advanced NLP applications.

Second Phase of NLP: Syntactic Analysis (Parsing)

Syntactic analysis, also known as parsing, is the second phase of Natural Language
Processing (NLP). This phase is essential for understanding the structure of a sentence
and assessing its grammatical correctness. It involves analyzing the relationships
between words and ensuring their logical consistency by comparing their arrangement
against standard grammatical rules.

Role of Parsing
Parsing examines the grammatical structure and relationships within a given text. It
assigns Parts-Of-Speech (POS) tags to each word, categorizing them as nouns, verbs,
adverbs, etc. This tagging is crucial for understanding how words relate to each other
syntactically and helps in avoiding ambiguity. Ambiguity arises when a text can be
interpreted in multiple ways due to words having various meanings. For example, the
word "book" can be a noun (a physical book) or a verb (the action of booking
something), depending on the sentence context.

Examples of Syntax

Consider the following sentences:

 Correct Syntax: "John eats an apple."

 Incorrect Syntax: "Apple eats John an."

Despite using the same words, only the first sentence is grammatically correct and
makes sense. The correct arrangement of words according to grammatical rules is
what makes the sentence meaningful.

Assigning POS Tags

During parsing, each word in the sentence is assigned a POS tag to indicate its
grammatical category. Here’s an example breakdown:

 Sentence: "John eats an apple."

 POS Tags:

o John: Proper Noun (NNP)


o eats: Verb (VBZ)

o an: Determiner (DT)

o apple: Noun (NN)

Assigning POS tags correctly is crucial for understanding the sentence structure and
ensuring accurate interpretation of the text.

Importance of Syntactic Analysis

By analyzing and ensuring proper syntax, NLP systems can better understand and
generate human language. This analysis helps in various applications, such as
machine translation, sentiment analysis, and information retrieval, by providing a
clear structure and reducing ambiguity.

Third Phase of NLP: Semantic Analysis

Semantic Analysis is the third phase of Natural Language Processing (NLP), focusing
on extracting the meaning from text. Unlike syntactic analysis, which deals with
grammatical structure, semantic analysis is concerned with the literal and contextual
meaning of words, phrases, and sentences.

Semantic analysis aims to understand the dictionary definitions of words and their
usage in context. It determines whether the arrangement of words in a sentence makes
logical sense. This phase helps in finding context and logic by ensuring the semantic
coherence of sentences.

Key Tasks in Semantic Analysis


1. Named Entity Recognition (NER): NER identifies and classifies entities
within the text, such as names of people, places, and organizations. These
entities belong to predefined categories and are crucial for understanding the
text's content.

2. Word Sense Disambiguation (WSD): WSD determines the correct meaning


of ambiguous words based on context. For example, the word "bank" can refer
to a financial institution or the side of a river. WSD uses contextual clues to
assign the appropriate meaning.

Examples of Semantic Analysis

Consider the following examples:

 Syntactically Correct but Semantically Incorrect: "Apple eats a John."

o This sentence is grammatically correct but does not make sense


semantically. An apple cannot eat a person, highlighting the importance
of semantic analysis in ensuring logical coherence.

 Literal Interpretation: "What time is it?"

o This phrase is interpreted literally as someone asking for the current


time, demonstrating how semantic analysis helps in understanding the
intended meaning.

Importance of Semantic Analysis

Semantic analysis is essential for various NLP applications, including machine


translation, information retrieval, and question answering. By ensuring that sentences
are not only grammatically correct but also meaningful, semantic analysis enhances
the accuracy and relevance of NLP systems.

Fourth Phase of NLP: Discourse Integration

Discourse Integration is the fourth phase of Natural Language Processing (NLP). This
phase deals with comprehending the relationship between the current sentence and
earlier sentences or the larger context. Discourse integration is crucial for
contextualizing text and understanding the overall message conveyed.

Role of Discourse Integration

Discourse integration examines how words, phrases, and sentences relate to each
other within a larger context. It assesses the impact a word or sentence has on the
structure of a text and how the combination of sentences affects the overall meaning.
This phase helps in understanding implicit references and the flow of information
across sentences.

Importance of Contextualization

In conversations and texts, words and sentences often depend on preceding or


following sentences for their meaning. Understanding the context behind these words
and sentences is essential to accurately interpret their meaning.

Example of Discourse Integration

Consider the following examples:

 Contextual Reference: "This is unfair!"


o To understand what "this" refers to, we need to examine the preceding or
following sentences. Without context, the statement's meaning remains
unclear.

 Anaphora Resolution: "Taylor went to the store to buy some groceries. She
realized she forgot her wallet."

o In this example, the pronoun "she" refers back to "Taylor" in the first
sentence. Understanding that "Taylor" is the antecedent of "she" is
crucial for grasping the sentence's meaning.

Application of Discourse Integration

Discourse integration is vital for various NLP applications, such as machine


translation, sentiment analysis, and conversational agents. By understanding the
relationships and context within texts, NLP systems can provide more accurate and
coherent responses.

Fifth Phase of NLP: Pragmatic Analysis

Pragmatic Analysis is the fifth and final phase of Natural Language Processing (NLP),
focusing on interpreting the inferred meaning of a text beyond its literal content.
Human language is often complex and layered with underlying assumptions,
implications, and intentions that go beyond straightforward interpretation. This phase
aims to grasp these deeper meanings in communication.

Role of Pragmatic Analysis

Pragmatic analysis goes beyond the literal meanings examined in semantic analysis,
aiming to understand what the writer or speaker truly intends to convey. In natural
language, words and phrases can carry different meanings depending on context, tone,
and the situation in which they are used.

Importance of Understanding Intentions

In human communication, people often do not say exactly what they mean. For
instance, the word "Hello" can have various interpretations depending on the tone and
context in which it is spoken. It could be a simple greeting, an expression of surprise,
or even a signal of anger. Thus, understanding the intended meaning behind words
and sentences is crucial.

Examples of Pragmatic Analysis

Consider the following examples:

 Contextual Greeting: "Hello! What time is it?"

o "Hello!" is more than just a greeting; it serves to establish contact.

o "What time is it?" might be a straightforward request for the current


time, but it could also imply concern about being late.

 Figurative Expression: "I'm falling for you."

o The word "falling" literally means collapsing, but in this context, it


means the speaker is expressing love for someone.

Application of Pragmatic Analysis

Pragmatic analysis is essential for applications like sentiment analysis, conversational


AI, and advanced dialogue systems. By interpreting the deeper, inferred meanings of
texts, NLP systems can understand human emotions, intentions, and subtleties in
communication, leading to more accurate and human-like interactions.

Introduction

Inductive learning is a type of machine learning that aims to identify patterns in data
and generalize them to new situations. The inductive learning algorithm
(ILA) creates a model based on a set of training examples that are then used to predict
new examples. Inductive learning is often used in supervised learning, where the data
is labeled, meaning the correct answer is provided for each example. Based on these
labeled examples, the model is then trained to map inputs to outputs.

The Fundamental Concept of Inductive Learning

Inductive learning algorithms are used in a variety of applications, including credit


risk assessment, disease diagnosis, face recognition, and autonomous driving.

Credit Risk Assessment

One of the most significant inductive learning applications in AI is credit risk


assessment. The goal of credit risk assessment is to predict the probability that a
borrower will be incapable of repaying a loan (or other kind of credit). By looking at a
borrower's financial records and other important factors, lenders can use credit risk
assessment to make knowledgeable choices about whether to offer credit and on what
conditions.

Inductive learning algorithms can be used to analyze a wide range of financial data to
predict credit risk. Large databases of past borrower data can be used to train these
algorithms so they can discover trends and pinpoint the variables that most accurately
predict credit risk.

The potential for lenders to consider various criteria when making decisions
regarding credit is one of the main advantages of inductive learning for credit risk
assessment. Conventional credit risk assessment methods frequently rely on a small
collection of unreliable or biased variables, like income and credit score. On the
other hand, inductive learning algorithms can examine a considerably wider range of
elements, including social media activity, debt-to-income ratios, and employment
histories, to produce more precise and sophisticated credit risk evaluations.
Inductive learning algorithms for credit risk assessment may also be more flexible
and adaptable in addition to being more accurate. They can be updated with
fresh information as it becomes available, enabling lenders to continuously improve
their evaluations of credit risk based on the most recent data. This is especially
critical given the current economy's rapid economic change and emerging new
financial products and services.

Disease Diagnosis

Disease diagnosis is another important application of inductive learning in AI. With


the help of inductive learning algorithms, doctors and other medical professionals can
use data to make more accurate and timely diagnoses of various diseases.

One of the key benefits of inductive learning in disease diagnosis is the ability to
analyze large datasets of medical information, including patient histories, lab
results, and imaging data. Inductive learning algorithms can find patterns and trends
by examining these big datasets that could be challenging for medical professionals to
spot on their own.

For example, huge collections of medical pictures, such as X-rays or MRIs, can be
analyzed using inductive learning algorithms to assist in the diagnosis of illnesses
like cancer and heart disease. Inductive learning algorithms can learn to recognize
patterns and anomalies that may be challenging for human doctors to spot. In the long
run, patients would gain since earlier and more accurate diagnoses might arise from
this.
We can use
inductive learning to examine patient data, including medical histories, symptoms,
and lab findings to diagnose various diseases. Inductive learning algorithms can learn
to recognize patterns and trends that are suggestive of particular diseases or disorders
by examining vast datasets of patient data. This can aid medical professionals in
developing more precise diagnoses and efficient treatment methods.

Face Recognition

Face recognition is a widely used application of inductive learning in AI. Face


recognition seeks to recognize people based on their facial features, which can be
helpful for various applications, from social media and marketing to security and
surveillance.

We can train inductive learning algorithms on large facial picture data datasets to
discover patterns and pinpoint distinctive traits for every person. Inductive learning
algorithms can properly identify people with a high degree of accuracy by analyzing
face traits such as the distance between the eyes, the curve of the nose, and the
curvature of the lips.
One of the key benefits of inductive learning for face recognition is that it can adapt
to new data and changing conditions. For example, in a security or surveillance
context, inductive learning algorithms can learn to recognize individuals
under various lighting and environmental conditions, including different angles,
lighting, and facial expressions. This makes them more reliable and effective than
traditional face recognition systems, which may struggle to accurately identify
individuals under changing conditions.

We can also use inductive learning algorithms to improve the accuracy of facial
recognition systems over time. By continually training on new data and incorporating
new features into the recognition process, inductive learning algorithms can improve
their accuracy and reduce the likelihood of false positives and false negatives.

Automatic Steering (Autonomous Driving)

Automatic steering, or autonomous driving, is another important application of


inductive learning in AI. Autonomous driving aims to develop self-driving
vehicles that can operate safely and efficiently on public roads and highways without
human intervention.
We can use inductive learning algorithms in various ways to support autonomous
driving. For example, we can use them to analyze large datasets of sensor data, such
as Lidar (Light Detection and Ranging), Radar, and camera data, to identify and
track objects on the road, including other vehicles, pedestrians, and obstacles. By
learning to recognize and respond to these objects, inductive learning algorithms can
help self-driving vehicles operate safely and avoid accidents.

Another important application of inductive learning in autonomous driving is route


planning and optimization. By analyzing traffic patterns, road conditions, and
other factors, inductive learning algorithms can help self-driving vehicles plan the
most efficient and safe route to their destination while avoiding congestion,
accidents, and other hazards.

Inductive learning algorithms can also be used to improve the performance and
reliability of self-driving vehicles over time. By continually analyzing data on
driving behavior and road conditions, inductive learning algorithms can identify
patterns and trends that can be used to improve the performance and safety of self-
driving vehicles.

Explanation-based Learning in Artificial Intelligence

Overview
Explanation-based learning in artificial intelligence is a branch of machine learning
that focuses on creating algorithms that learn from previously solved problems. It is a
problem-solving method that is especially helpful when dealing with complicated,
multi-faceted issues that necessitate a thorough grasp of the underlying processes.

Introduction

Since its beginning, machine learning has come a long way. While early machine-
learning algorithms depended on statistical analysis to spot patterns and forecast
outcomes, contemporary machine-learning models are intended to learn from subject
experts' explanations. Explanation-based learning in artificial intelligence has proven
to be a potent tool in its development that can handle complicated issues more
efficiently.

What is Explanation-Based Learning?

Explanation-based learning in artificial intelligence is a problem-solving method that


involves agent learning by analyzing specific situations and connecting them to
previously acquired information. Also, the agent applies what he has learned to solve
similar issues. Rather than relying solely on statistical analysis, EBL algorithms
incorporate logical reasoning and domain knowledge to make predictions and identify
patterns.

Explanation-based learning architecture:


The environment provides two inputs to the EBL architecture:

1. A specific goal, and


2. A partial solution.

The problem solver analyses these sources and provides reasoning to the generalizer.

The generalizer uses general ideas from the knowledge base as input and compares
them to the problem solver's reasoning to come up with an answer to the given
problem.

Explanation-based learning System Representation:


 Problem Solver: It takes 3 kinds of external inputs: The goal idea is a complex
problem statement that the agent must learn. Training instances are facts that
illustrate a specific instance of a target idea. Inference rules reflect facts and
procedures that demonstrate what the learner already understands.
 Generalizer: The problem solver's output is fed into the generalizer, which
compares the problem solver's explanation to the knowledge base and outputs
to the operational pruner.
 Operational pruner: It takes two inputs, one from generalized and the other
from operationally standard. The operational standard describes the final
concept and defines the format in which the learned concept should be
conveyed.

a) The Explanation-Based Learning Hypothesis

According to the Explanation based learning hypothesis, if a system has an


explanation for how to tackle a comparable problem it faced previously, it will utilize
that explanation to handle the current problem more efficiently. This hypothesis is
founded on the concept that learning via explanations is more successful than learning
through instances alone.

b) Standard Approach to Explanation-Based Learning

The typical approach to explanation-based learning in artificial intelligence entails the


following steps:

1. Determine the problem to be solved


2. Gather samples of previously solved problems that are comparable to the
current problem.
3. Identify the connections between the previously solved problems and the new
problem.
4. Extraction of the underlying principles and rules used to solve previously
solved problems.
5. Apply the extracted rules and principles to solve the new problem.

c) Examples of Explanation-Based Learning

 Medical Diagnosis: Explanation-based learning can be used in medical


diagnosis to determine the underlying causes of a patient's symptoms.
Explanation-based learning algorithms can find trends and produce more
accurate diagnoses by analyzing previously diagnosed instances.
 Robot Navigation: Explanation-based learning may be used to educate robots
on how to navigate through complicated settings. Explanation-based learning
algorithms can discover the rules and principles that were utilized to navigate
those settings and apply them to new scenarios by analyzing prior successful
navigation efforts.
 Fraud Detection: Explanation-based learning may be utilized in fraud
detection to discover patterns of fraudulent conduct. Explanation-based
learning algorithms can find the rules and principles that were utilized to detect
prior cases of fraud and apply them to new cases by analyzing previous
incidents of fraud.

Genetic Algorithm

Genetic algorithm (GAs) are a class of search algorithms designed on the natural
evolution process. Genetic Algorithms are based on the principles of survival of the
fittest.

A Genetic Algorithm method inspired in the world of Biology, particularly, the


Evolution Theory by Charles Darwin, is taken as the basis of its working. John
Holland introduced the Genetic Algorithm in 1975. Genetic Algorithms are utilized to
tackle optimization problems by copying the evolutionary behavior of species. From
an initial random population of solutions, this population is advanced through
selection, mutation, and crossover operators, inspired in natural evolution. By
implementing the given set of operations, the population goes through an iterative
procedure in which it reaches various states, and each one is called generation. As a
result of this procedure, the population is expected to reach a generation in which it
contains a decent solution to the problem. In the Genetic Algorithm, the solution of
the problem is coded as a string of bits or real numbers.

They have been shown in practice to be very efficient at functional optimization. It is


used in searching for huge and sophisticated spaces. Genetic algorithms (GAs) are
algorithms that are used for optimization and machine learning based on various
features of biological evolution.

They need the given components:

o A process of coding solutions to solve the problem of chromosomes.


o An evaluation function that recovers a rating for each chromosome given to it.
o Operators that may be implemented to parents when they reproduce to alter
their genetic composition. The standard operators are mutation and crossover.
o Operators that may be implemented to parents when they reproduce to modify
their genetic composition. The standard operators are mutation and crossover.

Development of ANNs with Evolutionary Computation:

The advancement of ANNs is a subject that has been broadly dealt with extremely
different techniques. The world of evolutionary algorithms is no exemption, and
evidence of that is the incredible amount of works that have been published about the
various techniques in this area, even with genetic algorithms or GP. As a general rule,
the field of ANNs generation using evolutionary algorithms is separated into three
principal fields: Evolution of weight, Architectures, Learning rules.

Initially, the weight evolution begins from an ANN with a previously determined
topology. The issue to be solved is the training of the association weights, attempting
to limit the network error. With the utilization of an evolutionary algorithm, the
weights can be represented either as the connection of binary or real values.

Second, the evolution of architecture incorporates the generation of the topological


structure. In order to utilize evolutionary algorithms to create ANN architectures, it is
required to select how to encrypt the genotype of a given network for it to be used by
the genetic operators.

At the first option, direct encoding, there is a balanced analogy between all of the
genes and their resulting phenotypes. The most typical encoding technique comprises
a matrix that represents an architecture where each component reveals the presence or
absence of association between two nodes.

In the encoding schemes, GP has been utilized to create both architecture and
association weights at the same time, either for feed-forward or recurrent ANNs, with
no limitations in their architecture. This new codification scheme also permits the
acquiring of basic networks with a minimum number of neurons and associations, and
the outcomes published are auspicious. Apart from direct encoding, there are some
indirect encoding techniques. In these techniques, just a few characteristics of the
architecture are encoded in the chromosome. These techniques have various types of
representation. First, the parametric representations portray the network as a group of
parameters. For example, numbers of nodes for each layer, the number of associations
between two layers, the number of hidden layers, etc. Another no direct representation
type depends on grammatical rules. In this system, the network is represented by a
group of regulations, build as production rules that make a matrix that represents the
network. With respect to the evolution of the learning rule, there are various
approaches, however, most of them are just based on how learning can alter or
manage the evolution and also on the relationship between the architecture and the
association weights.

ANNs working principle:


The working principle of a standard Genetic Algorithm is illustrated in the given
figure. The significant steps involved are the generation of a population of the
solution, identifying the objective function and fitness function, and the application of
genetic operators. These aspects are described with the assistance of a fundamental
genetic algorithm as below.

Start:

It generates a random population of n chromosomes.

Fitness:

It calculates the fitness f(x) of each chromosome x in the population.

New Population:

It generates a new population by repeating the following steps until the New
population is finished.
Selection:

It chooses two parent chromosomes from a population as per their fitness. The better
fitness, the higher the probability of getting selected.

Crossover:

In crossover probability, cross over the parents to form new offspring (children). If no
crossover was performed, the offspring is the exact copy of the parents.

Mutation:

In mutation probability, mutate new offspring at each locus.

Accepting:

It places new offspring in the new population.

Replace:

It uses the newly generated population for a further run of the algorithm.

Test:

If the end condition is satisfied, then it stops and returns the best solution in the
current population.

Loop:

In this step, you need to go to the second step for fitness evaluation.
The basic principle behind the genetic algorithms is that they generate and maintain a
population of individuals represented by chromosomes. Chromosomes are a character
string practically equivalent to the chromosomes appearing in DNA. These
chromosomes are usually encoded solutions to a problem. It undergoes a process of
evolution as per rules of selection, reproduction, and mutation. Each individual in the
environment (represented by chromosome) gets a measure of its fitness in the
environment. Reproduction chooses individuals with high fitness values in the
population. Through crossover and mutation of such individuals, a new population is
determined in which individuals might be an even better fit for their environment. The
process of crossover includes two chromosomes swapping chunks of data and is
analogous to the process of reproduction. Mutation introduces slight changes into a
little extant of the population, and it is representative of an evolutionary step.
Difference between traditional and genetic approach:

An algorithm is a progression of steps for solving a problem. A genetic algorithm is a


problem-solving technique that uses genetics as its model of problem-solving. It is a
search method to find approximate solutions to optimization and search issues. One
can easily distinguish between a traditional and a genetic algorithm.

Traditional Algorithm Genetic Algorithm


It selects the next population by
It selects the next point in the series by a
computation, which utilizes random number
deterministic computation.
generators.

It creates an individual point at each It creates a population of points at every


iteration. The sequence of points approaches iteration. The best point in the population
an optimal solution. approaches an optimal solution.

Advancement in each iteration is problem Concurrence in each iteration is a problem


specific. independent.

What is an Expert System?


An expert system is a computer program that is designed to solve complex problems and to
provide decision-making ability like a human expert. It performs this by extracting
knowledge from its knowledge base using the reasoning and inference rules according to
the user queries.

The expert system is a part of AI, and the first ES was developed in the year 1970, which
was the first successful approach of artificial intelligence. It solves the most complex issue
as an expert by extracting the knowledge stored in its knowledge base. The system helps in
decision making for compsex problems using both facts and heuristics like a human
expert. It is called so because it contains the expert knowledge of a specific domain and
can solve any complex problem of that particular domain. These systems are designed for a
specific domain, such as medicine, science, etc.

The performance of an expert system is based on the expert's knowledge stored in its
knowledge base. The more knowledge stored in the KB, the more that system improves its
performance. One of the common examples of an ES is a suggestion of spelling errors
while typing in the Google search box.

Below is the block diagram that represents the working of an expert system:
Note: It is important to remember that an expert system is not used to replace
the human experts; instead, it is used to assist the human in making a complex
decision. These systems do not have human capabilities of thinking and work on
the basis of the knowledge base of the particular domain.
Below are some popular examples of the Expert System:

o DENDRAL: It was an artificial intelligence project that was made as a chemical analysis
expert system. It was used in organic chemistry to detect unknown organic molecules
with the help of their mass spectra and knowledge base of chemistry.
o MYCIN: It was one of the earliest backward chaining expert systems that was designed
to find the bacteria causing infections like bacteraemia and meningitis. It was also used
for the recommendation of antibiotics and the diagnosis of blood clotting diseases.
o PXDES: It is an expert system that is used to determine the type and level of lung
cancer. To determine the disease, it takes a picture from the upper body, which looks
like the shadow. This shadow identifies the type and degree of harm.
o CaDeT: The CaDet expert system is a diagnostic support system that can detect cancer
at early stages.
Characteristics of Expert System

o High Performance: The expert system provides high performance for solving any type
of complex problem of a specific domain with high efficiency and accuracy.
o Understandable: It responds in a way that can be easily understandable by the user. It
can take input in human language and provides the output in the same way.
o Reliable: It is much reliable for generating an efficient and accurate output.
o Highly responsive: ES provides the result for any complex query within a very short
period of time.

Components of Expert System


An expert system mainly consists of three components:
o User Interface
o Inference Engine
o Knowledge Base

1. User Interface
With the help of a user interface, the expert system interacts with the user, takes queries as
an input in a readable format, and passes it to the inference engine. After getting the
response from the inference engine, it displays the output to the user. In other words, it is
an interface that helps a non-expert user to communicate with the expert system to
find a solution.

2. Inference Engine(Rules of Engine)


o The inference engine is known as the brain of the expert system as it is the main
processing unit of the system. It applies inference rules to the knowledge base to derive
a conclusion or deduce new information. It helps in deriving an error-free solution of
queries asked by the user.
o With the help of an inference engine, the system extracts the knowledge from the
knowledge base.
o There are two types of inference engine:
o Deterministic Inference engine: The conclusions drawn from this type of inference
engine are assumed to be true. It is based on facts and rules.
o Probabilistic Inference engine: This type of inference engine contains uncertainty in
conclusions, and based on the probability.
Inference engine uses the below modes to derive the solutions:
o Forward Chaining: It starts from the known facts and rules, and applies the inference
rules to add their conclusion to the known facts.
o Backward Chaining: It is a backward reasoning method that starts from the goal and
works backward to prove the known facts.

3. Knowledge Base
o The knowledgebase is a type of storage that stores knowledge acquired from the
different experts of the particular domain. It is considered as big storage of knowledge.
The more the knowledge base, the more precise will be the Expert System.
o It is similar to a database that contains information and rules of a particular domain or
subject.
o One can also view the knowledge base as collections of objects and their attributes.
Such as a Lion is an object and its attributes are it is a mammal, it is not a domestic
animal, etc.
Components of Knowledge Base

o Factual Knowledge: The knowledge which is based on facts and accepted by


knowledge engineers comes under factual knowledge.
o Heuristic Knowledge: This knowledge is based on practice, the ability to guess,
evaluation, and experiences.
Knowledge Representation: It is used to formalize the knowledge stored in the knowledge
base using the If-else rules.

Knowledge Acquisitions: It is the process of extracting, organizing, and structuring the


domain knowledge, specifying the rules to acquire the knowledge from various experts, and
store that knowledge into the knowledge base.

Expert System Shells

An Expert system shell is a software development environment. It contains the basic


components of expert systems. A shell is associated with a prescribed method for
building applications by configuring and instantiating these components.

Shell components and description


The generic components of a shell : the knowledge acquisition, the knowledge Base,
the reasoning, the explanation and the user interface are shown below. The knowledge
base and reasoning engine are the core components.

All these components are described in the next slide.

■ Knowledge Base

A store of factual and heuristic knowledge. Expert system tool provides one or more
knowledge representation schemes for expressing knowledge about the application
domain. Some tools use both Frames (objects) and IF-THEN rules. In PROLOG the
knowledge is represented as logical statements.

■ Reasoning Engine

Inference mechanisms for manipulating the symbolic information and knowledge in


the knowledge base form a line of reasoning in solving a problem. The inference
mechanism can range from simple modus ponens backward chaining of IF-THEN
rules to Case-Based reasoning.
Knowledge Acquisition subsystem

A subsystem to help experts in build knowledge bases. However, collecting


knowledge, needed to solve problems and build the knowledge base, is the biggest
bottleneck in building expert systems.

Explanation subsystem

A subsystem that explains the system's actions. The explanation can range from how
the final or intermediate solutions were arrived at justifying the need for additional
data.

User Interface

A means of communication with the user. The user interface is generally not a part of
the expert system technology. It was not given much attention in the past. However,
the user interface can make a critical difference in the pe eived utility of an Expert
system.
What is Fuzzy Logic?

The 'Fuzzy' word means the things that are not clear or are vague. Sometimes, we
cannot decide in real life that the given problem or statement is either true or false. At
that time, this concept provides many values between the true and false and gives the
flexibility to find the best solution to that problem.

Example of Fuzzy Logic as comparing to Boolean Logic

Fuzzy logic contains the multiple logical values and these values are the truth values
of a variable or problem between 0 and 1. This concept was introduced by Lofti
Zadeh in 1965 based on the Fuzzy Set Theory. This concept provides the
possibilities which are not given by computers, but similar to the range of possibilities
generated by humans.

In the Boolean system, only two possibilities (0 and 1) exist, where 1 denotes the
absolute truth value and 0 denotes the absolute false value. But in the fuzzy system,
there are multiple possibilities present between the 0 and 1, which are partially false
and partially true.

The Fuzzy logic can be implemented in systems such as micro-controllers,


workstation-based or large network-based systems for achieving the definite output. It
can also be implemented in both hardware or software.

Characteristics of Fuzzy Logic

Following are the characteristics of fuzzy logic:

1. This concept is flexible and we can easily understand and implement it.
2. It is used for helping the minimization of the logics created by the human.
3. It is the best method for finding the solution of those problems which are
suitable for approximate or uncertain reasoning.
4. It always offers two values, which denote the two possible solutions for a
problem and statement.
5. It allows users to build or create the functions which are non-linear of arbitrary
complexity.
6. In fuzzy logic, everything is a matter of degree.
7. In the Fuzzy logic, any system which is logical can be easily fuzzified.
8. It is based on natural language processing.
9. It is also used by the quantitative analysts for improving their algorithm's
execution.
10. It also allows users to integrate with the programming.

Architecture of a Fuzzy Logic System


In the architecture of the Fuzzy Logic system, each component plays an important
role. The architecture consists of the different four components which are given
below.

1. Rule Base
2. Fuzzification
3. Inference Engine
4. Defuzzification

Following diagram shows the architecture or process of a Fuzzy Logic system:

1. Rule Base

Rule Base is a component used for storing the set of rules and the If-Then conditions
given by the experts are used for controlling the decision-making systems. There are
so many updates that come in the Fuzzy theory recently, which offers effective
methods for designing and tuning of fuzzy controllers. These updates or developments
decreases the number of fuzzy set of rules.

2. Fuzzification

Fuzzification is a module or component for transforming the system inputs, i.e., it


converts the crisp number into fuzzy steps. The crisp numbers are those inputs which
are measured by the sensors and then fuzzification passed them into the control
systems for further processing. This component divides the input signals into
following five states in any Fuzzy Logic system:

o Large Positive (LP)


o Medium Positive (MP)
o Small (S)
o Medium Negative (MN)
o Large negative (LN)

3. Inference Engine

This component is a main component in any Fuzzy Logic system (FLS), because all
the information is processed in the Inference Engine. It allows users to find the
matching degree between the current fuzzy input and the rules. After the matching
degree, this system determines which rule is to be added according to the given input
field. When all rules are fired, then they are combined for developing the control
actions.

4. Defuzzification
Defuzzification is a module or component, which takes the fuzzy set inputs generated
by the Inference Engine, and then transforms them into a crisp value. It is the last
step in the process of a fuzzy logic system. The crisp value is a type of value which is
acceptable by the user. Various techniques are present to do this, but the user has to
select the best one for reducing the errors.

Fuzzy Set

The set theory of classical is the subset of Fuzzy set theory. Fuzzy logic is based on
this theory, which is a generalisation of the classical theory of set (i.e., crisp set)
introduced by Zadeh in 1965.

A fuzzy set is a collection of values which exist between 0 and 1. Fuzzy sets are
denoted or represented by the tilde (~) character. The sets of Fuzzy theory were
introduced in 1965 by Lofti A. Zadeh and Dieter Klaua. In the fuzzy set, the partial
membership also exists. This theory released as an extension of classical set theory.

This theory is denoted mathematically asA fuzzy set (Ã) is a pair of U and M, where
U is the Universe of discourse and M is the membership function which takes on
values in the interval [ 0, 1 ]. The universe of discourse (U) is also denoted by Ω or X.

Operations on Fuzzy Set

Given à and B are the two fuzzy sets, and X be the universe of discourse with the
following respective member functions:
The operations of Fuzzy set are as follows:

1. Union Operation: The union operation of a fuzzy set is defined by:

μA∪B(x) = max (μA(x), μB(x))

Example:

Let's suppose A is a set which contains following elements:

A = {( X1, 0.6 ), (X2, 0.2), (X3, 1), (X4, 0.4)}

And, B is a set which contains following elements:

B = {( X1, 0.1), (X2, 0.8), (X3, 0), (X4, 0.9)}

then,

AUB = {( X1, 0.6), (X2, 0.8), (X3, 1), (X4, 0.9)}

Because, according to this operation

For X1

μA∪B(X1) = max (μA(X1), μB(X1))


μA∪B(X1) = max (0.6, 0.1)
μA∪B(X1) = 0.6

For X2
μA∪B(X2) = max (μA(X2), μB(X2))
μA∪B(X2) = max (0.2, 0.8)
μA∪B(X2) = 0.8

For X3

μA∪B(X3) = max (μA(X3), μB(X3))


μA∪B(X3) = max (1, 0)
μA∪B(X3) = 1

For X4

μA∪B(X4) = max (μA(X4), μB(X4))


μA∪B(X4) = max (0.4, 0.9)
μA∪B(X4) = 0.9

2. Intersection Operation:The intersection operation of fuzzy set is defined by:

μA∩B(x) = min (μA(x), μB(x))

Example:

Let's suppose A is a set which contains following elements:

A = {( X1, 0.3 ), (X2, 0.7), (X3, 0.5), (X4, 0.1)}

And, B is a set which contains following elements:

B = {( X1, 0.8), (X2, 0.2), (X3, 0.4), (X4, 0.9)}

then,
A∩B = {( X1, 0.3), (X2, 0.2), (X3, 0.4), (X4, 0.1)}

Because, according to this operation

For X1

μA∩B(X1) = min (μA(X1), μB(X1))


μA∩B(X1) = min (0.3, 0.8)
μA∩B(X1) = 0.3

For X2

μA∩B(X2) = min (μA(X2), μB(X2))


μA∩B(X2) = min (0.7, 0.2)
μA∩B(X2) = 0.2

For X3

μA∩B(X3) = min (μA(X3), μB(X3))


μA∩B(X3) = min (0.5, 0.4)
μA∩B(X3) = 0.4

For X4

μA∩B(X4) = min (μA(X4), μB(X4))


μA∩B(X4) = min (0.1, 0.9)
μA∩B(X4) = 0.1

3. Complement Operation: The complement operation of fuzzy set is defined by:

μĀ(x) = 1-μA(x),
Example:

Let's suppose A is a set which contains following elements:

A = {( X1, 0.3 ), (X2, 0.8), (X3, 0.5), (X4, 0.1)}

then,

Ā= {( X1, 0.7 ), (X2, 0.2), (X3, 0.5), (X4, 0.9)}

Because, according to this operation

For X1

μĀ(X1) = 1-μA(X1)
μĀ(X1) = 1 - 0.3
μĀ(X1) = 0.7

For X2

μĀ(X2) = 1-μA(X2)
μĀ(X2) = 1 - 0.8
μĀ(X2) = 0.2

For X3

μĀ(X3) = 1-μA(X3)
μĀ(X3) = 1 - 0.5
μĀ(X3) = 0.5

For X4
μĀ(X4) = 1-μA(X4)
μĀ(X4) = 1 - 0.1
μĀ(X4) = 0.9

Classical Set Theory Fuzzy Set Theory

1. This theory is a class of those sets having 1. This theory is a class of those sets having
sharp boundaries. un-sharp boundaries.

2. This set theory is defined by exact 2. This set theory is defined by ambiguous
boundaries only 0 and 1. boundaries.

3. In this theory, there always exists


3. In this theory, there is no uncertainty
uncertainty about the boundary's location of
about the boundary's location of a set.
a set.

4. This theory is widely used in the design of


4. It is mainly used for fuzzy controllers.
digital systems.

You might also like