Knowledge representation in Artificial Intelligence (AI)

In this page, we will learn about Techniques of Knowledge Representation in Artificial Intelligence (AI), Techniques of Knowledge Representation, Logical Representation, Syntax, Semantics, Advantages of logical representation, Disadvantages of logical Representation, Semantic Network Representation, Disadvantage in Semantic representation, Advantages of Semantic network, Frame Representation, Advantages of frame representation, Disadvantages of frame representation, Production Rules, Advantages of Production rule, Disadvantages of Production rule.


Techniques of knowledge representation

There are basically four ways of knowledge representation and these are given as follows:

  1. Logical Representation
  2. Semantic Network Representation
  3. Frame Representation
  4. Production Rules

What to Represent:

The types of knowledge that must be represented in AI systems are as follows:

AI Techniques of Knowledge Representation in Artificial Intelligence (AI)

1.Logical Representation

A language with certain concrete principles that deals with propositions and has no ambiguity in representation is referred to as logical representation. Drawing a conclusion based on numerous criteria is referred to as logical representation. Some important communication guidelines are laid out in this diagram. It's made up of well-defined syntax and semantics that facilitate sound inference. Each sentence could be translated into logics using the syntax and semantics.

Syntax:

  • Syntaxes are the principles that govern how legal sentences are constructed in logic.
  • It determines the symbol we can use to express knowledge.
  • What is the best way to write those symbols?

Semantics:

  • The rules by which we can comprehend a phrase in logic are known as semantics.
  • Semantic also entails giving each statement a meaning.
  • There are primarily two logics that can be used to represent logic:
    • Propositional Logics
    • Predicate logics

Advantages of logical representation:

  • We can do logical reasoning with the help of logical representation.
  • Programming languages are built on the foundation of logical representation.

Advantages of logical representation:

  • We can do logical reasoning with the help of logical representation.
  • Programming languages are built on the foundation of logical representation.

Disadvantages of logical Representation:

The various types of knowledge are as follows:

  • Logical representations have some limitations and are difficult to use.
  • It's possible that the logical representation technique isn't very natural, and inference isn't particularly efficient.

Note: That logical representation and logical reasoning are not the same thing; logical representation is a representation language, and reasoning is a logical thinking process.

2. Semantic Network Representation

For knowledge representation, semantic networks are an alternative to predicate logic. We can express our knowledge in Semantic Networks as graphical networks. This network is made up of nodes that represent things and arcs that describe their relationships. Semantic networks may classify objects in a variety of ways and link them together.

This representation consists of basically two types of relations:

  1. IS-A relation (Inheritance)
  2. Kind-of-relation

Example: Some statements which we have to represent in the form of nodes and arcs are as follows.

Statements:

  • Jerry is a cat.
  • Jerry is a mammal.
  • Jerry is owned by Priya.
  • Jerry is brown colored.
  • All Mammals are animal.
AI Techniques of Knowledge Representation2 in Artificial Intelligence (AI)

We've used nodes and arcs to represent different types of knowledge in the diagram above. Each object has some sort of relationship with another object.

Disadvantage in Semantic representation:

  • Because we need to traverse the entire network tree to answer some questions, semantic networks take longer to compute at runtime. In the worst-case situation, we may discover that the answer does not exist in this network after traversing the entire tree.
  • Semantic networks attempt to replicate human-like memory (which has 1015 neurons and linkages) in order to store information, however in actuality, such a large semantic network is impossible to construct.
  • These types of representations are insufficient since they lack an equivalent quantifier, such as all, some, none, and so on.
  • The link names in semantic networks are not defined in any way.
  • These networks aren't intelligent and rely on the system's inventor.

Advantages of Semantic network:

  • Semantic networks are a natural way to represent information.
  • Semantic networks are a transparent way of conveying meaning.
  • These networks are straightforward and simple to comprehend.

3. Frame Representation


A frame is a record-like structure that contains a set of properties and their values to describe a physical thing. Frames are a sort of artificial intelligence data structure that splits knowledge into substructures by depicting stereotyped situations. It is made up of a set of slots and slot values. These slots can come in any shape or size. Facets are the names and values assigned to slots.
Facets: Facets are the numerous aspects of a slot machine. Facets are characteristics of frames that allow us to constrain them. Example: When data from a specific slot is required, IF-NEEDED facts are used. A frame can have any number of slots, each of which can contain any number of facets, each of which can have any number of values.

Semantic networks gave rise to frames, which later evolved into our modern-day classes and objects. A single frame is of limited utility. A frames system is made up of a group of interconnected frames. Knowledge about an object or event can be kept in the knowledge base in the frame. The frame is a form of technology that can be used in a wide range of applications.

Example: 1

Let's take an example of a frame for a book

Slots Filter
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition PThird Edition
Year 1996
Page 1152

Example: 2

Let's pretend we're dealing with an entity, Peter. Peter is a professional engineer, and he is 25 years old. He lives in the city of London, in the country of England. The frame representation for this is as follows:

Slots Filter
Name Peter
Profession Doctor
Age 25
Marital Status Single
Year 1996
Weight 78

Advantages of frame representation:

  • By grouping related facts, the frame knowledge representation makes programming easier.
  • Many AI applications employ the frame representation because it is rather flexible.
  • Adding slots for additional attributes and relations is a breeze.
  • It's simple to add default data and look for missing variables.
  • The frame representation is simple to grasp and visualize.

Disadvantages of frame representation:

  • The inference mechanism in a frame system is difficult to process.
  • Frame representation does not allow for a smooth progression of the inference procedure.
  • The approach to frame representation is rather broad

4. Production Rules

Production rules system consists of (condition, action) pairs which means, "If condition then action". It has basically three parts:

  • The set of production rules
  • Working Memory
  • The recognize-act-cycled


The agent in production rules checks for the condition, and if it exists, the production rule fires and the appropriate action is taken. The rule's condition component determines which rule can be used to solve an issue. The action portion, on the other hand, is responsible for carrying out the corresponding problem-solving actions. A recognize-act cycle is the name given to the entire procedure.

Working memory stores a description of the present state of problem-solving, and rules can be used to write knowledge to it. Other rules may be triggered by this knowledge.

If a new scenario (state) arises, numerous production rules will be fired at the same time, which is known as a conflict set. In this case, the agent must choose a rule from among these sets, and it is called a recognize-act cycle.

Example:
IF (at bus stop AND bus arrives) THEN action (get into the bus)
IF (on the bus AND paid AND empty seat) THEN action (sit down).
IF (on bus AND unpaid) THEN action (pay charges).
IF (bus arrives at destination) THEN action (get down from the bus.

Advantages of Production rule:

  1. The production rules are written in plain English.
  2. We can quickly delete, add, or modify an individual rule because the production rules are relatively modular

Disadvantages of Production rule:

  1. The production rule system has no learning capabilities because it does not save the solution to the problem for future use.
  2. Many rules may be active during the execution of the program, making rule-based production systems inefficient.