Knowledge-Based Agent in Artificial Intelligence

Learn via video courses
Topics Covered

Overview

Artificial Intelligence (AI) is one of the most rapidly developing fields in computer science, with knowledge-based agents being one of the most important components of AI. Knowledge-based agents are artificial intelligence systems that use knowledge to perform their tasks. They are composed of two main parts, a knowledge base, and an inference system, and they operate by making deductions, decisions, and conclusions based on the available knowledge.

Introduction

Knowledge-based agents are artificial intelligence systems that use knowledge to perform their tasks. For example, they make deductions, decisions, and conclusions based on available knowledge. Knowledge-based agents are essential in several fields, including medicine, engineering, and finance, where they are used to solve complex problems.

Knowledge-Based Agents are Composed of Two Main Parts

Knowledge-Base

The knowledge base of a knowledge-based agent is a collection of knowledge that the agent uses to make decisions. The knowledge can be explicit, such as rules or facts, or implicit, such as relationships or patterns. The knowledge base is stored in a database or a knowledge representation system.

Inference System

The inference system of a knowledge-based agent is responsible for using the knowledge in the knowledge base to make decisions. The inference system uses reasoning methods, such as deduction, induction, and abduction, to infer new knowledge from existing knowledge.

The Architecture of Knowledge-Based Agent

The diagram below depicts a general architecture for a knowledge-based agent (KBA):

The KBA receives input from the environment through perception, which the inference engine processes.

The inference engine communicates with the knowledge base (KB) to determine the appropriate action based on the knowledge stored in the KB.

The learning element of the KBA regularly updates the KB by incorporating new knowledge.

kba architecture

The KB is a central component of the KBA, consisting of a collection of sentences expressed in a knowledge representation language. These sentences represent facts about the world and are stored in the KB for the KBA to access and utilize. It is important to note that the term "sentence" used here is a technical term and does not refer to a grammatically correct sentence in English.

Why Use a Knowledge Base?

A knowledge base is used in a knowledge-based agent to provide a structured way to store and retrieve information. The knowledge base allows the agent to make decisions based on available knowledge rather than relying on hard-coded rules. Additionally, the knowledge base can be updated as new information becomes available, making the agent more adaptable to changing situations.

Inference System

The inference system of a knowledge-based agent is responsible for using the knowledge in the knowledge base to make decisions. The inference system uses reasoning methods, such as deduction, induction, and abduction, to infer new knowledge from existing knowledge.

Generating new facts by the inference system allows the agent to update its knowledge base. The inference system operates primarily through two rules, which are referred to as forward chaining and backward chaining.

Operations Performed by KBA

operations chart

There are three main operations that a knowledge-based agent (KBA) performs to demonstrate intelligent behavior. The first operation is called TELL, where the KBA informs the knowledge base about the information it has perceived from the environment.

The second operation is called ASK, where the KBA requests the knowledge base to suggest appropriate action.

The third operation is PERFORM, where the KBA executes the selected action.

The Structure Outline of a Generic Knowledge-Based Agents Program

Below is the structure outline of a generic knowledge-based agents program:

The knowledge-based agent receives a percept and produces an action as output. The agent is equipped with a knowledge base (KB) with background knowledge of the real world. Additionally, the agent has a time counter initially set to zero, indicating the time elapsed during the process.

Each time the function is executed, the agent performs three operations:

  • Firstly, it reports to the KB what it has perceived.
  • Secondly, it asks the KB what action it should take.
  • Thirdly, it reports to the KB which action it has chosen.

The MAKE-PERCEPT-SENTENCE generates a sentence that indicates that the agent perceived the given percept at the given time.

The MAKE-ACTION-QUERY generates a sentence that asks which action should be taken at the current time.

The MAKE-ACTION-SENTENCE generates a sentence that asserts that the chosen action has been executed.

Various Levels of Knowledge-Based Agent

Knowledge-based agents can be classified into three levels:

Knowledge Level

The knowledge level is the highest level of abstraction in a knowledge-based agent. It describes what the agent knows and how it uses it to perform tasks. The knowledge level concerns the representation and organization of knowledge rather than the implementation details.

Logical Level

The logical level is the intermediate level of abstraction in a knowledge-based agent. It describes how the knowledge is represented and manipulated by the inference engine. The logical story concerns the formal logic used to represent knowledge and make inferences.

Implementation Level

The implementation level is the lowest level of abstraction in a knowledge-based agent. It describes how the knowledge and inference engine is implemented using a programming language. The implementation level is concerned with the details of the programming language and the algorithms used to implement the knowledge and inference engine.

Approaches to Designing a Knowledge-Based Agent

There are two main approaches to designing a knowledge-based agent:

Declarative Approach

The declarative approach to designing a knowledge-based agent focuses on representing knowledge in a declarative form, such as rules or facts. The knowledge is represented independently of the algorithms used to manipulate it.

Procedural Approach

The procedural approach to designing a knowledge-based agent focuses on representing knowledge in a procedural form, such as a sequence of instructions. The knowledge is represented in terms of the algorithms used to manipulate it. The inference engine uses these algorithms to make inferences from the knowledge.

Conclusion

  • Knowledge-based agents are vital components of AI systems, using knowledge to perform tasks and make decisions based on available information.
  • Knowledge-based agents consist of a knowledge base containing the agent's knowledge and an inference system that uses the knowledge to make decisions.
  • Operations performed by knowledge-based agents include deduction, decision-making, and conclusion-drawing based on available knowledge.
  • Knowledge-based agents perform several functions, including knowledge acquisition, representation, inference, explanation, and learning.
  • Design knowledge-based agents can be achieved through either declarative or procedural approaches.