Constructing Intelligent Agents with Java: A Programmer's Guide to Smarter Applications

Internet Research

ISSN: 1066-2243

Article publication date: 1 December 1998

341

Keywords

Citation

Crowston, K. (1998), "Constructing Intelligent Agents with Java: A Programmer's Guide to Smarter Applications", Internet Research, Vol. 8 No. 5. https://doi.org/10.1108/intr.1998.17208eaf.008

Publisher

:

Emerald Group Publishing Limited

Copyright © 1998, MCB UP Limited


Constructing Intelligent Agents with Java: A Programmer's Guide to Smarter Applications

Constructing Intelligent Agents with Java: A Programmer's Guide to Smarter Applications

J.P. Bigus and J. Bigus1998John Wiley & SonsNew York, NY379 pp.ISBN 0-471-19135-3.Available from John Wiley & Sons Inc., Professional, Reference and Trade Group, 605, Third Avenue, New York, NY 10158-0012. Tel: +1 (800) 879-4539$44.99

Keywords Artificial intelligence, Computer languages, Computer programming

Java and agents are two of the biggest technology buzzwords on the Internet, and this book targets both. Interestingly, despite the high buzzword quotient, the book provides a useful introduction to an important topic, though it promises more than it actually delivers. The authors' goal is to help readers write programs that behave more intelligently. In the first half of the book, they provide a general introduction to the techniques of artificial intelligence. In the second half, they present an intelligent agent framework along with several applications.

Chapters 2-6 introduce key techniques in artificial intelligence. Each chapter briefly introduces the key ideas in one area, presents one or two approaches in detail and concludes by briefly discussing one or two additional topics. Each chapter includes a summary and a few exercises, reflecting a suggested use as a textbook.

Chapter 2 addresses problem solving using search. The authors present the idea of a search space and show how search through the space can solve problems. They then describe different search strategies (breadth-first, depth-first, etc.) and their trade-offs. These strategies are illustrated by an example applet that searches for a path through a network of cities. This example has the advantage of having clear states (cities) and transitions (roads), but the general applicability of search as a problem-solving technique would have been clearer if the authors had shown how a more abstract problem could be represented.

Chapter 3, on knowledge representation, briefly covers the use of predicate logic, frames and semantic nets. The book illustrates the use of resolution and unification to carry out reasoning with logic statements. Certainty factors and Bayes theorem are also briefly introduced. The chapter concludes by introducing the Knowledge Interchange Format (KIF) and discussing the problems of building up a knowledge base.

Chapter 4 continues the discussion of the use of knowledge by considering how a program could reason about knowledge represented by rules. Forward and backward chaining (i.e. reasoning from the facts to a desired conclusion or from the desired conclusion back to the facts) are introduced, and examples of each are given. The authors present example code for a rule-based reasoner, demonstrating the design of each class in the system. In my opinion, this example illustrates the disadvantage of using Java (or indeed, any strongly typed procedural language) for writing rule-based programs ­ the necessary declarations and data structure accessors make it hard to see the underlying structure of the rule set. Conversely, it is certainly the case that the resulting Java applet is much more portable than a program written in OPS5 (an earlier forward-chaining programming language). The chapter concludes by briefly discussing fuzzy rule systems and planning.

Chapter 5 discusses how systems could learn from experience. The chapter starts by discussing several different types of machine learning and approaches to learning. Two non-symbolic learning techniques are discussed in detail:

  1. 1.

    neural networks; and

  2. 2.

    decision trees.

Again, an example applet is presented in some detail. The chapter concludes by discussing yet another approach to learning, namely genetic algorithms.

Chapter 6 explores the relationship between artificial intelligence and intelligent agents. The chapter shows how the ideas presented in earlier chapters ­ knowledge representation, reasoning and learning ­ can be used to make an autonomous agent intelligent. Also discussed are issues in multi-agent systems: ways of sharing information, such as a blackboard system or the Knowledge Query and Manipulation Language (KQML), and co-operating versus competing agents.

