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.
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.
·
There are mainly five types of knowledge.
· 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.
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.
Inference Engine: It is the engine of a knowledge-based system which allows to infer new knowledge in the system.
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.
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.
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:
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.
There are following two approaches used to design the behavior of a knowledge-based system: