250 likes | 510 Views
Intelligent Agent Framework. From Chapter 7 of Constructing Intelligent Agents with Java. Prologue. 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
E N D
Intelligent Agent Framework From Chapter 7 of Constructing Intelligent Agents with Java Intelligent Agent Framework
Prologue • 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. Intelligent Agent Framework
Requirements • 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 Intelligent Agent Framework
Design 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 interagent 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. Intelligent Agent Framework
Functional 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. Intelligent Agent Framework
Functional 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 to save it i a file and reload its state at a later time. Intelligent Agent Framework
Intelligent Agent Architecture • The basic idea is to take the function points in order and discuss the various issues and tradeoffs we must make • 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 Intelligent Agent Framework
Intelligent Agent Architecture • 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 agents. • High-level agents reuse other low-level agents • The BeanBox, part of the Bean Development Kit (BDK) provides a rudimentary, but effective, default graphical environment for working with Beans. Intelligent Agent Framework
Intelligent Agent Architecture • 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 Intelligent Agent Framework
Intelligent Agent Architecture • 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 Ch. 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. Intelligent Agent Framework
Intelligent Agent Architecture • The agent must be able to learn to do classification, clustering, and prediction using learning algorithms. • Use the DecisionTree, BackPropNet, and KMapNet classes developed in Ch. 5 for these purposes. • 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. Intelligent Agent Framework
Intelligent Agent Architecture • 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 Intelligent Agent Framework
The 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. Intelligent Agent Framework
The 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. Intelligent Agent Framework
CIAgent 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. Intelligent Agent Framework
CIAgent 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, Intelligent Agent Framework