Top Banner
Intelligent Agent Framework 1 Intelligent Agent Intelligent Agent Framework Framework From Chapter 7 of Constructing Intelligent Agents with Java
22

Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Jan 17, 2016

Download

Documents

Rudolf Jordan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 1

Intelligent Agent FrameworkIntelligent Agent Framework

From Chapter 7 of Constructing Intelligent Agents with Java

Page 2: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 2

ProloguePrologue

• Developing an intelligent agent architecture using object-oriented techniques

• Starting with a generic set of requirements and then refining them into a set of specifications

• Explicitly stating design philosophy and goals• Exploring

– how intelligent agents can be used to expand the capabilities of traditional applications and

– how they can serve as the controller for a group of applications

• With minor modifications, we reuse the AI functions we developed in Java previously.

Page 3: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 3

RequirementsRequirements

• Developing intelligent agents using Java

• Providing the ability to add intelligence to application or applets written in Java

• Reusing the AI code developed previously

• Be practical– not product-level code, but applicable to solving real-world problems

• Maximizing the amount of code dealing with IAs, and minimizing the code not directly related to the topic

• Using the features and capabilities in Java

• Providing decent user interface

• “Keep it simple, stupid.”

• Flexible enough to support various applications

Page 4: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 4

Design GoalsDesign Goals

• Fundamental issues driving our design– application-centric view of agents– agent-centric view of agents

• Easily understood and straightforward to use• We will construct the agent framework so that interag

ent communication can be supported as well as the mobility of our agents across networks.

• Flexibility also includes the ability to easily add support for new applications, AI techniques and other features.

Page 5: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 5

Functional SpecificationsFunctional Specifications

• It must be easy to add an intelligent agent to an existing Java application

• A graphical construction tool must be available to compose agents out of other Java components and other agents.

• The agents must support a relatively sophisticated event-processing capability.– Our agents will need to handle events from the outside

world, other agents, and signal events to outside applications.

Page 6: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 6

Functional SpecificationsFunctional Specifications

• We must be able to add domain knowledge to our agent using if-then rules, and support forward and backward rule-based processing with sensors and effectors.

• The agents must be able to learn to do classification, clustering, and prediction using learning algorithm.

• Multiagent applications must be supported using a KQML-like message protocol.

• The agent should be persistent.– That is, once an agent is constructed, there must be a way t

o save it i a file and reload its state at a later time.

Page 7: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 7

Intelligent Agent ArchitectureIntelligent Agent Architecture

• The basic idea is to take the function points in order and discuss the various issues and tradeoffs we must make

1. It must be easy to add an intelligent agent to an existing Java application.– The easiest way is to have the application instantiate and configure

the agent and then call the agent’s methods as service routines.• Embedded intelligence, no autonomy

– Have the application instantiate and configure the agent and then start it up in a separate thread

• some autonomy, although in the application’s process space

– Have the agent run in a separate thread, but use events to communicate between the application and agent.

• Observer/Observable framework in Java

Page 8: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 8

Intelligent Agent ArchitectureIntelligent Agent Architecture

2. A graphical construction tool must be available to compose agents out of other Java components and other agents.– Graphical development tools, such as Symantec Visual Café, IBM’

s VisualAge for Java, Inprise JBuilder, etc.– JDK 1.1, java.bean package

• allowing software functions to be treated as “part” which can be put together to construct an application

– Beans can be nested.• Meet our requirement for the ability to compose agents out of other ag

ents.• High-level agents reuse other low-level agents• The BeanBox, part of the Bean Development Kit (BDK) provides a ru

dimentary, but effective, default graphical environment for working with Beans.

Page 9: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 9

Intelligent Agent ArchitectureIntelligent Agent Architecture

3. The agents must support a relatively sophisticated event-processing capability. Our agent will need to handle events from the outside world, other agents, and signal events to autside applications.– Delegation Event Model of event-processing model of JDK 1.1

Page 10: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 10

Intelligent Agent ArchitectureIntelligent Agent Architecture

4. We must be able to add domain knowledge to our agent using if-then rules, and support forward and backward rule-based processing with sensors and effectors.– The RuleBase, Rule, and RuleVariable classes we developed in C

h. 4 can be used in our agents to provide forward and backward rule-based inferencing.

– Will extend the functionality to support sensors and effectors.

– The main reason for this functionality is to provide a nonprogramming way for users to specify conditions and actions.

Page 11: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 11

Intelligent Agent ArchitectureIntelligent Agent Architecture

5. The agent must be able to learn to do classification, clustering, and prediction using learning algorithms.– Use the DecisionTree, BackPropNet, and KMapNet classes develo

ped in Ch. 5 for these purposes.

6. Multiagent applications must be supported using a KQML-like protocol.– Need a facilitator (or matchmaker) agents.

• Use the existing rule capabilities to help provide this function, if possible.

– Use the JavaBean event model to provide the communication mechanism between agents and the facilitator and define our own event objects to hold the message content.

Page 12: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 12

Intelligent Agent ArchitectureIntelligent Agent Architecture

3. The agent should be persistent. That is once an agent is constructed, there must be a way to save it in a file and reload its state at a later time.– JDK 1.1, the serialization of Java objects

Page 13: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 13

The CIAgent FrameworkThe CIAgent Framework

• We are going to construct our intelligent agents so that they can interact with the JavaBeans component model.

• Meet most of our functional specification.

Page 14: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 14

The CIAgent Base ClassThe CIAgent Base Class

• CIAgent is the name of the base classes which defines – a common programming interface and

– behavior for all agents in our framework.

• In terms of design pattern, CIAgent uses a composite design.– We can use a single CIAgent or

– compose them into groups, and still treat the group as if it was a single logical CIAgent object.

• This design patter is very powerful because it allows us to build up a hierarchy of CIAgent using other specialized CIAgent classes in the process.

Page 15: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 15

Page 16: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 16

Page 17: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 17

Page 18: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 18

Page 19: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 19

CIAgent Base Class – Runnable interfaceCIAgent Base Class – Runnable interface

• The CIAgent class implements the Runnable interface, which requires that our CIAgent subclass provide a run() method which can serve as the body of a Thread.

• This is the mechanism to give our agent autonomy.

Page 20: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 20

CIAgent Base Class – CIAEventListnerCIAgent Base Class – CIAEventListner

• To communicate with other CIAgents abd other JavaBeans, we implement the CIAgentEventListner interface.

• It extends the standard Java EventListner interface used by all AWT components and JavaBeans,

Page 21: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 21

Page 22: Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.

Intelligent Agent Framework 22