Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 86

Unit 2: Cognitive System Fundamentals

Knowledge-Based Agent in Artificial intelligence


Knowledge-Based Agent in Artificial intelligence

• An intelligent agent needs knowledge about the real world for taking
decisions and reasoning to act efficiently.

• Knowledge-based agents are those agents who have the capability


of maintaining an internal state of knowledge, reason over that knowledge,
update their knowledge after observations and take actions. These agents
can represent the world with some formal representation and act
intelligently.
Continue..

A knowledge-based agent must able to do the following:

o An agent should be able to represent states, actions, etc.

o An agent Should be able to incorporate new percepts.

o An agent can update the internal representation of the world.

o An agent can deduce the internal representation of the world.

o An agent can deduce appropriate actions.


Continue..

The architecture of knowledge-based agent:

The above diagram is representing a generalized architecture for a knowledge-based agent.


The knowledge-based agent (KBA) take input from the environment by perceiving the
environment. The input is taken by the inference engine of the agent and which also
communicate with KB to decide as per the knowledge store in KB. The learning element of
KBA regularly updates the KB by learning new knowledge.
Continue..

The architecture details of knowledge-based agent:

Knowledge-based agents are composed of two main parts:


• Knowledge-base
• Inference system.

❑ Knowledge base: Knowledge-base is a central component of a knowledge-


based agent, it is also known as KB. It is a collection of sentences (here
'sentence' is a technical term and it is not identical to sentence in English).
These sentences are expressed in a language which is called a knowledge
representation language. The Knowledge-base of KBA stores fact about the
world.

❑ Why use a knowledge base?

“Knowledge-base is required for updating knowledge for an agent to learn


with experiences and take action as per the knowledge.”
Continue..

The architecture details of knowledge-based agent:

❑ Inference system: Inference means deriving new sentences from old.


Inference system allows us to add a new sentence to the knowledge base. A
sentence is a proposition about the world. Inference system applies logical
rules to the KB to deduce new information.

❑ Inference system generates new facts so that an agent can update the KB. An
inference system works mainly in two rules which are given as:

o Forward chaining
o Backward chaining
Continue..

Operations Performed by KBA

❑ Following are three operations which are performed by KBA in order to


show the intelligent behavior:

1. TELL: This operation tells the knowledge base what it perceives from the
environment.

2. ASK: This operation asks the knowledge base what action it should
perform.

3. Perform: It performs the selected action.


Continue..

A generic knowledge-based agent:

o Following is the structure outline of a generic knowledge-based agents


program:

o The knowledge-based agent takes percept as input and returns an action as


output. The agent maintains the knowledge base, KB, and it initially has some
background knowledge of the real world. It also has a counter to indicate the
time for the whole process, and this counter is initialized with zero.
Continue..

o Each time when the function is called, it performs its three operations:

1. Firstly it TELLs the KB what it perceives.


2. Secondly, it asks KB what action it should take
3. Third agent program TELLS the KB that which action was chosen.

o The MAKE-PERCEPT-SENTENCE generates a sentence as setting that the


agent perceived the given percept at the given time.

o The MAKE-ACTION-QUERY generates a sentence to ask which action should


be done at the current time.

o MAKE-ACTION-SENTENCE generates a sentence which asserts that the


chosen action was executed.
Continue..

❑ Various levels of knowledge-based agent:

o A knowledge-based agent can be viewed at different levels which are given


below:

1. Knowledge level: Knowledge level is the first level of knowledge-based agent, and in
this level, we need to specify what the agent knows, and what the agent goals are. With
these specifications, we can fix its behavior. For example, suppose an automated taxi
agent needs to go from a station A to station B, and he knows the way from A to B, so
this comes at the knowledge level.

2. Logical level: At this level, we understand that how the knowledge representation of
knowledge is stored. At this level, sentences are encoded into different logics. At the
logical level, an encoding of knowledge into logical sentences occurs. At the logical level
we can expect to the automated taxi agent to reach to the destination B.

3. Implementation level: This is the physical representation of logic and knowledge. At


the implementation level agent perform actions as per logical and knowledge level. At
this level, an automated taxi agent actually implement his knowledge and logic so that
he can reach to the destination.
Continue..

