×

Knowledge Based Agents in AI

Knowledge is the basic element for a human brain to know and understand the things logically. When a person becomes knowledgeable about something, he is able to do that thing in a better way. In AI, the agents which copy such an element of human beings are known as knowledge-based agents.

 What is Logic?

Logic is the key behind any knowledge. It allows a person to filter the necessary information from the bulk and draw a conclusion. In artificial intelligence, the representation of knowledge is done via logics.

There are three main components of logic, which are as follows:

  • Syntax: It is the sequence of a specific language which should be followed in order to form a sentence. Syntax is the representation of a  language. Every language has its own syntax.
  • For example, ax2+bx+c is a well-formed syntax of a quadratic equation.
  • Semantics: The sentence or the syntax which a logic follows should be meaningful. Semantics defines the sense of the sentence which relates to the real world.

For example, Indian people celebrate Diwali every year. This sentence represents the true fact about the country and its people who are Indians. Therefore, the sentence is syntactically as well as semantically correct.

  • Logical Inference: Inference means to infer or draw some conclusions about some fact or a problem. Logical inference is thinking all the possible reasons which could lead to a proper result. Inference algorithms are used to perform logical inference.

Types of Knowledge

There are mainly five types of knowledge.

Knowledge Based Agents in AI
  • Meta Knowledge: It is the information/knowledge about knowledge.
  • Heuristic Knowledge: It is the knowledge regarding a specific topic.
  • Procedural Knowledge: It gives information about achieving something.
  • Declarative Knowledge: It is the information which describes a particular object and its attributes.
  • Structural Knowledge: It describes the knowledge between the objects.

Knowledge-based agents

So far we have studied about intelligent agents which acquire knowledge about the world to make better decisions in the real world. Knowledge-based agent uses some task-specific knowledge to solve a problem efficiently.

 A knowledge-based system comprises of two distinguishable features which are:

  • A Knowledge base
  • An Inference Engine

Knowledge base: A Knowledge base represents the actual facts which exist in the real world. It is the central component of a knowledge-based agent. It is a set of sentences which describes the information related to the world.

Note: Here, a sentence is not an English language sentence, but it is represented in a language known as Knowledge representation language.

Inference Engine: It is the engine of a knowledge-based system which allows to infer new knowledge in the system.

Actions of an agent

When there is a need to add/ update some new information or sentences in the knowledge-based system, we require an inference system. Also, to know what information is already known to the agent, we require the inference system. The technical words used for describing the mechanism of the inference system are: TELL and ASK. When the agent solves a problem, it calls the agent program each time. The agent program performs three things:

  1. It TELLS the knowledge base what it has perceived from the environment.
  2. It ASKS the knowledge base about the actions it should take?
  3. It TELLS the action which is chosen, and finally, the agent executes that action.
Knowledge Based Agents in AI 1

The details of the knowledge representation language are abstracted under these three functions. These functions create an interface between the two main components of an intelligent agent, i.e., sensors and actuators.

Knowledge Based Agents in AI 2

 The functions are discussed below:

  • MAKE-PERCEPT-SENTENCE()

This function returns a sentence which tells the percieved information by the agent at a given time.

  • MAKE-ACTION-QUERY()

This function returns a sentence which tells what action the agent must take at the current time.

  • MAKE-ACTION-SENTENCE()

This function returns a sentence which tells an action is selected as well as executed.

Let’s understand the working of these functions under the Inference engine with the help of the below function:

functionKB-AGENT(percept ) returnsan action
persistent: KB, a knowledge base
t, a counter, initially 0, indicating time
TELL(KB,MAKE-PERCEPT-SENTENCE(percept , t ))
action ?ASK(KB,MAKE-ACTION-QUERY(t ))
TELL(KB,MAKE-ACTION-SENTENCE(action, t ))
t ?t + 1
return action 

Levels of a Knowledge-based agent

  • Knowledge Level: In this level, the behavior of an agent is decided by specifying the following :
    • The agent’s current knowledge it has percieved.
    • The goal of an agent.
  • Implementation Level: This level is the physical representation of the knowledge level. Here, it is understood that “how the knowledge-based agent actually implements its stored knowledge.”

For example, Consider an automated air conditioner. The inbuilt knowledge stored in its system is that “ It would adjust its temperature according to the weather.” This represents the knowledge level of the agent. The actual working and its adjustment define the implementation level of the knowledge-based agent.

Approaches used to build a Knowledge-based agent

There are following two approaches used to design the behavior of a knowledge-based system:

  • Declarative Approach: Feeding the necessary information in an empty knowledge-based system. Such type of approach is used to design a knowledge-based system. The agent designer TELLS sentences to the empty system one by one until the system becomes knowledgeable enough to deal with the environment.
  • Procedural Approach: In this approach, knowledge is stored into an empty system in the form of program code. It is a contrasting approach to the declarative approach. It designs the behavior of the system via coding.

Note: In the 1970's and 1980's, a team debate led to the combination of the above two mentioned approaches to build a successful knowledge-based agent.


Related Topics

Adversarial Search in Artificial Intelligence

AI Adversarial search: Adversarial search is a game-playing technique where the agents are surrounded by a competitive environment. A conflicting goal is given to the agents (multiagent). These agents compete...

3 minutes read.

Artificial Intelligence Tutorial | AI Tutorial

Today, Artificial Intelligence (AI) has become the norm of how humans communicate with and understand technology. Even though you've been hearing this buzzword now and then, do you know what...

6 minutes read.

Alpha-beta Pruning | Artificial Intelligence

Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the...

3 minutes read.

Informed Search/ Heuristic Search in AI

An informed search is more efficient than an uninformed search because in informed search, along with the current state information,  some additional information is also present, which make it easy to reach the...

6 minutes read.

Dynamic Routing

Dynamic Routing Dynamic routing is used to update the routing table and find networks on the routers. It is easier than static routing and default routing, but it is more expensive in terms of...

3 minutes read.

5 algorithms that demonstrate artificial intelligence bias

Unfortunately, in the machine learning algorithm, AI bias is the output due to the prejudiced assumption made due to the algorithm development process. AI systems have biases due to the...

3 minutes read.

The Wumpus World

The Wumpus world is a game playing which provides an environment to the knowledge-based agent to showcase its stored knowledge. It was developed by Gregory Yob in 1973. About the game:  It...

3 minutes read.

What is Artificial Super Intelligence (ASI)

Before starting with Artificial Super Intelligence, first, we have to know what Artificial Intelligence is. Artificial Intelligence is a field which has a long history. Artificial intelligence is the ability...

3 minutes read.

Propositional Logic

It is a branch of logic which is also known as statement logic, sentential logic, zeroth-order logic, and many more. It works with the propositions and its logical connectivities. It deals with the...

5 minutes read.

Resolution Method in AI

Resolution Method in AI Resolution method is an inference rule which is used in both Propositional as well as First-order Predicate Logic in different ways. This method is basically used for proving the...

5 minutes read.

Utility Functions in Artificial Intelligence

The agents use the utility theory for making decisions. It is the mapping from lotteries to the real numbers. An agent is supposed to have various preferences and can choose the one...

3 minutes read.

Gradient Descent

Gradient Descent When training a neural network, an algorithm is used to minimize the loss. This algorithm is called as Gradient Descent. And loss refers to the incorrect outputs given by...

6 minutes read.

Supervised Learning in AI

Supervised Learning in AI Learning Supervised LearningClassification TasksNearest Neighbor ClassificationK nearest neighbor AlgorithmPerceptron LearningSupport Vector MachineRegression TasksLoss FunctionOverfittingRegularizationScikit LearnK Nearest Neighbor ImplementationPerceptron Algorithm ImplementationSupport Vector Machine Algorithm ImplementationRegression Implementation Machine Learning In the Artificial...

33 minutes read.

Local Search Algorithms and Optimization Problem

The informed and uninformed search expands the nodes systematically in two ways: keeping different paths in the memory and selecting the best suitable path, Which leads to a solution state required to reach the goal...

2 minutes read.

Integration of Blockchain and Artificial Intelligence

A Blockchain is a shared database or ledger where pieces of data are stored in data structures known as blocks. So, we can say that Blockchain is the distribution storage...

6 minutes read.

Uninformed Search Strategies - Artificial Intelligence

Breadth-first search (BFS) It is a simple search strategy where the root node is expanded first, then covering all other successors of the root node, further move to expand the next...

8 minutes read.

Cryptarithmetic Problem in AI

Cryptarithmetic Problem Cryptarithmetic Problem is a type of constraint satisfaction problem where the game is about digits and its unique replacement either with alphabets or other symbols. In cryptarithmetic problem, the...

3 minutes read.

Knowledge Representation in AI

In this section, we will understand how to represent the knowledge in the form which could be understood by the knowledge-based agents. The knowledge that is stored in the system is related to...

5 minutes read.

Probabilistic Reasoning

Probabilistic Reasoning Probabilistic Reasoning is the study of building network models which can reason under uncertainty, following the principles of probability theory. Bayesian Networks Bayesian network is a data structure which is used to represent the dependencies among variables....

7 minutes read.

Information Retrieval

Information Retrieval: In order to analyze and categorize the text, we'd like to be able to figure out information about the text, some meaning about the text as well. And,...

14 minutes read.