0% found this document useful (0 votes)
45 views17 pages

AI Unit 5

The document discusses agents in artificial intelligence, including definitions of intelligent agents and their key components like sensors, actuators, and effectors. Rational agents are designed to maximize performance using reinforcement learning. The structure of AI agents includes the agent's architecture, function, and program. Different types of AI agents are discussed, along with multi-agent systems and expert systems.

Uploaded by

sonal raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views17 pages

AI Unit 5

The document discusses agents in artificial intelligence, including definitions of intelligent agents and their key components like sensors, actuators, and effectors. Rational agents are designed to maximize performance using reinforcement learning. The structure of AI agents includes the agent's architecture, function, and program. Different types of AI agents are discussed, along with multi-agent systems and expert systems.

Uploaded by

sonal raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Agents in Artificial Intelligence

An AI system can be defined as the study of the rational agent and its environment. The agents
sense the environment through sensors and act on their environment through actuators. An AI
agent can have mental properties such as knowledge, belief, intention, etc.

What is an Agent?

An agent can be anything that perceiveits environment through sensors and act upon that
environment through actuators. An Agent runs in the cycle of perceiving, thinking, and acting.
An agent can be:

o Human-Agent: A human agent has eyes, ears, and other organs which work for sensors
and hand, legs, vocal tract work for actuators.
o Robotic Agent: A robotic agent can have cameras, infrared range finder, NLP for
sensors and various motors for actuators.
o Software Agent: Software agent can have keystrokes, file contents as sensory input and
act on those inputs and display output on the screen.

Hence the world around us is full of agents such as thermostat, cellphone, camera, and even we
are also agents.

Before moving forward, we should first know about sensors, effectors, and actuators.Artificial
Intelligence designed to predict rainfall within two hours

Sensor: Sensor is a device which detects the change in the environment and sends the
information to other electronic devices. An agent observes its environment through sensors.

Actuators: Actuators are the component of machines that converts energy into motion. The
actuators are only responsible for moving and controlling a system. An actuator can be an
electric motor, gears, rails, etc.

Effectors: Effectors are the devices which affect the environment. Effectors can be legs, wheels,
arms, fingers, wings, fins, and display screen.
Intelligent Agents:

An intelligent agent is an autonomous entity which act upon an environment using sensors and
actuators for achieving goals. An intelligent agent may learn from the environment to achieve
their goals. A thermostat is an example of an intelligent agent.

Following are the main four rules for an AI agent:

o Rule 1: An AI agent must have the ability to perceive the environment.


o Rule 2: The observation must be used to make decisions.
o Rule 3: Decision should result in an action.
o Rule 4: The action taken by an AI agent must be a rational action.

Rational Agent:

A rational agent is an agent which has clear preference, models uncertainty, and acts in a way to
maximize its performance measure with all possible actions.

A rational agent is said to perform the right things. AI is about creating rational agents to use for
game theory and decision theory for various real-world scenarios.

For an AI agent, the rational action is most important because in AI reinforcement learning
algorithm, for each best possible action, agent gets the positive reward and for each wrong
action, an agent gets a negative reward.

Note: Rational agents in AI are very similar to intelligent agents.

Rationality:
The rationality of an agent is measured by its performance measure. Rationality can be judged on
the basis of following points:

o Performance measure which defines the success criterion.


o Agent prior knowledge of its environment.
o Best possible actions that an agent can perform.
o The sequence of percepts.

Note: Rationality differs from Omniscience because an Omniscient agent knows the actual
outcome of its action and act accordingly, which is not possible in reality.

Structure of an AI Agent

The task of AI is to design an agent program which implements the agent function. The structure
of an intelligent agent is a combination of architecture and agent program. It can be viewed as:

Agent = Architecture + Agent program

Following are the main three terms involved in the structure of an AI agent:

Architecture: Architecture is machinery that an AI agent executes on.

Agent Function: Agent function is used to map a percept to an action.