The level of these introductory chapters is basic. The primary purpose is to develop ideas and code for use in later chapters. However, the decision to present a working example means that only a few ideas can be developed in detail. Other topics are introduced, but only briefly. As a result, the coverage of topics is probably insufficient for a general course on artificial intelligence, though it might suffice for one primarily on agents.

Chapters 7-10 address the creation of intelligent agents in detail, starting with an agent framework and working through progressively more complex examples. Chapter 7 develops the authors' intelligent agent framework, starting from a set of requirements and design goals, and working through the functional specifications. The resulting agent framework uses the JavaBeans component model to provide communications between the agents and other parts of the system, and code developed in the first half of the book to handle specific reasoning tasks. In the remainder of the chapter, the authors demonstrate the resulting classes and interfaces. A good understanding of Java and JavaBean classes is necessary to completely comprehend this material.

Chapter 8 uses the agent architecture to construct an intelligent agent application, ostensibly for PC management. The application provides time-of-day alarms and watches for changes to the file system. The main point of this chapter is to demonstrate the use of the framework by illustrating how agents can autonomously monitor their environment and take action when some event occurs.

Chapter 9 presents an Internet news reader application. The newsreader filters articles based on keywords. In addition, the user can give feedback on the utility of an article ­ these utilities are used to train a neural network that then rates new articles. The authors are careful to list the limitations of the application. Again, the main point of the chapter is to demonstrate how functionality can be packaged as an autonomous agent rather than being embedded within an application, although the advantages of this approach are unclear in this case.

Chapter 10 is, in many ways, the most interesting in the book. In this chapter, the authors sketch how autonomous buyer and seller agents might interact to create a market. Three different buyer and seller agents are demonstrated, with increasingly sophisticated negotiating capabilities. The most sophisticated version uses a set of rules that control the negotiations. Buyers and sellers communicate using messages that mimic KQML (to avoid complications of parsing real KQML messages). A facilitator agent manages the market, introducing potential buyers and sellers and routing communications between them.

The authors are careful to note the limitations of this system, but this chapter raises issues that are not subsequently addressed. The most important of these is trust. For example, the design of the facilitator raises the spectre of a counterfeit facilitator (i.e. one that routes all requests to a confederate), but the chapter does not offer any suggestions as to how such a counterfeit could be detected, nor how buyers and sellers could authenticate each other. While not directly related to AI, these issues are essential in actually deploying autonomous agent technology, so I was disappointed that they were not discussed.

Chapter 11 concludes the book by introducing eight other Java-based agent environments, both commercial and research. URLs are provided for each for further information.

The book uses Java, but it is not an introduction to Java. The key elements of the language are introduced in Chapter 1, to enable a programmer fluent in another object-oriented language (e.g. C++ or SmallTalk) to follow the code examples. Having all of the code presented seems like a good idea, but some of the programs are long (as long as 12 pages) and difficult to follow, since they were written by a visual code builder. As a result, I sometimes found it difficult to locate where in the code the ideas presented were implemented. However, most of the code is annotated with a description of what is going on.

The book includes a CD-ROM containing the Java source code and compiled class files for all of the applets and applications developed in the book. The applets can be run using the JDK 1.1 appletviewer, or a Java 1.1 enabled Web browser, while the applications require a JDK 1.1 environment. The CD-ROM also includes the windows 95/NT version of the IBM Agent Builder Environment.

All in all, the book offers a useful introduction to a developing area. The book will be especially interesting to those planning to implement a system, since it includes working code samples for many AI techniques. However, this detail comes at a cost. The book seems longer in pages than content, and many topics are covered only superficially. Since all of the code is available on CD-ROM, a future edition might include only key code sections, thus providing room for additional discussion of the concepts and implication of this developing technology.

Kevin CrowstonSchool of Information Studies, Syracuse University

Related articles