❑ Approaches to designing a knowledge-based agent:

o There are mainly two approaches to build a knowledge-based agent:

1. Declarative approach: We can create a knowledge-based agent by


initializing with an empty knowledge base and telling the agent all the
sentences with which we want to start with. This approach is called
Declarative approach.

2. Procedural approach: In the procedural approach, we directly encode


desired behavior as a program code. Which means we just need to write a
program that already encodes the desired behavior or agent.

o However, in the real world, a successful agent can be built by combining both
declarative and procedural approaches, and declarative knowledge can often
be compiled into more efficient procedural code.
Knowledge-Based Agent in Artificial intelligence: Knowledge
Representation
❑ 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
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.
Continue..
Continue..

❑ Knowledge: Knowledge is awareness or familiarity gained by experiences of


facts, data, and situations. Following are the types of knowledge in artificial
intelligence:

❑ Types of knowledge: Following are the various types of knowledge:


Continue..

❑ The relation between knowledge and intelligence:


Knowledge-Based Agent in Artificial intelligence: Knowledge
Representation

❑ AI knowledge cycle:

• An Artificial intelligence system has the following components for displaying


intelligent behavior:

1. Perception
2. Learning
3. Knowledge Representation and Reasoning
4. Planning
5. Execution
Knowledge-Based Agent in Artificial intelligence: Knowledge
Representation

❑ AI knowledge cycle:

The above diagram is showing how an AI system can interact with the real world and what
components help it to show intelligence. AI system has Perception component by which it
retrieves information from its environment. It can be visual, audio or another form of
sensory input. The learning component is responsible for learning from data captured by
Perception comportment. In the complete cycle, the main components are knowledge
representation and Reasoning. These two components are involved in showing the
intelligence in machine-like humans. These two components are independent with each
other but also coupled together. The planning and execution depend on analysis of
Knowledge representation and reasoning.
Knowledge-Based Agent in Artificial intelligence: Knowledge
Representation

❑ Requirements for knowledge Representation system: A good knowledge


representation system must possess the following properties.
Knowledge-Based Agent in Artificial intelligence: Knowledge
Representation

❑ Techniques of knowledge representation: There are mainly four ways of


knowledge representation which are given as follows:
1. Logical Representation
2. Semantic Network Representation
3. Frame Representation
4. Production Rules
Benefits of Knowledge Base In Artificial Intelligence
Knowledge management systems boost productivity, minimize risk, and increase your
competitive advantage. A knowledge base in AI delivers many important benefits,
including:
1.Simplifying knowledge discovery. Until a few years ago, organizations only had access
to two knowledge management practices: capturing and sharing knowledge. Today’s
systems add discovering and maintaining knowledge to the mix. Knowledge workers can
now use multiple tools, including cloud-based solutions, to share their knowledge and
expertise with others. AI makes the entire process easier with new technologies like
semantic search, natural language processing, and machine learning.
2.Connecting data from disparate sources. People working in different departments
don’t necessarily capture and share information in the same way. For instance, sales reps
may use a CRM tool, and support teams use a ticketing system. AI helps organizations
connect and combine knowledge across multiple processes.
3.Keeping your knowledge base content up-to-date. Over time, a tremendous amount of
information ends up stored in a knowledge base. Eventually, some of it becomes outdated,
but no one bothers to update or dispose of it. AI supports knowledge maintenance by
reminding employees to update knowledge regularly.
4.Providing important knowledge management metrics. It’s challenging to prove a
knowledge management system is fulfilling its promise. AI makes it far easier to track
performance metrics like first call resolution, average wait time, and average call
abandonment rate.
Future of Knowledge Base in AI

• Nearly 80 percent of enterprises say they plan to prioritize AI and


machine learning in 2021, concentrating on initiatives that deliver profits
and cost reduction. Customer experience futurist Blake Morgan says AI
has “enabled companies to personalize the customer experience in a way
we’ve never seen before.” She urges industries to make digital
transformation a top priority for their companies.

• KMS Lighthouse is an AI-powered solution that helps users find the


answers they need quickly while improving its performance over time. Its
power to transform the way your enterprise delivers customer service can
result in happier agents, happier customers, and increased profits, a win-
win few, if any, other solutions can provide.
Fig : An expanding role of Knowledge in future AI systems.
Semantic Networks In Artificial Intelligence
Need of Semantic Networks In Artificial Intelligence

o A semantic network is a graphic notation for representing knowledge in patterns


of interconnected nodes. Semantic networks became popular in artificial
intelligence and natural language processing only because it represents
knowledge or supports reasoning. These act as another alternative for predicate
logic in a form of knowledge representation.

o The structural idea is that knowledge can be stored in the form of graphs, with
nodes representing objects in the world, and arcs representing relationships
between those objects.

1. Semantic nets consist of nodes, links and link labels. In these networks diagram, nodes
appear in form of circles or ellipses or even rectangles which represents objects such as
physical objects, concepts or situations.
2. Links appear as arrows to express the relationships between objects, and link labels
specify relations.
3. Relationships provide the basic needed structure for organizing the knowledge, so
therefore objects and relations involved are also not needed to be concrete.
4. Semantic nets are also referred to as associative nets as the nodes are associated with
other nodes.
Continue…
Continue..
COMPONENTS OF SEMANTIC NETWORKS:
Semantic Networks can further be defined by specifying its fundamental
components, which are:

•Lexical Components - Consists of:


• Nodes represent the object or concept.
• Links: Denoting relation between nodes.
• 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.

•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 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.
ADVANTAGES & DISADVANTAGES OF SEMANTIC
NETWORKS:

As one of the oldest and the most effective techniques or Knowledge


Representation, semantic networks offers various advantages, a few of
which are:

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.
Continue..

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.
Continue..

❑ Six Mostly Used Types Of Semantic Networks:


1. Definitional Networks -
• Emphasize the subtype or is-a relation between a concept type and a newly
defined subtype.
• The resulting network, also called a generalization or subsumption hierarchy,
supports the rule of inheritance for copying properties defined for a supertype to
all of its subtypes.
• Since definition are true by definition, the information in these networks is often
assumed to be necessarily true.
Continue..
2. Assertion Networks –
• Are designed to assert propositions. Unlike definitional network, the information
in an assertional network is assumed to be contingently true, unless it is explicitly
marked with a modal operator.
• Some assertional networks have been proposed as models of the conceptual
structures underlying natural language semantics.
Continue..

3. Implicational Networks –
• Use implication as the primary relation for connecting nodes. They may be used to
represent patterns of beliefs, causality, or inferences.
• Implicational networks emphasize implication, they are capable of expressing all
the Boolean connectives by allowing a conjunction of inputs to a propositional
node and a disjunction of outputs.
Continue..
4. Executable Networks –
• Include some mechanism, such as marker passing or attached procedures, which
can perform inferences, pass messages, or search for patterns and associations.
• Executable semantic networks contain mechanisms that can cause some change to
the network itself.
Continue..
5. Learning Networks –
• Build or extend their representations by acquiring knowledge from examples. The
new knowledge may change the old network by adding and deleting nodes and
arcs or by modifying numerical values, called weights, associated with the nodes
and arcs.
• The purpose of learning, both from a natural and AI standpoint, is to create
modifications that enable the system to respond more effectively within its
environment.
Continue..
6. Hybrid Networks –
• Combine two or more of the previous techniques, either in a single network or in
separate, but closely interacting networks..
• System are usually called hybrids if their component languages have different
syntax... The most widely used hybrid of multiple network notations is the
Unified Modeling Language (UML), which was by designed by three
authors....who merged their competing notations.
APPLICATION OF SEMANTIC NETWORKS:
With the growing need for intelligent machines, the application of semantic
networks is also increasing. Therefore, listed here are some of the areas
where Semantic Networks are applied or used:

• In natural language processing applications like semantic parsing, word sense


disambiguation, etc.

• Specialized retrieval tasks, like plagiarism detection.

• Knowledge Graph proposed by Google in 2012 uses semantic networks in the


search engines.
CONCLUSION:

In the field of artificial intelligence, problem-solving


and knowledge representation can be simplified with
a suitable knowledge representation technique, and
the semantic network model is the most appropriate,
as it captures and encapsulates a vast amount of
information entering an intelligent environment and
improves the expressive power of intelligent
machines.

