100% found this document useful (1 vote)
38 views26 pages

AI With ML (Unit-2)

The document discusses knowledge representation and reasoning in artificial intelligence, emphasizing its importance for AI agents to understand and solve real-world problems. It covers various methods of knowledge representation, including propositional logic, predicate logic, semantic networks, frames, and conceptual dependency, along with their advantages and limitations. Additionally, it highlights the challenges faced in knowledge representation, such as the frame problem and the difficulties in codifying expert knowledge.

Uploaded by

Chaudhri Upeksha
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
100% found this document useful (1 vote)
38 views26 pages

AI With ML (Unit-2)

The document discusses knowledge representation and reasoning in artificial intelligence, emphasizing its importance for AI agents to understand and solve real-world problems. It covers various methods of knowledge representation, including propositional logic, predicate logic, semantic networks, frames, and conceptual dependency, along with their advantages and limitations. Additionally, it highlights the challenges faced in knowledge representation, such as the frame problem and the difficulties in codifying expert knowledge.

Uploaded by

Chaudhri Upeksha
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/ 26

GrowMore Institute of M.

Sc(CA&IT)

GROW M GROW MORE INSTITUE OF M.Sc(CA&IT)

M.Sc(CA&IT)

Sem – 9

Artificial Intelligence with ML

Asst. Proffesor
Minhaz Modasiya
Mail: [email protected]
GROWMORE INSTITUTE OF M.SC(CA&IT)
www.growmore.ac.in

UNIT – II

GR OW M OR E GR OUP OF IN ST ITUT IO N S, A HMEDA BA D- UDAIP


URH IGH WAY, HI M ATNA GA R, DIST. S. K.GUJA RA T– 3830 0 1

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Knowledge Representation
Humans are best at understanding, reasoning, and interpreting
knowledge. Human knows things, which is knowledge and as per their
knowledge they perform various actions in the real world. But how
machines do all these things comes under knowledge
representation and reasoning. Hence we can describe Knowledge
representation as following:

o Knowledge representation and reasoning (KR, KRR) is the part


of Artificial intelligence which concerned with AI agents thinking
and how thinking contributes to intelligent behavior of agents.
o It is responsible for representing information about the real world
so that a computer can understand and can utilize this
knowledge to solve the complex real world problems such as
diagnosis a medical condition or communicating with humans in
natural language.
o It is also a way which describes how we can represent
knowledge in artificial intelligence. Knowledge representation is
not just storing data into some database, but it also enables an
intelligent machine to learn from that knowledge and experiences
so that it can behave intelligently like a human.

Problem Faced in Knoledge Representation:


The major problem in representing knowledge is the problem of
representing the facts that change as well as that do not. This is known
as frame problem In some domains, the only hard part is representing
all the facts. In others, though, figuring out which ones change is non-
trivial. Also there are several limitations of logic as a knowledge
representation scheme .

(i) Logic and theorem proving technique are monotonic in nature. The
derived axioms hold good under all circumstances. Real world is never
monotonic for information obtained is seldom complete.

(ii) Logic does not provide facilities for handling uncertainty. Every
information it deals has to be either correct or incorrect but never
partially.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

(iii) Codification of the problem in logic is a tough task and required


considerable effort on the part of the user.

(iv) Even though various techniques do exist for speeding resolution. it


takes considerable amount of time to prove statements in logic.-

(v) One major constraint in logic is that unless you are sure that a
solution exists. the search will not terminate. We will be going on adding
clause after clause but the solution will be still elusive.

(vi) Heuristics, which form the private knowledge of the experts are
difficult to be codified in logic.

Propositional Logic:

Propositional logic (PL) is the simplest form of logic where all the
statements are made by propositions. A proposition is a declarative
statement which is either true or false. It is a technique of knowledge
representation in logical and mathematical form.

Example:

1. a) It is Sunday.
2. b) The Sun rises from West (False proposition)
3. c) 3+3= 7(False proposition)
4. d) 5 is a prime number.

Following are some basic facts about propositional logic:

o Propositional logic is also called Boolean logic as it works on 0


and 1.
o In propositional logic, we use symbolic variables to represent the
logic, and we can use any symbol for a representing a
proposition, such A, B, C, P, Q, R, etc.
o Propositions can be either true or false, but it cannot be both.
o Propositional logic consists of an object, relations or function,
and logical connectives.
o These connectives are also called logical operators.
o The propositions and connectives are the basic elements of the
propositional logic.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

o Connectives can be said as a logical operator which connects


two sentences.
o A proposition formula which is always true is called tautology,
and it is also called a valid sentence.
o A proposition formula which is always false is
called Contradiction.
o A proposition formula which has both true and false values is
called
o Statements which are questions, commands, or opinions are not
propositions such as "Where is Rohini", "How are you", "What
is your name", are not propositions.

Syntax of propositional logic:

The syntax of propositional logic defines the allowable sentences for


the knowledge representation. There are two types of Propositions:

a. Atomic Propositions
b. Compound propositions

Atomic Proposition: Atomic propositions are the simple propositions.


It consists of a single proposition symbol. These are the sentences
which must be either true or false.

Example:

1. a) 2+2 is 4, it is an atomic proposition as it is a true fact.


2. b) "The Sun is cold" is also a proposition as it is a false fact.

o Compound proposition: Compound propositions are


constructed by combining simpler or atomic propositions, using
parenthesis and logical connectives.

Example:

1. a) "It is raining today, and street is wet."


2. b) "Ankit is a doctor, and his clinic is in Mumbai."

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Predicate Logic:

Predicate Logic in AI is fundamentally a method for describing and


modifying assertions about objects and their characteristics. It includes
a collection of rules and symbols that enable us to build complex
statements from simpler ones.

Predicates and variables are the core components of Predicate Logic in


AI. A predicate is an assertion made regarding one or more things. For
instance, the predicate "is blue" declares that a specific item possesses
the attribute of being blue. A variable serves as a stand-in for an object
so that assertions can apply to any object of a particular type. We can
generalize assertions about vehicles by using the variable x to
represent any car, for instance. There must be at least one object
(represented by the variable x) with the quality of being blue, according
to the adage "exists x, x is blue".
Characteristics of Predicate Logic

Predicate Logic in AI has several characteristics that make it a powerful


tool for AI applications. Some of these characteristics are:

 The Logical inference is allowed.


 More accurate knowledge representation of facts of the real
world.
 Program designing is its application area.
 Better theoretical foundation.
 A predicate with no variable is called a Ground Atom.

In Artificial Intelligence, Predicate Logic is used to describe and reason


about complex relationships between objects and their properties. It is
especially helpful for formalizing and logically representing knowledge
about the world, which can then be used to draw inferences and
deductions. For example, predicate logic in AI determines whether a
member of a given set holds a given property.

It breaks down basic sentences into smaller parts: predicates and


individuals. Predicate logic in AI even allows you to manage
generalization expressions(quantificational expressions). Predicate
reasoning allows you to discuss variables(pronouns). The pronoun's
value is an individual in the universe's domain that context decides.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Slot and Filler Structures


Semantic Networks:
Semantic Networks or Semantic Net is a knowledge representation
technique used for propositional information. Though its versions were
long being used in philosophy, cognitive science (in the form of
semantic memory), and linguistics, Semantic Network’s implementation
in computer science was first developed for artificial intelligence and
machine learning. It is a knowledge base that represents concepts in
a network and the systematic relations between them.

Semantic Network is a directed or undirected graph consisting of


vertices. These vertices represent concepts and edges, which further
represent semantic relations between concepts, mapping or connecting
semantic fields. Moreover, it is termed as Associative Networks, as it
processes the knowledge about accepted meanings in adjacent
regions.