f:P* → A Agent program: Agent program is an implementation of agent function. An agent


program executes on the physical architecture to produce function f.

Types of AI Agents

Agents can be grouped into five classes based on their degree of perceived intelligence and
capability. All these agents can improve their performance and generate better action over the
time. These are given below:

o Simple Reflex Agent


o Model-based reflex agent
o Goal-based agents
o Utility-based agent
o Learning agent
We live in a time where pattern recognition AI is commonplace. All major websites on the
Internet use this technology with Google using it for its search algorithm. However, pattern
recognition is a basic application of AI which doesn’t justify what AI is supposed to be.
However, we’ve got to a point in AI’s life cycle where it is feasible to create a learning AI that
performs tasks according to everything it’s learned.

While learning AIs still seem like a futuristic concept, they are not. Many high-profile businesses
have already started applying it to their businesses. In essence, learning AI is just patterned AI
recording what it has predicted previously and applying it to a new problem. However, learning
AI brings a new aspect to artificial intelligence that has never been seen before. That aspect is
multi-agent systems.

Multiagent systems

Active research is currently underway in the field of building distributed control systems based
on the multiagent paradigm (Zhu et al., 2020). The basis of this paradigm is the idea of building
a management and decision-making system as a distributed community of “agents” who
independently make decisions and, if necessary, can use the “collective mind” to achieve their
goals under conditions of significant uncertainty.
The generalized architecture of a multiagent system is shown in Fig. 7.13. A multiagent system
includes two active agents that have the ability to analyze the state of the information field of a
distributed control object.
A feature of such an organization of the management system is that the agents are independent of
each other—each agent has its own goal. To achieve this goal, the agent uses information from
input sensors, and if necessary, can use actuators. To perform targeted actions, the agent uses the
built-in knowledge base and logical inference system. Agents, in the course of their activities,
using the communication channel and information exchange protocols, can exchange data,
knowledge, and control signals. In real applications, the number of agents is not limited.

What is a Multi-Agent System(MAS)?

A multi-agent system is simply is a form of M2M communication. To elaborate, a Multi-Agent


System is a loose ecosystem of various communicating Artificial Intelligences. It is essentially
the next iteration of agent-based systems.

Agent-Based systems(ABS) are communicating systems of distributed AI. They work by


communicating with each other on set rules and constraints to solve a common problem.
However, agent-based systems usually consist of one learning AI agent and other Pattern AIs or
simply is an ecosystem of connected Pattern AIs.

Multiple learning Agent AIs can exist in an agent-based but they never directly communicate
with each other. A multi-agent system, on the other hand, is an agent-based system that involves
direct communication between two or more sets of learning AIs with minimum rules.

This form of M2M communication allows learning AI to actually ‘communicate’ and solve
complex problems faster. There are various advantages of MAS over other forms of AI
ecosystems.

Advantages of a Multi-Agent System

 Decentralization

This is probably the greatest advantage of a multi-agent system. All agent-based systems are
constrained by rules which make centralize them and free communication between agents and
general Patter AI is usually not possible unless the learning agent AI has been designed to
counteract this.
The centralized system means that even if one AI system fails, the entire ecosystem will crash.
This is exactly why agent-based systems are designed to prevent direct communication between
agents. A MAS can prevent this from happening by making all agents independent of each other
and the failure of one agent doesn’t mean that the other will fail too. A failure in one agent would
simply mean that the communication lines between the agents would break and the surviving
agent would make decisions according to its algorithms.
 Interconnectibility
Once multi-agent systems are successfully applied, they can even communicate with legacy
systems and legacy systems could be connected to MAS ecosystems without major trouble. A
simple MAS ‘skin’ would help them communicate saving a lot of time and resources.
 Autonomous
ABS requires consistent human input to get the desired result whereas MAS systems can be
completely autonomous while communicating and generating results.
 Better Computing