Moreover, its nature enables adding and changing the


information in localized and clear-cut, inference
generation extremely efficient.
Generate and Tests
Generate and Test Heuristic Search – Artificial
Intelligence

o Generate and Test Search is a heuristic search technique based on Depth First
Search with Backtracking which guarantees to find a solution if done
systematically and there exists a solution. In this technique, all the solutions are
generated and tested for the best solution. It ensures that the best solution is
checked against all possible generated solutions.

o It is also known as British Museum Search Algorithm as it’s like looking for an
exhibit at random or finding an object in the British Museum by wandering
randomly.
Generate and Test Heuristic Search
❑ Algorithm :
Properties of Good Generators:

The good generators need to have the following properties:

Complete: Good Generators need to be complete i.e. they should generate all
the possible solutions and cover all the possible states. In this way, we can
guaranty our algorithm to converge to the correct solution at some point in
time.

Non Redundant: Good Generators should not yield a duplicate solution at


any point of time as it reduces the efficiency of algorithm thereby increasing
the time of search and making the time complexity exponential. In fact, it is
often said that if solutions appear several times in the depth-first search then it
is better to modify the procedure to traverse a graph rather than a tree.

Informed: Good Generators have the knowledge about the search space which
they maintain in the form of an array of knowledge. This can be used to search
how far the agent is from the goal, calculate the path cost and even find a way
to reach the goal.
Continue..
Generate and Test Heuristic Search

• Search flow with Generate and Test

Finally, select the path whose length is less.


Example-Let us take a simple example to understand the importance of a
good generator. Consider a pin made up of three 2 digit numbers i.e. the
numbers are of the form,

In this case, one way to find the required pin is to generate all the solutions
in a brute force manner for example,
• The total number of solutions in this case is (100)3 which is approximately
1M.
• So if we do not make use of any informed search technique then it results in
exponential time complexity.

• Now let’s say if we generate 5 solutions every minute. Then the total
numbers generated in 1 hour are 5*60=300 and the total number of solutions
to be generated are 1M.

• Let us consider the brute force search technique for example linear search
whose average time complexity is N/2. Then on an average, the total number
of the solutions to be generated are approximately 5 lakhs.

• Using this technique even if you work for about 24 hrs a day then also you
will need 10 weeks to complete the task.

• Now consider using heuristic function where we have domain knowledge


that every number is a prime number between 0-99 then the possible
number of solutions are (25)3 which is approximately 15,000.

• Now consider the same case that you are generating 5 solutions every
minute and working for 24 hrs then you can find the solution in less than 2
days which was being done in 10 weeks in the case of uninformed search.
• We can conclude for here that if we can find a good heuristic then time
complexity can be reduced gradually.

• But in the worst-case time and space complexity will be exponential. It


all depends on the generator i.e. better the generator lesser is the time
complexity.
Interesting Real Life Examples:
• If a sufficient number of monkeys were placed in front of a set of
typewriters, and left alone long enough, then they would eventually
produce all the works of Shakespeare.

• Dendral which infers the structure of organic compounds using NMR


spectrogram also uses plan-generate-test.
Mean End Analysis
Means-Ends Analysis in Artificial Intelligence
Means end analysis (MEA) is an important concept in artificial
intelligence (AI) because it enhances problem resolution. MEA solves
problems by defining the goal and establishing the right action plan. This
technique is used in AI programs to limit search.
•We have studied the strategies which can reason either in forward or
backward, but a mixture of the two directions is appropriate for solving a
complex and large problem. Such a mixed strategy, make it possible that
first to solve the major part of a problem and then go back and solve the
small problems arise during combining the big parts of the problem.
Such a technique is called Means-Ends Analysis.

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


intelligence for limiting search in AI programs.

•It is a mixture of Backward and forward search technique.

•The MEA technique was first introduced in 1961 by Allen Newell, and
Herbert A. Simon in their problem-solving computer program, which
was named as General Problem Solver (GPS).

•The MEA analysis process centered on the evaluation of the difference


between the current state and goal state.
❑ How means-ends analysis Works:
Means end analysis uses the following processes to achieve its objectives:

• First, the system evaluates the current state to establish whether there
is a problem. If a problem is identified, then it means that an action
should be taken to correct it.
• The second step involves defining the target or desired goal that needs
to be achieved.
• The target goal is split into sub-goals, that are further split into other
smaller goals.
• This step involves establishing the actions or operations that will be
carried out to achieve the end state.
• In this step, all the sub-goals are linked with corresponding executable
actions (operations).
• After that is done, intermediate steps are undertaken to solve the
problems in the current state. The chosen operators will be applied to
reduce the differences between the current state and the end state.
• This step involves tracking all the changes made to the actual state.
Changes are made until the target state is achieved.
The following image shows how the target goal is divided into sub-goals,
that are then linked with executable actions.
Algorithm steps for Means End Analysis
The following are the algorithmic steps for means end analysis:

1.Conduct a study to assess the status of the current state. This can be done
at a macro or micro level.
2.Capture the problems in the current state and define the target state. This
can also be done at a macro or micro level.
3.Make a comparison between the current state and the end state that you
defined. If these states are the same, then perform no further action. This is
an indication that the problem has been tackled. If the two states are not the
same, then move to step 4.
4.Record the differences between the two states at the two aforementioned
levels (macro and micro).
5.Transform these differences into adjustments to the current state.
6.Determine the right action for implementing the adjustments in step 5.
7.Execute the changes and compare the results with the target goal.
8.If there are still some differences between the current state and the target
state, perform course correction until the end goal is achieved.
❑ Example of Means-Ends Analysis:
❑ Solution of Means-Ends Analysis:
❑ Solution of Means-Ends Analysis:
Applications of Means End Analysis
Means end analysis can be applied in the following fields:

1.Organizational planning
• Means end analysis is used in organizations to facilitate general management. It helps
organizational managers to conduct planning to achieve the objectives of the
organization.
• The management reaches the desired goal by dividing the main goals into sub-goals
that are linked with actionable tasks.

2.Business transformation
• This technique is used to implement transformation projects. If there are any desired
changes in the current state of a business project, means end analysis is applied to
establish the new processes to be implemented.
• The processes are split into sub-processes to enhance effective implementation.

3.Gap analysis
• Gap analysis is the comparison between the current performance and the required
performance.
• Means end analysis is applied in this field to compare the existing technology and the
desired technology in organizations.
• Various operations are applied to fill the existing gap in technology.
Production Systems
Production System in AI

o A production system in AI helps create AI-based computer programs. With


the help of it, the automation of various types of machines has become an
easy task.
o The types of machines can be a computer, mobile applications, manufacturing
tools, or more. The set of rules in a production system in Artificial Intelligence
defines the behavior of the machine.
o It helps the machine respond to the surroundings.
o A production system in AI is a type of cognitive architecture that defines
specific actions as per certain rules.
o The rules represent the declarative knowledge of a machine to respond
according to different conditions.
o Today, many expert systems and automation methodologies rely on the rules
of production systems. Below is the basic architecture of production systems
in AI:
Continue….

o The rules in a production system are determined by LHS (left-hand side) and
RHS (right-hand side) equations, where LHS denotes the specific condition
to be applied, and RHS shows the output of the applied condition.

o The representation of knowledge in AI comprises various components used


for making intelligent machines. In the next section, we will discuss the
important components of a production system in Artificial Intelligence.
Components of a Production System in AI
For making an AI-based intelligent system that performs specific tasks, we need an
architecture. The architecture of a production system in Artificial Intelligence
consists of production rules, a database, and the control system.
Components of a Production System in AI
1. Global Database: A global database consists of the architecture used as a
central data structure. A database contains all the necessary data and
information required for the successful completion of a task. It can be divided
into two parts as permanent and temporary. The permanent part of the database
consists of fixed actions, whereas the temporary part alters according to
circumstances.

2. Set of Production Rules: The production rules operate on the global database.
Each rule usually has a precondition that is either satisfied or not by the global
database. If the precondition is satisfied, the rule is usually be applied. The
application of the rule changes the database.

3. Control System: The control system checks the applicability of a rule. It helps
decide which rule should be applied and terminates the process when the
system gives the correct output. It also resolves the conflict of multiple
conditions arriving at the same time. The strategy of the control system specifies
the sequence of rules that compares the condition from the global database to
reach the correct result.
Characteristics of a Production System
There are mainly four characteristics of the production system in AI that is
simplicity, modifiability, modularity, and knowledge-intensive.