SEMANTIC NETWORK EXAMPLES:


Some of the examples of Semantic Networks are:

 WordNet: A lexical database of English that groups English words


into sets of synonyms (synsets), provides definitions, and records
semantic relations between them.

 Gellish Model: It is a formal language that is defined as a network of


relations between concepts and names of concepts.

 Logical Descriptions: Semantic Networks can also be used to


represent logical descriptions like Charles Sanders Peirce’s
existential graphs or John F. Sowa's conceptual graphs.

COMPONENTS OF SEMANTIC NETWORKS:

Semantic Networks can further be defined by specifying its


fundamental components, which are:

 Lexical Components - Consists of:

o Nodes represent the object or concept.


o Links: Denoting relation between nodes.
o Labels: Denoting particular objects & relations.
 Structural Component - Here the links and nodes form a directed
graph wherein the labels are placed on the link and nodes.
Prof. Minhaz Modasiya
GrowMore Institute of M.Sc(CA&IT)

 Semantic Component - The meanings here are related to the links


and labels of nodes, whereas the facts are dependent on the
approved areas.
 Procedural Part - The creation of new links and nodes is permitted
by constructors, whereas the destructors are responsible for the
removal of links and nodes.

SEMANTIC NETWORK ARCHITECTURE:


As stated earlier, the semantic network is a simple knowledge
representation technique. It uses graphic notation to represent
knowledge or data, wherein a graph of labeled nodes and labels are
used, with directed arcs to encode knowledge. It follows a simple and
comprehensible architecture, which helps add and change information
efficiently.

TYPES OF SEMANTIC NETWORKS:


Semantic networks were developed initially for computers in 1956 by
Richard H. R. of the Cambridge Language Research Unit (CLRU), for
machine translation of natural languages. However, now it is used for
a variety of functions, like knowledge representation. There are
currently six types of semantic networks that enable declarative graphic
representation, which is further used to represent knowledge and
support automated systems for reasoning about the knowledge. These
six types of semantic networks are:

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

 Definitional Networks: Emphasize the subtype or is-a relationship


between a concept type and a newly defined subtype.
 Assertional Networks: Designed to assert propositions.
 Implicational Networks: Uses implications as the primary
relationship for connecting nodes.
 Executable Networks: Contain mechanisms that can cause some
change to the network itself.
 Learning Networks: It builds or extends the representation by
acquiring knowledge from examples.
 Hybrid Networks: These combine two or more of the previous
techniques, either in a single network or in separate, but closely
interacting networks.

ADVANTAGES:

 It is simple and comprehensible.


 Efficient in space requirement.
 Easily clusters related knowledge.
 It is flexible and easy to visualize.
 It is a natural representation of knowledge.
 Conveys meaning in a transparent manner.

DISADVANTAGES:

Though the importance of Semantic Networks is immense in


Knowledge Representation, we must consider the drawbacks it offers,
such as:
 Inheritance cause problems.
 Links on objects represent only binary options.
 Interactable for large domains.
 Don’t represent performances or meta-knowledge effectively.
 It’s difficult to express some properties using Semantic Networks,
like negation, disjunction, etc.

Frames:
A frame is a collection of data describing a particular aspect of the world,
including objects, events, and relations between them.
A frame is a data structure that represents a "snapshot" of the world at
a particular moment in time. It contains all of the information that an AI
system needs to know about the world in order to make decisions.

Frames are used extensively in AI systems, especially in those that use


artificial neural networks. This is because they provide a way to store
and manipulate information in a way that is similar to how the human
brain does it.
Prof. Minhaz Modasiya
GrowMore Institute of M.Sc(CA&IT)

Frames are also used in other AI paradigms, such as rule-based


systems and decision trees. However, they are not as widely used in
these paradigms as they are in neural networks.

Benefits of using frames


There are many benefits to using frames in AI. Frames provide a
structure for representing knowledge that can be used by AI systems to
reason about the world. They can also be used to store and retrieve
information from memory, and to make inferences about new
situations. Frames can also be used to represent plans and goals, and
to generate new actions.

some common frame types in AI?


There are many different types of AI frames, but some of the most
common are:

1. The rule-based system: This type of AI uses a set of rules to


determine how to act in a given situation.

2. The decision tree: This type of AI uses a tree-like structure to make


decisions.

3. The neural network: This type of AI uses a network of interconnected


nodes to make decisions.

4. The genetic algorithm: This type of AI uses a process of evolution to


find solutions to problems.

5. The fuzzy logic system: This type of AI uses a set of rules that are
not precise to make decisions.

Conceptual Dependency:
In 1977, Rogar C. Schank has developed a Conceptual Dependency
structure. The Conceptual Dependency is used to represent
knowledge of Artificial Intelligence. It should be powerful enough to
represent these concepts in the sentence of natural language. It states
that different sentence which has the same meaning should have some
unique representation. There are 5 types of states in Conceptual
Dependency:

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

1. Entities
2. Actions
3. Conceptual cases
4. Conceptual dependencies
5. Conceptual tense

Main Goals of Conceptual Dependency:


1. It captures the implicit concept of a sentence and makes it
explicit.
2. It helps in drawing inferences from sentences.
3. For any two or more sentences that are identical in
meaning. It should be only one representation of meaning.
4. It provides a means of representation which are
language independent.
5. It develops language conversion packages.
Rules of Conceptual Dependency:
Rule-1: It describes the relationship between an actor and the event he
or she causes.
Rule-2: It describes the relationship between PP and PA that are
asserted to describe it.
Rule-3: It describes the relationship between two PPs, one of which
belongs to the set defined by the other.
Rule-4: It describes the relationship between a PP and an attribute that
has already been predicated on it.
Rule-5: It describes the relationship between two PPs one of which
provides a particular kind of information about the other.
Rule-6: It describes the relationship between an ACT and the PP that
is the object of that ACT.
Rule-7: It describes the relationship between an ACT and the source
and the recipient of the ACT.
Rule-8: It describes the relationship between an ACT and the
instrument with which it is performed. This instrument must always be a
full conceptualization, not just a single physical object.
Rule-9: It describes the relationship between an ACT and its physical
source and destination.
Rule-10: It represents the relationship between a PP and a state in
which it started and another in which it ended.
Rule-11: It represents the relationship between one conceptualization
and another that causes it.
Rule-12: It represents the relationship between conceptualization and
the time at which the event occurred described.
Rule-13: It describes the relationship between one conceptualization
and another, that is the time of the first.
Rule-14: It describes the relationship between conceptualization and
the place at which it occurred.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Scripts:
A script is a structured representation describing a stereotyped
sequence of events in a particular context.
Scripts are used in natural language understanding systems to
organize a knowledge base in terms of the situations that the system
should understand. Scripts use a frame-like structure to represent the
commonly occurring experience like going to the movies eating in a
restaurant, shopping in a supermarket, or visiting an ophthalmologist.
A script is a structure that prescribes a set of circumstances that could
be expected to follow from one another. It is similar to a chain of
situations that could be anticipated. Like a script for a play, the script’s
structure is defined in terms of – (a) Actors (b) Roles (c) Props (d)
Scenes

Why Scripts are very useful?


i. Events tend to occur in known runs or patterns.
ii. Entry conditions exist which allow an event to take place.
iii. Casual relationships between events exist.
iv. Prerequisites exist.

Reasoning
The reasoning is the mental process of deriving logical conclusion and
making predictions from available knowledge, facts, and beliefs. Or we
can say, "Reasoning is a way to infer facts from existing data." It is a
general process of thinking rationally, to find valid conclusions.

In artificial intelligence, the reasoning is essential so that the machine


can also think rationally as a human brain, and can perform like a
human.