Multi-Agent systems are relatively robust, reliable, efficient and provide better solutions than
agent-based systems. There is simply no competition for this technology in AI.
What are Expert Systems?
The expert systems are the computer applications developed to solve complex problems in a
particular domain, at the level of extra-ordinary human intelligence and expertise.
Characteristics of Expert Systems
 High performance
 Understandable
 Reliable
 Highly responsive

Capabilities of Expert Systems

The expert systems are capable of −


 Advising
 Instructing and assisting human in decision making
 Demonstrating
 Deriving a solution
 Diagnosing
 Explaining
 Interpreting input
 Predicting results
 Justifying the conclusion
 Suggesting alternative options to a problem
They are incapable of −
 Substituting human decision makers
 Possessing human capabilities
 Producing accurate output for inadequate knowledge base
 Refining their own knowledge

Components of Expert Systems

The components of ES include −


 Knowledge Base
 Inference Engine
 User Interface
Let us see them one by one briefly −

Knowledge Base

It contains domain-specific and high-quality knowledge.


Knowledge is required to exhibit intelligence. The success of any ES majorly depends upon the
collection of highly accurate and precise knowledge.
What is Knowledge?
The data is collection of facts. The information is organized as data and facts about the task
domain. Data, information, and past experience combined together are termed as knowledge.
Components of Knowledge Base
The knowledge base of an ES is a store of both, factual and heuristic knowledge.
 Factual Knowledge − It is the information widely accepted by the Knowledge Engineers
and scholars in the task domain.
 Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of
evaluation, and guessing.
Knowledge representation
It is the method used to organize and formalize the knowledge in the knowledge base. It is in the
form of IF-THEN-ELSE rules.
Knowledge Acquisition
The success of any expert system majorly depends on the quality, completeness, and accuracy of
the information stored in the knowledge base.
The knowledge base is formed by readings from various experts, scholars, and the Knowledge
Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning,
and case analyzing skills.
He acquires information from subject expert by recording, interviewing, and observing him at
work, etc. He then categorizes and organizes the information in a meaningful way, in the form of
IF-THEN-ELSE rules, to be used by interference machine. The knowledge engineer also
monitors the development of the ES.

Inference Engine

Use of efficient procedures and rules by the Inference Engine is essential in deducting a correct,
flawless solution.
In case of knowledge-based ES, the Inference Engine acquires and manipulates the knowledge
from the knowledge base to arrive at a particular solution.
In case of rule based ES, it −
 Applies rules repeatedly to the facts, which are obtained from earlier rule application.
 Adds new knowledge into the knowledge base if required.
 Resolves rules conflict when multiple rules are applicable to a particular case.
To recommend a solution, the Inference Engine uses the following strategies −
 Forward Chaining
 Backward Chaining
Forward Chaining
It is a strategy of an expert system to answer the question, “What can happen next?”
Here, the Inference Engine follows the chain of conditions and derivations and finally deduces
the outcome. It considers all the facts and rules, and sorts them before concluding to a solution.
This strategy is followed for working on conclusion, result, or effect. For example, prediction of
share market status as an effect of changes in interest rates.

Backward Chaining
With this strategy, an expert system finds out the answer to the question, “Why this
happened?”
On the basis of what has already happened, the Inference Engine tries to find out which
conditions could have happened in the past for this result. This strategy is followed for finding
out cause or reason. For example, diagnosis of blood cancer in humans.

User Interface

User interface provides interaction between user of the ES and the ES itself. It is generally
Natural Language Processing so as to be used by the user who is well-versed in the task domain.
The user of the ES need not be necessarily an expert in Artificial Intelligence.
It explains how the ES has arrived at a particular recommendation. The explanation may appear
in the following forms −
 Natural language displayed on screen.
 Verbal narrations in natural language.
 Listing of rule numbers displayed on the screen.
The user interface makes it easy to trace the credibility of the deductions.
Requirements of Efficient ES User Interface
 It should help users to accomplish their goals in shortest possible way.
 It should be designed to work for user’s existing or desired work practices.
 Its technology should be adaptable to user’s requirements; not the other way round.
 It should make efficient use of user input.

Expert Systems Limitations

No technology can offer easy and complete solution. Large systems are costly, require
significant development time, and computer resources. ESs have their limitations which include

 Limitations of the technology
 Difficult knowledge acquisition
 ES are difficult to maintain
 High development costs

Applications of Expert System

The following table shows where ES can be applied.

Application Description

Design Domain Camera lens design, automobile design.

Diagnosis Systems to deduce cause of disease from observed data,


Medical Domain
conduction medical operations on humans.

Comparing data continuously with observed system or with prescribed


Monitoring Systems
behavior such as leakage monitoring in long petroleum pipeline.

Process Control Systems Controlling a physical process based on monitoring.

Knowledge Domain Finding out faults in vehicles, computers.

Detection of possible fraud, suspicious transactions, stock market


Finance/Commerce
trading, Airline scheduling, cargo scheduling.
Expert System Technology

There are several levels of ES technologies available. Expert systems technologies include −
 Expert System Development Environment − The ES development environment includes
hardware and tools. They are −
o Workstations, minicomputers, mainframes.
o High level Symbolic Programming Languages such as LISt Programming (LISP)
and PROgrammation en LOGique (PROLOG).
o Large databases.
 Tools − They reduce the effort and cost involved in developing an expert system to large
extent.
o Powerful editors and debugging tools with multi-windows.
o They provide rapid prototyping
o Have Inbuilt definitions of model, knowledge representation, and inference design.
 Shells − A shell is nothing but an expert system without knowledge base. A shell provides
the developers with knowledge acquisition, inference engine, user interface, and
explanation facility. For example, few shells are given below −
o Java Expert System Shell (JESS) that provides fully developed Java API for
creating an expert system.
o Vidwan, a shell developed at the National Centre for Software Technology, Mumbai
in 1993. It enables knowledge encoding in the form of IF-THEN rules.

Expert System Shells

Expert system shells are toolkits that can be used to develop expert systems. They consist of some
built expert system components with an empty knowledge base. Hence, in most cases, the
knowledge engineer is left with only populating the knowledge base. It is essentially a special-
purpose tool that is built-in in line with the requirements and standards of a particular domain or
expert-knowledge area applications. It may be defined as a software package that facilitates the
building of knowledge-based expert systems by providing a knowledge representation scheme
and an inference engine.

Difference ES shells offer various ways to model the knowledge into the knowledge base. They
are

1. as rules
Knowledge is populated using rules. These rules can be programmed by Prolog, Java, Python or
any other preferred language based on the expert system shell being used
2. in the form of a decision tree

Figure 02: A tree-based expert system created based on the rules mentioned above
( Source: Created by Author)

3. as objects (frames) — A data structure with typical knowledge about a particular object or
concept.

ES shell is an ideal option for the rapid development of expert systems. Due to this reason, it can
be considered as one of the most commercially viable approaches in expert system
implementation.

3. Expert System Shell Structure

The Expert System Shell refers to a software module containing an:

1. User interface (built-in)


2. Inference engine (built-in)

3. A structured skeleton of a knowledge base (in its empty state) with the suitable knowledge
representation facilities

Not only the above components but also some ES Shells provide facilities for database
connectivity through interpreter, web integration, and natural language processing (NLP) features.

Figure 03: Illustration by Author (Reference: Expert System Architecture (tripod.com))

The user interface is the portal available for both end-users (who use the expert system to get
solutions) and the knowledge engineer (who perform the knowledge engineering and modelling).

The knowledge base can be connected with an external database (like MySQL) since the
knowledge base is not optimal in storing extensive data. The knowledge base cannot directly
access the database and these access features are mediated through an interpreter.