• Simplicity: The production rule in AI is in the form of an ‘IF-THEN’


statement. Every rule in the production system has a unique structure. It
helps represent knowledge and reasoning in the simplest way possible to
solve real-world problems. Also, it helps improve the readability and
understanding of the production rules.
Characteristics of a Production System
There are mainly four characteristics of the production system in AI that is
simplicity, modifiability, modularity, and knowledge-intensive.

• Modularity: The modularity of a production rule helps in its incremental


improvement as the production rule can be in discrete parts. The
production rule is made from a collection of information and facts that
may not have dependencies unless there is a rule connecting them
together. The addition or deletion of single information will not have a
major effect on the output.

• Modifiability: The feature of modifiability helps alter the rules as per


requirements. Initially, the skeletal form of the production system is
created. We then gather the requirements and make changes in the raw
structure of the production system. This helps in the iterative
improvement of the production system.

• Knowledge-intensive: Production systems contain knowledge in the form


of a human spoken language, i.e., English. It is not built using any
programming languages. The knowledge is represented in plain English
sentences. Production rules help make productive conclusions from these
sentences.
Disadvantages of a Production System
We discussed various features of a production system in the previous section.
However, many disadvantages are also there in a production system in Artificial
Intelligence, and they are as given below:

❑ Opacity
Communication between the rule interpreter and the production rules creates
difficulty for the understanding of the control system and its strategies. This
condition arises due to the impact of the combined operation of the control
program. There exist difficulties in understanding the hierarchy of operations.
Disadvantages of a Production System
❑ Inefficiency
There are various rules that we employ for solving a problem. The rules can be
effective in different ways. There are conditions where multiple rules get activated
during execution. All the individual rules apply exhaustive searches in each cycle
that reduces the efficiency of the production system.

❑ Inability to Learn
A simple production system based on certain rules is not capable of learning
through experience, unlike advanced AI systems. They are simply bound to
specific rules for actions. We can understand the rules and break them.

❑ Conflict Resolution
To satisfy a condition, various production rules are employed. The condition may
arise when there is a triggering of more than one rule. In that condition, the
control system has to determine the best possible rule from the set of conflicting
rules. This may reduce the efficiency of the production system.
Classes of a Production System
❑ There are four types of production systems that help in categorizing
methodologies for solving different varieties of problems. Let us have a look at
each one of them.
1. Monotonic Production System: In this type of a production system, the rules can be
applied simultaneously as the use of one rule does not prevent the involvement of another
rule that is selected at the same time.

2. Partially Commutative Production System: This class helps create a production system
that can give the results even by interchanging the states of rules. If using a set of rules
transforms State A into State B, then multiple combinations of those rules will be capable to
convert State A into State B.

3. Non-monotonic Production System: This type of a production system increases


efficiency in solving problems. The implementation of these systems does not require
backtracking to correct the previous incorrect moves. The non-monotonic production
systems are necessary from the implementation point of view to find an efficient solution.

4. Commutative System: Commutative systems are helpful where the order of an operation
is not important. Also, problems where the changes are reversible use commutative systems.
On the other hand, partially commutative production systems help in working on problems,
where the changes are irreversible such as a chemical process. When dealing with partially
commutative systems, the order of processes is important to get the correct results.
Use Case: Sorting a String in a Production System
▪ Now, we will understand the use of production rules with an example of
sorting a string.
Use Case: Sorting a String in a Production System

• Here, the conflict set represents the set of all the rules that are applicable to the
string. We have to decide which rule should be used.
• Hence, by using three production rules and seven iterations, we are able to
convert the string ‘cbaca’ to ‘aabcc.’
Case based approach
Case-based reasoning (CBR)
• In artificial intelligence and philosophy, case-based reasoning (CBR),
broadly construed, is the process of solving new problems based on the
solutions of similar past problems.

• In everyday life, an auto mechanic who fixes an engine by recalling


another car that exhibited similar symptoms is using case-based
reasoning.

• A lawyer who advocates a particular outcome in a trial based on legal


precedents or a judge who creates case law is using case-based
reasoning. So, too, an engineer copying working elements of nature
(practicing biomimicry), is treating nature as a database of solutions to
problems.

• Case-based reasoning is a prominent type of analogy solution making.

• It has been argued that case-based reasoning is not only a powerful


method for computer reasoning, but also a pervasive behaviour in
everyday human problem solving; or, more radically, that all reasoning
is based on past cases personally experienced. This view is related to
prototype theory, which is most deeply explored in cognitive science.
Continue….

• CBR developed its roots in the work of artificial intelligence theorist and
cognitive psychologist, Roger Schank, and his students at Yale in the late
20th century.

• The researchers studied the problem-solving ability of humans and found


that most people assemble solutions based on earlier experiences with
similar situations.

• With applications spanning fields ranging from machine learning to


medicine to law, CBR is accomplished by gathering case histories and
implemented by identifying significant features that describe a case.

• CBR systems can “learn” by acquiring new knowledge as cases. This, along
with the application of database techniques, makes it easier to maintain
large volumes of information.
Working of CBR

• When a new case arises to classify, a Case-based Reasoner(CBR) will first


check if an identical training case exists.
• If one is found, then the accompanying solution to that case is returned.
If no identical case is found, then the CBR will search for training cases
having components that are similar to those of the new case.
Conceptually, these training cases may be considered as neighbours of
the new case.
• If cases are represented as graphs, this involves searching for subgraphs
that are similar to subgraphs within the new case.
• The CBR tries to combine the solutions of the neighbouring training cases
to propose a solution for the new case.
• If compatibilities arise with the individual solutions, then backtracking to
search for other solutions may be necessary.
• The CBR may employ background knowledge and problem-solving
strategies to propose a feasible solution.
Four step process for CBR

In general, the case-based reasoning process entails:

• Retrieve- Gathering from memory an experience closest to the current


problem.

• Reuse- Suggesting a solution based on the experience and adapting it


to meet the demands of the new situation.

• Revise- Evaluating the use of the solution in the new context.

• Retain- Storing this new problem-solving method in the memory


system.
Examples of Case-based- reasoning

Example-1-Help desk

• A common example of a case-based reasoning system is a help desk


that users call with problems to be solved.
• Case-based reasoning could be used by the diagnostic assistant to
help users diagnose problems on their computer systems.
• When users give a description of a problem, the closest cases in the
case base are retrieved. The diagnostic assistant could recommend
some of these to the user, adapting each case to the user’s particular
situation.
• An example of adaptation is to change the recommendation based
on what software the user has, what method they use to connect to
the Internet, and the model of the printer.
• If one of the adapted cases works, that case is added to the case base,
to be used when another user asks a similar question. In this way, all
of the common different cases will eventually be in the case base.
Example-2-
Example-3-
Comparison to other techniques

• Case-based reasoning has several differences from other AI approaches,


such as knowledge-based systems (KBS).

• Rather than relying completely on general knowledge of a problem


domain or making associations along generalized relationships between
problem descriptors and conclusions, CBR employs the specific
knowledge of previously experienced, concrete problem situations.

• CBR also offers incremental, sustained learning in that each time a


problem is solved a new experience is retained and can be applied for
future problems.
Case-based Reasoning Applications
• Medicine
• Doctor remembers previous patients especially for rare
combinations of symptoms
• Law
• English/US law depends on precedence

• Case histories are consulted


• Management
• Decisions are often based on past rulings
• Financial
• Performance is predicted by past results
• e-Commerce
• sales support for standard products

• sales support for customized products


• Planning
• Mission planning for US navy

• route planning for Daimler Chrysler cars


• Personalization
• TV listings from Changing Worlds

• music on demand from Kirch Media

• news stories via car radios for DaimlerBenz


Challenges with CBR
• Finding a good similarity metric (eg. for matching subgraphs) and
suitable methods for combining solutions.

• Selecting salient features for indexing training cases and the


development of efficient indexing techniques.

CBR becomes more intelligent as the number of the trade-off


between accuracy and efficiency evolves as the number of stored
cases becomes very large. But after a certain point, the system’s
efficiency will suffer as the time required to search for and process
relevant cases increases.
Thank You

You might also like