0% found this document useful (0 votes)
44 views43 pages

Understanding Knowledge in AI Learning

Uploaded by

sujithsaju564
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views43 pages

Understanding Knowledge in AI Learning

Uploaded by

sujithsaju564
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

[Link].

in

UNIT-II
KNOWLEDGE IN LEARNING
KNOWLWDGE IN LEARNING
What is 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:
• 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.
• 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
Click to Edit world problems such as diagnosis a medical condition or communicating with
humans in natural language.
• 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.
What is learning in AI?
In the context of artificial intelligence (AI), learning refers to the
ability of a system or model to improve its performance over time by
extracting patterns and information from data. AI systems can be
designed to learn from experience, adapt to new inputs, and make
better decisions or predictions without being explicitly programmed
for each task.

Click to Edit
Types of Learning
1. Rote Learning:
1. Type: Memorization-based learning.
Rote learning involves the memorization of information through repetition. It is
a straightforward process where individuals repeat information until it is
ingrained in memory. This type of learning is often associated with the ability
to recall facts or information without necessarily understanding the underlying
concepts.
2. Learning by Taking Advice:
1. Type: Social learning or learning from others.
Learning by taking advice involves acquiring knowledge or skills by seeking
Click to Edit
guidance or information from others. This type of learning relies on social
interactions, mentorship, or consulting experts to gain insights and information.
It can be particularly effective in acquiring practical knowledge and
understanding complex concepts through the wisdom of others.
3. Learning in Problem Solving:
Cognitive learning.
Learning in problem solving involves acquiring knowledge and skills through
actively engaging with and solving problems. This type of learning
emphasizes critical thinking, analysis, and the application of learned concepts
to solve real-world challenges. It often leads to a deeper understanding of the
subject matter.
4. Learning from Examples:
Inductive learning.
Learning from examples involves understanding concepts or acquiring skills
Click to Edit by observing and studying examples. This can include learning through
demonstrations, case studies, or real-life instances. Inductive reasoning is
often applied, where general principles or rules are inferred from specific
examples.
Rote Learning Technique
Rote learning is a memorization technique where information is learned
by repetition without a deep understanding of the underlying concepts.
While it may not be the most effective method for fostering a deep
understanding or critical thinking, it can be useful for quickly memorizing
specific information. Here are some techniques associated with rote
learning:
1. Repetition:
Repeat the information multiple times. The more times you encounter
the information, the more likely it is to be retained.
2. Flashcards:
Click to Edit Create flashcards with questions on one side and answers on the other.
Quiz yourself repeatedly until you can recall the information easily.
3. Rhymes and Mnemonics:
Create rhymes, acronyms, or mnemonic devices to help remember
lists or sequences. These can be particularly effective for memorizing
ordered information.
4. Chunking:
Break down large amounts of information into smaller,
manageable chunks. Focus on learning one chunk at a time before
moving on to the next.
[Link] and Recitation:
Listen to recorded information or recite it out loud. Some people
find that hearing information while seeing or saying it helps with
memorization.
6. Writing and Copying:
Click to Edit Write down the information you're trying to learn. The act of
physically writing it out can reinforce the memory. Copying the
information multiple times can also be helpful.
7. Association:
Associate new information with familiar concepts or things you
already know. Creating connections between new and existing
knowledge can aid in recall.
8. Visual Aids:
Use visual aids such as charts, diagrams, or pictures to help reinforce
the information. Associating information with visual cues can enhance
memory.
9. Structured Repetition (Spaced Repetition):
Space out your study sessions over time rather than cramming all at
once. This technique, known as spaced repetition, involves reviewing
information at increasing intervals to strengthen long-term retention.
[Link] Others:
Teach the information to someone else. Explaining concepts to others
Click to Edit requires a deeper level of understanding and can reinforce your own
memory.
• It's important to note that while rote learning can be helpful for
memorizing facts and figures, it may not be sufficient for tasks that
require critical thinking, problem-solving, or a deep understanding of
underlying principles. Effective learning often involves a combination
of rote memorization and more interactive, concept-based approaches.
Learning by taking advice.
This type is the easiest and simple way of learning.
• In this type of learning, a programmer writes a program to give some
instructions to perform a task to the computer. Once it is learned (i.e.
programmed), the system will be able to do new things.
• Also, there can be several sources for taking advice such as
humans(experts), internet etc.
• However, this type of learning has a more necessity of inference than rote
learning.
Click to Edit • As the stored knowledge in knowledge base gets transformed into an
operational form, the reliability of the knowledge source is always taken
into consideration.
• The programs shall operationalize the advice by turning it into a single or
multiple expressions that contain concepts and actions that the program can
use while under execution.
• This ability to operationalize knowledge is very critical for learning. This
is also an important aspect of Explanation Based Learning (EBL)
Example Learning System - FOO
• Learning the game of hearts
• FOO (First Operational Operationaliser) tries to convert high level advice
(principles, problems, methods) into effective executable (LISP)
procedures.
• Hearts:
• Game played as a series of tricks.
• One player - who has the lead - plays a card.
• Other players follow in turn and play a card.
• The player must follow suit.
Click to Edit • If he cannot he play any of his cards.
• The player who plays the highest value card wins the trick and the lead.
• The winning player takes the cards played in the trick.
• The aim is to avoid taking points. Each heart counts as one point the queen
of spades is worth 13 points.
• The winner is the person that after all tricks have been played has the
lowest points score.
Hearts is a game of partial information with no known algorithm for winning.
Although the possible situations are numerous general advice can be given such as:
Avoid taking points.
Do not lead a high card in suit in which an opponent is void.
If an opponent has the queen of spades try to flush it.
In order to receive advice a human must convert into a FOO representation (LISP clause)
(avoid (take-points me) (trick))
FOO operationalises the advice by translating it into expressions it can use in the game. It
can UNFOLD avoid and then trick to give:
(achieve (not (during
Click to Edit (scenario
(each p1 (players) (play-card p1))
(take-trick (trick-winner)))
(take-points me))))
However the advice is still not operational since it depends on the outcome of
trick which is generally not known. Therefore FOO uses case analysis (on the
during expression) to determine which steps could case one to take points.
Step 1 is ruled out and step 2's take-points is UNFOLDED:

(achieve (not (exists c1 (cards-played)


(exists c2 (point-cards)
(during (take (trick-winner) c1)
(take me c2))))))
FOO now has to decide: Under what conditions does (take me c2) occur
during (take (trick-winner) c1).
Click to Edit
A technique, called partial matching, hypothesises that points will be taken if
me = trick-winner and c2 = c1. We can reduce our expression to:

(achieve (not (and (have-points(card-played))


(= (trick-winner) me ))))
This not quite enough a this means Do not win trick that has points.
We do not know who the trick-winner is, also we have not said
anything about how to play in a trick that has point led in the suit.
After a few more steps to achieve this FOO comes up with:

(achieve (>= (and (in-suit-led(card-of me))


(possible (trick-has-points)))
(low(card-of me)))
• FOO had an initial knowledge base that was made up of:
Click to Edit
• basic domain concepts such as trick, hand, deck suits, avoid,
win etc.
• Rules and behavioural constraints -- general rules of the game.
• Heuristics as to how to UNFOLD.
FOO has 2 basic shortcomings:

It lacks a control structure that could apply


operationalisation automatically.
It is specific to hearts and similar tasks.

Click to Edit
3. Learning by problem solving
When the program does not learn from advice, it can
learn by generalizing from its own experiences.
1. Learning by Parameter adjustment.
2. Learning with macro-operations
3. Learning with Chunking
4. The unity problem.
Click to Edit
1. Learning by parameter adjustment
• Here the learning system relies on evaluation procedure that combines
information from several sources into a single summary static.

• For example, the factors such as demand and production capacity may be
combined into a single score to indicate the chance for increase of production.

• But it is difficult to know a priori how much weight should be attached to


each factor.
• The correct weight can be found by taking some estimate of the correct
settings and then allow the program modify its settings based on its
Click to Edit experience.

• Features that appear to be good predictors of overall success will have their
weights increases, while those that do not will have their weights decreased.
• This type of learning systems is useful when little knowledge is available.
• In game programs, for example, the factors such as piece
advantage and mobility are combined into a single score
to decide whether a particular board position is desirable.
This single score is nothing but a knowledge which the
program gathered by means of calculation.
• Programs do this in their static evaluation functions, in
which a variety of factors are combined into a single
score. This function as a polynomial form is given below.
Click to Edit • The t terms are the values of the features that contribute to
the evaluation. The c terms are the coefficients or weights
that are attached to each of these values. As learning
progresses, the c values will change
In designing programs it is often difficult to decide on the
exact value to give each weight initially. So the basic idea
of idea of parameter adjustment is to:
➢ Start with some estimate of the correct weight settings.
➢ Modify the weight in the program on the basis of
accumulated experiences.
➢ Features that appear to be good predictors will have their
Click to Edit weights increased and bad ones will be decreased
Important factors that affect the performance are:
➢ When should the value of a coefficient be increased and

✓ The coefficients of terms that predicted the final outcome


when should it be decreased

accurately should be increased, while the coefficients of poor

✓ The problem of appropriately assigning responsibility to each


predictors should be decreased.

of the steps that led to a single outcome is known as credit


assignment system.
Click to Edit
➢ By how much should be value be changed.
• Learning procedure is a variety of hill-climbing.
• This method is very useful in situations where very little
additional knowledge is available or in programs in which it is
combined with more knowledge intensive methods.
Learning with Macro-Operators
• Sequence of actions that can be treated as a whole are
called macro-operators.
• Once a problem is solved, the learning component takes
the computed plan and stores it as a macro-operator.
• The preconditions are the initial conditions of the problem
just solved, and its post conditions correspond to the goal
just achieved.
Click to Edit • The problem solver efficiently uses the knowledge base it
gained from its previous experiences.
• By generalizing macro-operators the problem solver can
even solve different problems. Generalization is done by
replacing all the constants in the macro-operators with
variables
The STRIPS, for example, is a planning algorithm that
employed macro-operators in it’s learning phase. It builds a
macro operator MACROP, that contains preconditions,
postconditions and the sequence of actions. The macro
operator will be used in the future operation.
• The set of problems for which macro-operators are critical
are exactly those problems with non-serializable sub goals.
(working on one subgoal will necessarily interfere with the
previous solution to another subgoal).
Click to Edit
• One macro operator can produce a small global change in
the world, even though the individual operators that make it
up produce many undesirable local changes.
• Domain specific knowledge we need can be learnt in the
form of macro operators
• ✓ Macro-operators were used in the early problem-solving
system STRIPS. Suppose we are given an initial blocks world
situation in which ON(C, B) and ON(A, Table) are both true.
STRIPS can achieve the goal ON(A, B) by devising a plan with
the four steps UNSTACK(C, B),
PUTDOWN(C) ,PICKUP(A),STACK(A,B). STRIPS now builds
a MACROP with preconditions ON(C, B), ON(A, Table) and
postconditions ON(C, Table), ON(A,B).
• The body of the MACROP consists of the four steps just
mentioned. In future planning, STRIPS is free to use this
Click to Edit complex macro-operator just as it would use any other operator.
Learning by chunking
• Chunking is similar to learning with macro-operators.
Generally, it is used by problem solver systems that make use of
production systems.
• A production system consists of a set of rules that are in if-then
form. That is given a particular situation, what are the actions to
be performed. For example, if it is raining then take umbrella.
• Production system also contains knowledge base, control
strategy and a rule applier. To solve a problem, a system will
compare the present situation with the left hand side of the rules.
Click to Edit
If there is a match then the system will perform the actions
described in the right hand side of the corresponding rule.
• Problem solvers solve problems by applying the rules. Some
of these rules may be more useful than others and the results are
stored as a chunk
• Chunking can be used to learn general search control knowledge.
• Several chunks may encode a single macro-operator and one chunk
may participate in a number of macro sequences. Chunks learned in
the beginning of problem solving, may be used in the later stage. The
system keeps the chunk to use it in solving other problems.
• Soar is a general cognitive architecture for developing intelligent
systems. Soar requires knowledge to solve various problems. It
acquires knowledge using chunking mechanism. The system learns
reflexively when impasses have been resolved. An impasse arises
when the system does not have sufficient knowledge. Consequently,
Click to Edit
Soar chooses a new problem space (set of states and the operators
that manipulate the states) in a bid to resolve the impasse. While
resolving the impasse, the individual steps of the task plan are
grouped into larger steps known as chunks. The chunks decrease the
problem space search and so increase the efficiency of performing
the task.
• In Soar, the knowledge is stored in long-term memory.
Soar uses the chunking mechanism to create productions
that are stored in long-term memory. A chunk is nothing
but a large production that does the work of an entire
sequence of smaller ones. The productions have a set of
conditions or patterns to be matched to working memory
which consists of current goals, problem spaces, states
and operators and a set of actions to perform when the
production fires. Chunks are generalized before storing.
Click to Edit
When the same impasse occurs again, the chunks so
collected can be used to resolve it.
The Utility Problem
• The utility problem in learning systems occurs when knowledge
learned in an attempt to improve a system's performance degrades it
instead.
• The problem appears in many AI systems, but it is most familiar in
speedup learning. Speedup learning systems are designed to improve
their performance by learning control rules which guide their
problem-solving performance. These systems often exhibit the
undesirable property of actually slowing down if they are allowed to
learn in an unrestricted fashion.
Click to Edit • Each individual control rule is guaranteed to have a positive utility
(improve performance) but, in concert, they have a negative utility
(degrade performance).
• One of the causes of the utility problem is the serial nature of current
hardware. The more control rules that speedup learning systems
acquire, the longer it takes for the system to test them on each cycle
One solution to the utility problem is to design a parallel memory
system to eliminate the increase in match cost. his approach moves
the matching problem away from the central processor and into the
memory of the system. These so-called active memories allow
memory search to occur in "nearly constant-time" in the number of
data items, relying on the memory for fast, simple inference and
reminding
PRODIGY program maintains a utility measure for each control
rule. This measure takes into account the average savings provided
by the rule, the frequency of its application and the cost of
Click to Edit matching it.
• If a proposed rule has a negative utility, it is discarded or
forgotten.
• If not, it is placed in long term memory with the other rules. It is
then monitored during subsequent problem solving.
• If its utility falls, the rule I discarded
• Empirical experiments have demonstrated the
effectiveness of keeping only those control rules with
high utility.
• Such utility considerations apply to a wide range of
learning problems

Click to Edit
Induction learning (Learning by example).

Induction learning is carried out on the basis of supervised


learning.
• In this learning process, a general rule is induced by the
system from a set of observed instance.
• However, class definitions can be constructed with the
help of a classification method.
Click to Edit • Classification is a process of assigning to a particular
input, to the name of the class to which it belongs to.
classification is important component in many problem
solving tasks. But often classification is embedded
inside another operation.
Click to Edit
Click to Edit
Click to Edit
Winston’s Learning Program
• ✓ Winston (1975) described a Blocks World Learning program. This
program operated in a simple blocks domain. The goal is to construct
representation of the definition of concepts in the blocks domain.
• In Winston's (1975) Blocks World Learning program, a "simple blocks
domain" refers to an artificial environment in which the AI operates. This
environment contains basic geometric objects (typically blocks) that are
easy to manipulate and understand. These blocks usually differ in attributes

✓ Example : Concepts such a "house".


such as shape, size, color, or position

• Start with input, a line drawing of a blocks world structure. It learned


Click to Edit Concepts House, Tent, Arch as : brick (rectangular block) with a wedge
(triangular block) suitably placed on top of it, tent – as 2 wedges touching
side by side, or an arch – as 2 non-touching bricks supporting a third wedge
or brick.
• The program for Each concept is learned through near miss. A near miss is
an object that is not an instance of the concept but a very similar to such
instances.
• The program uses procedures to analyze the drawing and construct a
semantic net representation.
Click to Edit
The program started with a line drawing of a blocks world structure.
This structural description was then provided as input to the learning
program.
An example of such a structural description for the House of Figure
above is shown in Figure (a) below.
Node A represents the entire structure, which is composed of two
parts: node B - Wedge, and node C - Brick. Figures (b) and (c) show
descriptions of the two Arch structures of Figure above.
These descriptions are identical except for the types of the objects
Click to Edit on the top; one is a Brick while the other is a Wedge. Notice that the
two supporting objects are related not only by left- of and right-of
links, but also by a does-not-marry link, which says that the two
objects do not marry.
Two objects marry if they have faces that touch and they have a
common edge
Click to Edit
Decision Trees

• A decision tree is a non-parametric supervised learning


algorithm for classification and regression tasks. It has a
hierarchical tree structure consisting of a root node, branches,
internal nodes, and leaf nodes. Decision trees are used for
classification and regression tasks, providing easy-to-
understand models.
• A decision tree is a hierarchical model used in decision support
Click to Edit that depicts decisions and their potential outcomes,
incorporating chance events, resource expenses, and utility.
This algorithmic model utilizes conditional control statements
and is non-parametric, supervised learning, useful for both
classification and regression tasks. The tree structure is
comprised of a root node, branches, internal nodes, and leaf
nodes, forming a hierarchical, tree-like structure.
Decision Tree Terminologies
Before learning more about decision trees let’s get familiar with some of the
terminologies:
• Root Node: The initial node at the beginning of a decision tree, where the entire
population or dataset starts dividing based on various features or conditions.
• Decision Nodes: Nodes resulting from the splitting of root nodes are known as
decision nodes. These nodes represent intermediate decisions or conditions within
the tree.
• Leaf Nodes: Nodes where further splitting is not possible, often indicating the final
classification or outcome. Leaf nodes are also referred to as terminal nodes.
• Sub-Tree: Similar to a subsection of a graph being called a sub-graph, a sub-
section of a decision tree is referred to as a sub-tree. It represents a specific portion
of the decision tree.
Click to Edit
• Pruning: The process of removing or cutting down specific nodes in a decision tree
to prevent overfitting and simplify the model.
• Branch / Sub-Tree: A subsection of the entire decision tree is referred to as a
branch or sub-tree. It represents a specific path of decisions and outcomes within
the tree.
• Parent and Child Node: In a decision tree, a node that is divided into sub-nodes is
known as a parent node, and the sub-nodes emerging from it are referred to as child
nodes. The parent node represents a decision or condition, while the child nodes
represent the potential outcomes or further decisions based on that condition.
Click to Edit
Example of Decision Tree
Let’s understand decision trees with the help of an example:

Click to Edit
In the below diagram the tree will first ask what is the
weather? Is it sunny, cloudy, or rainy? If yes then it will go
to the next feature which is humidity and wind. It will
again check if there is a strong wind or weak, if it’s a weak
wind and it’s rainy then the person may go and play.

Click to Edit
Did you notice anything in the above flowchart? We see
that if the weather is cloudy then we must go to play. Why
didn’t it split more? Why did it stop there?

To answer this question, we need to know about few more


concepts like entropy, information gain, and Gini index.
But in simple terms, I can say here that the output for the
Click to Edit
training dataset is always yes for cloudy weather, since
there is no disorderliness here we don’t need to split the
node further.
THANK YOU
Click to Edit

You might also like