Some ES Shells have inbuilt knowledge base editors which facilitate the Knowledge Engineer to
easily update and check the knowledge base. Knowledge Engineer collects the expertise
knowledge in a specific domain and models in populating the knowledge base.
Inference engine which is the most important part of an expert system access the knowledge base
and solves the problem by either backward chaining or forward chaining of facts and rules in the
knowledge base. In ES Shells, the inference engine is also a built-in component that is usually
programmed in ProLog.

Most ES shells are composed of another component called ‘Explanation System’ which provides
the user with reasons and explanations to provide a certain answer, by considering the ‘case
specification data’ available.

In an expert system shell, the design of the user interface and other software components are
programmed by the software engineer. Therefore an expert system is a collaborative design of 03
major parties: expert, knowledge engineer and software engineer. (Depending on the size these
parties may vary from individuals to large teams)

4. Popular Expert System shells

Following are a few examples of expert systems available for developers to build expert systems
at various scales. Depending on the ES Shell there are various pros and cons associated with each
shell.

4.1 ES-Builder

ES Builder stands for Expert System Builder. It is one of the most famous Expert System Shell. It
is a free ES shell that is implemented especially for students and researchers to develop expert
system shells. The shell consists of an improved web interface built using the AJAX framework.
The ES-Builder stores the facts and rules of the knowledge base in an online MySQL database.
There is a built-in inference engine (written in Prolog)and user interfaces are developed using
simple HTML and CSS. The database connectivity is maintained to access the knowledge base
using PHP.

The rule base knowledge base can also be developed using a decision tree that consists of
attributes, values and conclusions.

 Attribute: Attributes are characteristics of possible conclusions that are to be tested in the
ES.
 Value: Each Value node represents the most correct response to an Attribute for a particular
conclusion.

 Conclusion: The final decision made based on the attributes and values is the conclusion.

Benefits of ES Builder:

 Autogenerated User Interfaces (Simple HTML CSS design of the user interface)

 Ability to create backup files of the knowledge base and easy integration with MYSQL
database.

 Ability populates the knowledge base using the decision tree.

 Optimized view of the rule-based knowledge base.

Limitations of ES-Builder:

 Only forward chaining rules are supported backward chaining rules are not supported.

 Desktop tools support only Windows 98 & Windows 7.

4.2 CLIPS

CLIPS stands for C-Language Integrated Production System. As the meaning suggests the CLIPS
expert system shell is written in the procedural langue C. CLIPS was developed in 1985 at
NASA’s Johnson Space Center. It is a rule-based programming language that is used for creating
an expert system. CLIPS are used in systems where the heuristic solution is easier to implement
and maintain than a traditional algorithmic approach.

CLIPS provides 03 different tools for knowledge representation in the form of programming
methodologies/ programming paradigms. The 03 methods are:

 Procedural

 Object-oriented

 Rule-based programming
Since the CLIPS is written in C language, the expert system developed by CLIPS requires ANSI
compiler also. Since the systems that already have the ANSI compiler can easily run the expert
system without changing the source code.

Benefits of CLIPS:

 Can be easily embedded in other subroutines made in procedural languages to extend the
existing functionality.

 Support the methods like fuzzy logic and agents.

Limitations of CLIPS:

 Support only forward chaining rules but does not support backward chaining rules.

4.3 JESS

JESS stands for Java Expert System Shell. JESS is another expert system shell and a scripting
language that is completely written by Java programming language. JESS is heavily used to build
rule-based expert systems which is tightly linked to systems that are written on Java. The expert
systems built by using JESS can be either run on command-line interface or can be used as an
Applet.

JESS based expert systems are widely used as intelligent agents, in enterprise resource planning
systems, and in order validation of eCommerce platforms.

Benefits of JESS:

 Better to be applied in bigger problems where performance is dominated by algorithm


quality.

 Include backward chaining and working memory queries.

 Faster than the expert systems developed using expert system shells written on C language.

 Contains some commands which allow less memory usage when executing the system.
Limitations of JESS:

 Some capabilities are limited when used in Browser.

You might also like