Types of Reasoning
In artificial intelligence, reasoning can be divided into the following categories:

o Deductive reasoning
o Inductive reasoning
o Abductive reasoning
o Common Sense Reasoning
o Monotonic Reasoning
o Non-monotonic Reasoning

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

1. Deductive reasoning:
Deductive reasoning is deducing new information from logically related known
information. It is the form of valid reasoning, which means the argument's
conclusion must be true when the premises are true.

Deductive reasoning is a type of propositional logic in AI, and it requires various


rules and facts. It is sometimes referred to as top-down reasoning, and
contradictory to inductive reasoning.

Example:

Premise-1: All the human eats veggies

Premise-2: Suresh is human.

Conclusion: Suresh eats veggies.

The general process of deductive reasoning is given below:

2. Inductive Reasoning:
Inductive reasoning is a form of reasoning to arrive at a conclusion using limited
sets of facts by the process of generalization. It starts with the series of specific
facts or data and reaches to a general statement or conclusion.

Inductive reasoning is a type of propositional logic, which is also known as


cause-effect reasoning or bottom-up reasoning.

Example:

Premise: All of the pigeons we have seen in the zoo are white.

Conclusion: Therefore, we can expect all the pigeons to be white.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

3. Abductive reasoning:
Abductive reasoning is a form of logical reasoning which starts with single or
multiple observations then seeks to find the most likely explanation or
conclusion for the observation.

Abductive reasoning is an extension of deductive reasoning, but in abductive


reasoning, the premises do not guarantee the conclusion.

Example:

Implication: Cricket ground is wet if it is raining

Axiom: Cricket ground is wet.

Conclusion It is raining.

4. Common Sense Reasoning


Common sense reasoning is an informal form of reasoning, which can be gained
through experiences.

Common Sense reasoning simulates the human ability to make presumptions


about events which occurs on every day.

It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.

Example:

1. One person can be at one place at a time.


2. If I put my hand in a fire, then it will burn.

The above two statements are the examples of common sense reasoning which a
human mind can easily understand and assume.

5. Monotonic Reasoning:
In monotonic reasoning, once the conclusion is taken, then it will remain the
same even if we add some other information to existing information in our
knowledge base. In monotonic reasoning, adding knowledge does not decrease
the set of prepositions that can be derived.

To solve monotonic problems, we can derive the valid conclusion from the
available facts only, and it will not be affected by new facts.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Example:

o Earth revolves around the Sun.

6. Non-monotonic Reasoning
In Non-monotonic reasoning, some conclusions may be invalidated if we add
some more information to our knowledge base.

Logic will be said as non-monotonic if some conclusions can be invalidated by


adding more knowledge into our knowledge base.

Non-monotonic reasoning deals with incomplete and uncertain models.

Example: Let suppose the knowledge base contains the following knowledge:

o Birds can fly


o Penguins cannot fly
o Pitty is a bird

Baye ̳s theorem:
Bayes theorem is also known as the Bayes Rule or Bayes Law. It is
used to determine the conditional probability of event A when event B
has already happened. The general statement of Bayes’ theorem is
“The conditional probability of an event A, given the occurrence of
another event B, is equal to the product of the event of B, given A and
the probability of A divided by the probability of event B.” i.e.
P(A|B) = P(B|A)P(A) / P(B)
where,
P(A) and P(B) are the probabilities of events A and B
P(A|B) is the probability of event A when event B happens
P(B|A) is the probability of event B when A happens.

Bayes Theorem Statement


Bayes’ Theorem for n set of events is defined as,
Let E1, E2,…, En be a set of events associated with the sample space
S, in which all the events E 1, E2,…, En have a non-zero probability of
occurrence. All the events E1, E2,…, E form a partition of S. Let A be
an event from space S for which we have to find probability, then
according to Bayes’ theorem,
P(Ei|A) = P(Ei)P(A|Ei) / ∑ P(Ek)P(A|Ek)
for k = 1, 2, 3, …., n

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Terms Related to Bayes Theorem:


As we have studied about Bayes theorem in detail, let us understand
the meanings of a few terms related to the concept which have been
used in the Bayes theorem formula and derivation:

Conditional Probability
The probability of an event A based on the occurrence of another
event B is termed conditional Probability. It is denoted as P(A|B) and
represents the probability of A when event B has already happened.

Joint Probability
When the probability of two more events occurring together and at the
same time is measured it is marked as Joint Probability. For two
events A and B, it is denoted by joint probability is denoted
as, P(A∩B).

Random Variables
Real-valued variables whose possible values are determined by
random experiments are called random variables. The probability of
finding such variables is the experimental probability.

Bayes Theorem Formula:


For any two events A and B, then the formula for the Bayes theorem
is given by: (the image given below gives the Bayes’ theorem formula)

where,
P(A) and P(B) are the probabilities of events A and B also P(B) is
never equal to zero.
P(A|B) is the probability of event A when event B happens
P(B|A) is the probability of event B when A happens.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Bayesian Network:
Bayesian belief network is key computer technology for dealing with
probabilistic events and to solve a problem which has uncertainty. We
can define a Bayesian network as:

"A Bayesian network is a probabilistic graphical model which


represents a set of variables and their conditional dependencies using
a directed acyclic graph."

It is also called a Bayes network, belief network, decision network,


or Bayesian model.

Bayesian networks are probabilistic, because these networks are built


from a probability distribution, and also use probability theory for
prediction and anomaly detection.

Bayesian Network can be used for building models from data and
experts opinions, and it consists of two parts:

o Directed Acyclic Graph


o Table of conditional probabilities.

The generalized form of Bayesian network that represents and solve


decision problems under uncertain knowledge is known as
an Influence diagram.

A Bayesian network graph is made up of nodes and Arcs (directed


links), where:

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

o Each node corresponds to the random variables, and a variable


can be continuous or discrete.
o Arc or directed arrows represent the causal relationship or
conditional probabilities between random variables. These
directed links or arrows connect the pair of nodes in the graph.
These links represent that one node directly influence the other
node, and if there is no directed link that means that nodes are
independent with each other
o In the above diagram, A, B, C, and D are random
variables represented by the nodes of the network
graph.
o If we are considering node B, which is connected with
node A by a directed arrow, then node A is called the
parent of Node B.
o Node C is independent of node A.

The Bayesian network has mainly two components:

o Causal Component
o Actual numbers

Each node in the Bayesian network has condition probability


distribution P(Xi |Parent(Xi) ), which determines the effect of the parent
on that node.

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

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

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.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

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)

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

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.

Game Playing:
Game Playing is an important domain of artificial intelligence. Games
don’t require much knowledge; the only knowledge we need to provide is
the rules, legal moves and the conditions of winning or losing the game.
Both players try to win the game. So, both of them try to make the best
move possible at each turn. Searching techniques like BFS(Breadth First
Search) are not accurate for this as the branching factor is very high, so
searching will take a lot of time. So, we need another search procedures
that improve –
 Generate procedure so that only good moves are generated.
 Test procedure so that the best move can be explored first.
Game playing is a popular application of artificial intelligence that
involves the development of computer programs to play games, such as
chess, checkers, or Go. The goal of game playing in artificial intelligence
is to develop algorithms that can learn how to play games and make
decisions that will lead to winning outcomes.
One of the earliest examples of successful game playing AI is the
chess program Deep Blue, developed by IBM, which defeated the
world champion Garry Kasparov in 1997. Since then, AI has been
applied to a wide range of games, including two-player games,
multiplayer games, and video games.

There are two main approaches to game playing in AI, rule-based


systems and machine learning-based systems.
1. Rule-based systems use a set of fixed rules to play the game.
2. Machine learning-based systems use algorithms to learn from
experience and make decisions based on that experience.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Advantages of Game Playing in Artificial Intelligence:

1. Advancement of AI: Game playing has been a driving force behind


the development of artificial intelligence and has led to the creation of
new algorithms and techniques that can be applied to other areas of
AI.
2. Education and training: Game playing can be used to teach AI
techniques and algorithms to students and professionals, as well as
to provide training for military and emergency response personnel.
3. Research: Game playing is an active area of research in AI and
provides an opportunity to study and develop new techniques for
decision-making and problem-solving.
4. Real-world applications: The techniques and algorithms developed
for game playing can be applied to real-world applications, such as
robotics, autonomous systems, and decision support systems.

Disadvantages of Game Playing in Artificial Intelligence:

1. Limited scope: The techniques and algorithms developed for game


playing may not be well-suited for other types of applications and may
need to be adapted or modified for different domains.
2. Computational cost: Game playing can be computationally
expensive, especially for complex games such as chess or Go, and
may require powerful computers to achieve real-time performance.

Planning Techniques:
Artificial intelligence is an important technology in the future. Whether it is
intelligent robots, self-driving cars, or smart cities, they will all use different
aspects of artificial intelligence!!! But Planning is very important to make any
such AI project.

What is a Plan?
We require domain description, task specification, and goal description for any
planning system. A plan is considered a sequence of actions, and each action
has its preconditions that must be satisfied before it can act and some effects
that can be positive or negative.

So, we have Forward State Space Planning (FSSP) and Backward State Space
Planning (BSSP) at the basic level.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

1. Forward State Space Planning (FSSP)


FSSP behaves in the same way as forwarding state-space search. It says that
given an initial state S in any domain, we perform some necessary actions and
obtain a new state S' (which also contains some new terms), called a
progression. It continues until we reach the target position. Action should be
taken in this matter.

o Disadvantage: Large branching factor


o Advantage: The algorithm is Sound

2. Backward State Space Planning (BSSP)


BSSP behaves similarly to backward state-space search. In this, we move from
the target state g to the sub-goal g, tracing the previous action to achieve that
goal. This process is called regression (going back to the previous goal or sub-
goal). These sub-goals should also be checked for consistency. The action
should be relevant in this case.

o Disadvantages: not sound algorithm (sometimes inconsistency can be


found)
o Advantage: Small branching factor (much smaller than FSSP)

What is planning in AI?


Planning in artificial intelligence is about decision-making actions performed by
robots or computer programs to achieve a specific goal.

Execution of the plan is about choosing a sequence of tasks with a high


probability of accomplishing a specific task.

Block-world planning problem

o The block-world problem is known as the Sussmann anomaly.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

o The non-interlaced planners of the early 1970s were unable to solve this
problem. Therefore it is considered odd.
o When two sub-goals, G1 and G2, are given, a non-interleaved planner either
produces a plan for G1 that is combined with a plan for G2 or vice versa.
o In the block-world problem, three blocks labeled 'A', 'B', and 'C' are allowed to
rest on a flat surface. The given condition is that only one block can be moved at
a time to achieve the target.

The start position and target position are shown in the following diagram.

Components of the planning system

The plan includes the following important steps:

o Choose the best rule to apply the next rule based on the best available
guess.
o Apply the chosen rule to calculate the new problem condition.
o Find out when a solution has been found.
o Detect dead ends so they can be discarded and direct system effort in
more useful directions.
o Find out when a near-perfect solution is found.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

Natural Language Processing:


Natural Languuage Processing (NLP) is a field of Artificial Intelligence
(AI) and Computer Science that is concerned with the interactions
between computers and humans in natural language. The goal of NLP is
to develop algorithms and models that enable computers to understand,
interpret, generate, and manipulate human languages.

Common Natural Language Processing (NLP) Task:

Text and speech processing: This includes Speech Recognization, text


& speech Processing, encoding (i.e converting speech or text to
machine-readable language), etc.

 Text classification: This includes Sentiment Analysis in which the


machine can analyze the qualities, emotions, and sarcasm from text
and also classify it accordingly.

 Language generation: This includes tasks such as machine


translation, summary writing, essay writing, etc. which aim to produce
coherent and fluent text.

 Language interaction: This includes tasks such as dialogue


systems, voice assistants, and chatbots, which aim to enable natural
communication between humans and computers.

Working of Natural Language Processing (NLP)

Working in natural language processing (NLP) typically involves using


computational techniques to analyze and understand human language.
This can include tasks such as language understanding, language
generation, and language interaction.
The field is divided into three different parts:
1. Speech Recognition — The translation of spoken language into text.
2. Natural Language Understanding (NLU) — The computer’s ability to
understand what we say.
3. Natural Language Generation (NLG) — The generation of natural
language by a computer.
NLU and NLG are the key aspects depicting the working of NLP devices.
These 2 aspects are very different from each other and are achieved
using different methods.
Individuals working in NLP may have a background in computer science,
linguistics, or a related field. They may also have experience with
programming languages such as Python, and C++ and be familiar with

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

various NLP libraries and frameworks such as NLTK, spaCy, and


OpenNLP.
Speech Recognition:
 First, the computer must take natural language and convert it into
machine-readable language. This is what speech recognition or
speech-to-text does. This is the first step of NLU.
 Hidden Markov Models (HMMs) are used in the majority of voice
recognition systems nowadays. These are statistical models that use
mathematical calculations to determine what you said in order to
convert your speech to text.
 HMMs do this by listening to you talk, breaking it down into small
units (typically 10-20 milliseconds), and comparing it to pre-recorded
speech to figure out which phoneme you uttered in each unit (a
phoneme is the smallest unit of speech). The program then examines
the sequence of phonemes and uses statistical analysis to determine
the most likely words and sentences you were speaking.

Some common roles in Natural Language Processing (NLP)


include:

 NLP engineer: designing and implementing NLP systems and models


 NLP researcher: conducting research on NLP techniques and
algorithms
 ML engineer: Designing and deployment of various machine learning
models including NLP.
 NLP data scientist: analyzing and interpreting NLP data
 NLP consultant: providing expertise in NLP to organizations and
businesses.

Technologies related to Natural Language Processing

There are a variety of technologies related to natural language


processing (NLP) that are used to analyze and understand human
language. Some of the most common include:
1. Machine learning: NLP relies heavily on machine
learning techniques such as supervised and unsupervised learning,
deep learning, and reinforcement learning to train models to
understand and generate human language.
2. Natural Language Toolkits (NLTK) and other libraries: NLTK is a
popular open-source library in Python that provides tools for NLP
tasks such as tokenization, stemming, and part-of-speech tagging.
Other popular libraries include spaCy, OpenNLP, and CoreNLP.
3. Parsers: Parsers are used to analyze the syntactic structure of
sentences, such as dependency parsing and constituency parsing.
4. Text-to-Speech (TTS) and Speech-to-Text (STT) systems: TTS
systems convert written text into spoken words, while STT systems
convert spoken words into written text.

Prof. Minhaz Modasiya


GrowMore Institute of M.Sc(CA&IT)

5. Named Entity Recognization (NER) System: NER systems identify


and extract named entities such as people, places, and organizations
from the text.

6. Sentiment Analysis: A technique to understand the emotions or


opinions expressed in a piece of text, by using various techniques like
Lexicon-Based, Machine Learning-Based, and Deep Learning-based
methods

7. Machine Translation: NLP is used for language translation from


one language to another through a computer.
8. Chatbots: NLP is used for chatbots that communicate with other
chatbots or humans through auditory or textual methods.
9. AI Software: NLP is used in question-answering software for
knowledge representation, analytical reasoning as well as information
retrieval.

Prof. Minhaz Modasiya

You might also like