Teaching Introductory Artificial Intelligence Using A Simple Agent Framework
Teaching Introductory Artificial Intelligence Using A Simple Agent Framework
Just -in-T ime Approach t o Learning: Arguing t he Case for Cost -Effect ive Knowledge Disseminat ion
Joaquim Jorge
P-Dinamet : A Web-Based Adapt ive Learning Syst em t o Assist Learners and Teachers
Miguel Mont ero
382 IEEE TRANSACTIONS ON EDUCATION, VOL. 48, NO. 3, AUGUST 2005
Abstract—This paper describes a flexible method of teaching in- from settled. Hence, computing technology breakthroughs
troductory artificial intelligence (AI) using a novel, Java-imple- are necessary. This necessity forms the main drive behind
mented, simple agent framework developed specifically for the pur- the abundance of job offers for information technology (IT)
poses of this course. Although numerous agent frameworks have
been proposed in the vast body of literature, none of these available specialists in The Netherlands. It also explains why so many
frameworks proved to be simple enough to be used by first-year of the Dutch prospective students choose just this branch of
students of computer science. Hence, the authors set out to create a exact sciences to examine their capabilities, to enhance their
novel framework that would be suitable for the aims of the course, skills, and to turn into valuable experts in one of the IT fields.
for the level of computing skills of the intended group of students, As computers become ever more ubiquitous in society, further
and for the size of this group of students. The content of the in-
troductory AI course in question is a set of assignments that re- developments in computing technology become more and more
quires the students to use intelligent agents and other AI tech- exciting and economically important in both the IT industry
niques to monitor, filter, and retrieve relevant information from the and the academic community.
World Wide Web. It represents, therefore, a synthesis of the tra- This view on reality has motivated the development of
ditional objectivist approach and a real-world-oriented, construc-
tivist approach to teaching programming to novices. The main aim a new educational program called Media and Knowledge
of implementing such a pedagogy was to engage the students in Technology (MKT) of the Computer Science of Delft Univer-
learning to which they personally relate while attaining intellec- sity of Technology, Delft, The Netherlands. In the academic
tual rigor. Classroom experience indicates that students learn more year 2001–2002, this new program was officially introduced.
effectively when the traditional objectivist approach is combined The main objective of this program is to educate students to
with a constructivist approach than when this orthodox approach
to teaching programming to novices is used alone. become engineers who are able to design and develop intelli-
gent systems for multimedia and multimodal information and
Index Terms—Agent framework, artificial intelligence (AI)
knowledge processing and who are able to design, realize, and
course, intelligent agents, introductory engineering course, Java,
rule-based reasoning, semantic network, World Wide Web search. deploy properly working man–machine interfaces.
As a part of this program, an introductory first-year course on
AI was developed with the following aims:
I. INTRODUCTION
1) to introduce the basic concepts of knowledge engi-
CCORDING to the Dutch Statistical Bureau, 77% of
A Dutch households have an Internet connection [1]. This
ever-increasing role of computers in society clearly forecasts
neering and the relevant AI techniques, including
search algorithms, knowledge representation tech-
niques, rule-based reasoning algorithms, and agent
which type of working environment and information–com- technology;
munication space Dutch people, and people of the Western 2) to explain and instruct on issues related to AI program-
Hemisphere in general, are about to use in everyday activities. ming in general and intelligent (multi-) agent applica-
Even now, the majority of the people living in the Western tions in particular.
Hemisphere use a computer to work and the Internet to com-
In contrast to the classic approach to teaching AI, which is an
municate, to shop, to seek out new information, and to entertain
objectivist approach as shown in Table I, this course approaches
themselves. This trend clearly indicates that in the future people
AI as a set of techniques for making software that is more intuitive
will perform a larger and larger part of their daily activities with
andeasiertouseandformakingusersmoreproductive.Therefore,
the aid of computers in cyberspace, across distance, cultures,
this course had to depart from the orthodox objectivist approach
and time. Of course, the specifics of such cyber worlds, smart
to teaching programming to novices where assessment exercises
environments, and the related interfaces (which should facilitate
have no real connection to how the student will apply the newly
easy and natural communication within those environments
obtained knowledge and skills to previously unseen real-world
and with a variety of embedded computing devices) are far
problems [6]. An alternative, constructivist approach, where an
authentic real-world environment is provided in which students
Manuscript received March 10, 2004; revised September 23, 2004. The work apply and test their newly obtained knowledge and skills, seemed
of M. Pantic is supported by the Netherlands Organization for Scientific Re-
search (NWO) under Grant EW-639.021.202. to represent a better choice for the AI course in question. Recent
The authors are with the Electrical Engineering, Mathematics, and Com- studies suggested, however, that the first-year undergraduates are
puter Science Department, Delft University of Technology, 2628 CD Delft, not ready for a pure constructivist teaching approach (e.g., the
The Netherlands (e-mail: [email protected]; [email protected];
[email protected]). approach used at Cornell University, Ithaca, NY; see Table I), in
Digital Object Identifier 10.1109/TE.2004.842906 which they are given a vaguely specified problem statement that
0018-9359/$20.00 © 2005 IEEE
PANTIC et al.: TEACHING INTRODUCTORY AI USING A SIMPLE AGENT FRAMEWORK 383
TABLE I
AN OVERVIEW OF AI INTRODUCTORY COURSES LECTURED AT VARIOUS UNIVERSITIES
they should refine and for which they should then develop a so- facilitate example-based learning and can be edited
lution [7]. Hence, a pragmatic synergy of objectivist and con- to include the desired AI algorithms according to the
structivist approaches to teaching programming to novices has goals of a programming assignment.
been adopted for the AI course in question. The overall course 3) It should embody the concepts of concurrency (a kind
was envisioned to include 20 hours of lectures (part one of the of multithreaded setup), multiagency (by allowing
course) and 80 hours of practical work (part two of the course). simple communication from one agent to the other),
This second part of the course, which is the main subject of this and persistency (saving settings between executions).
paper, addresses various practical issues in AI programming in Numerous agent frameworks are proposed in the vast body of
general and issues in creating properly working intelligent agent literature [8], and many software packages enabling the devel-
applications in particular. It builds on the first part of the course by opment of agent-based applications are currently available [9].
teachingstudentshowtouseAIalgorithms,aboutwhichtheyhave Nevertheless, none of these available agent frameworks satis-
been lectured, for solving well-defined assignments (objectivist fies all the requirements listed previously. Table II summarizes
approach) aimed at monitoring, filtering, and retrieving relevant the properties of the currently existing Java-based agent frame-
information from the World Wide Web (constructivist approach). works with respect to the following issues.
This paper will begin by examining the requirements for the 1) Does the developer provide support for the tool?
educational tool to be used in the second part of the AI course in 2) Is the tool available for free?
question. It will then survey several agent frameworks developed 3) Are useful examples readily available?
elsewhere which were considered for use, and it will explain the 4) Is the related documentation readable?
authors’ motivations to develop a novel simple agent framework 5) Is synchronous agent-to-agent communication (i.e.,
(SAF) for the purposes of the practical part of the AI course in waiting for reply) supported?
question. Next, the paper will explain the design of the SAF in de- 6) Is asynchronous agent-to-agent communication (con-
tail.Twoprogrammingassignmentsconstitutingthepracticalpart tinuing immediately) supported?
of the AI course in question will receive particular attention. Fi- 7) What is the communication transmission form?
nally, the paper will discuss experiences of both the class of 2002 8) Can the framework control the agents’ resources (e.g.,
and that of 2003, and it will provide concluding remarks. the disk or network capacity used)?
9) Can the framework ask an agent to shut down?
II. EDUCATIONAL TOOL REQUIREMENTS 10) Can the framework terminate the execution of a mal-
In the process of selecting the appropriate educational tool to functioning agent?
be used in the AI course in question, the authors identified sev- 11) Can the framework store agents’ states between execu-
eral constraints. Since the students attending the course are first- tions?
year students who have only attended a course on the program- 12) Can the framework store objects (e.g., a database) be-
ming language Java, all programs and examples to be developed tween executions?
have to be implemented in Java. Another important issue, valid 13) Does a self-explained graphical user interface (GUI)
for any introductory course, is the focus of the course. The focus per agent exist?
should be on learning how to use the basic AI algorithms to solve 14) Does the GUI support an overview of all running
real-world problems, rather than on learning how to use complex agents?
software tools. Hence, the requirements that an educational tool As can be seen from Table II, none of the available Java-
should fulfill in order to be appropriate for the purposes of the based agent frameworks is simple enough to be used by first-
AI course in question can be summarized as follows. year undergraduate students. The reason is that virtually all of
1) The tool should support the development of intelligent these frameworks have at least one of the following drawbacks.
agent applications aimed at monitoring, filtering, and • They lack readable documentation and readily available
retrieving relevant information from the World Wide useful examples (see the third and the fourth column of
Web. Table II).
2) It should be simple and user friendly, and it should in- • They lack a GUI altogether, or the available GUI is not
clude built-in, Java-implemented, agent templates that self-explained and time-consuming consultation of the
384 IEEE TRANSACTIONS ON EDUCATION, VOL. 48, NO. 3, AUGUST 2005
TABLE II
OVERVIEW OF THE AVAILABLE JAVA-BASED AGENT FRAMEWORKS
documentation is necessary, or a GUI is available per An agent can instruct the framework to start up another agent
agent but there is no overview of all running agents at (in contrast to the preliminary version of the SAF [13]). The
the framework level (see the thirteenth and fourteenth framework, in turn, keeps track of all agents and their parent
column of Table II). agents. A highly beneficial effect of this new capability is that
Hence, the authors set out to create a novel Java-based agent the framework no longer needs the clumsy and difficult-to-grasp
framework that would fulfill all the requirements listed previ- "batch" concept, which was first used to load different parts of a
ously and that would yield a tool appropriate for use in the in- multiagent system simultaneously. Instead of working with text
troductory AI course in question. files containing ordered lists of agents, a single agent can be cre-
ated which starts up the appropriate agents for each multiagent
system. This "kickoff" agent is then the parent agent of all agents
III. SIMPLE AGENT FRAMEWORK
that form the multiagent system in question. Hence, loading one
The design of the simple agent framework (SAF), the first ver- or more multiagent systems will result in one or more easily tra-
sion of which was developed in 2002 [13], has been driven by versable trees that will clearly indicate which agents are working
the knowledge about the end users (i.e., first-year undergrad- together to accomplish a single task (Fig. 1).
uates) and the stipulated purpose of the educational tool to be SAF supports simple event processing, allowing the agents
developed (Section II). SAF can be seen as a common program- to handle the events coming from the outside world or from
ming interface delimiting the behavior of all the agents inte- other agents and to signal events to the outside world. Java uses
grated into the framework. Its functional specification can be an event-processing model for various features, including the
summarized as follows (see also the last row of Table II for a features of the graphical toolkit (swing). However, this model
summary of the functional specification): relies on the source of events to maintain a list of registered
SAF enables easy addition of intelligent agents. This goal event listeners and to deliver the subject events. To alleviate
could be achieved by having the framework to instantiate and the difficult task of programming agents, a Publish–Subscribe
configure the agent and then to call the agent’s methods as ser- event-processing system has been used in the SAF. This “delivery
vice routines. That way the framework would be always in con- system” manages events and dispatches them to the interested
trol, and it could use intelligent functions as appropriate. This agents. Both the events coming from the user and those coming
outcome is easy to achieve but hardly results in what one would from other agents are represented as text strings, each of which
consider an intelligent agent. Therefore, the design that has been is called a message. All messages are sent to a channel, each of
chosen is to have the framework instantiate and configure the which is analogous to a blackboard. The blackboard concept is
agent and then to start it up in a separate thread. In this way, the known to all students of Delft University of Technology since
agent has some autonomy, although the agent is running in the it is the design pattern used to develop the system for posting
framework’s process space. and distributing information about courses, exams, homework,
PANTIC et al.: TEACHING INTRODUCTORY AI USING A SIMPLE AGENT FRAMEWORK 385
TABLE III
METHODS SUPPORTED BY SAF
Fig. 5. Grades assigned to the students for the quality of the delivered code.
<
In 2002, from 73 participants, 17.8% did not pass the course (had a grade 5).
In 2003, from 76 participants, 13.2% did not pass the course.
were happy with the results of their work in terms of the per- World Wide Web and embodies the concepts of concurrency,
formance and usefulness of the developed multiagent systems multiagency, and persistency. It does not possess an object-ori-
(2002, 86%; 2003, 89%). ented database or a mechanism for performing remote proce-
These results indicate that the students found the developed dure calls since these provisions are not necessary for the de-
educational tool (SAF) and the specified programming as- velopment of the intelligent agent applications in question, and
signments motivating and highly suitable for the purposes of they would make the tool unnecessarily complex. In contrast to
teaching the basics of AI. In addition, in comparison to another the existing agent frameworks developed elsewhere (Table II),
introductory AI course for all computer science students of and as indicated by classroom experience, SAF is a suitable tool
Delft University of Technology (the course IN 2420, Table I), for teaching AI programming to novices for the following rea-
which uses a traditional objectivist approach, students reported sons.
that they learned significantly more from the AI course pre- • It is simple; it is accompanied by readable documenta-
sented in this paper (the course IN 1851, Table I). In 2003, tion; and it provides readily available, useful examples
out of 124 participants in the introductory AI course IN 2420, (i.e., built-in agent templates written in Java which can
83 students filled out the questionnaire surveying students’ be edited and to which “intelligence” can be added).
educational experience. Of those, only 43% claimed that they • It embodies simple, self-expained, visual interaction with
had enhanced their skills and acquired new, valuable, and the user that may concern one, more, or all currently run-
applicable knowledge on the instructed subjects. This finding ning agents (Fig. 1).
indicates the students’ perception of learning more effectively
Based on classroom experience, and in comparison to the
when the traditional objectivist approach is combined with a
commonly applied approaches to teaching introductory AI
constructivist approach than when the objectivist approach to
(Table I), the significance of the example-based teaching
teaching programming to novices is used alone.
method proposed in this paper can be summarized as follows.
However, as remarked by Schell [17], although students may
frequently report a perception of learning more than in tradi- • The implemented pedagogy represents a synergy of ob-
tional courses, quantitative measures do not always confirm this jectivism and constructivism in teaching programming to
perception. Therefore, in order to evaluate objectively the ed- novices. It departs from commonly adopted objectivism
ucational benefit of the AI programming experience obtained to avoid an approach that treats learning as simple acqui-
during the practical part of the AI course in question, the authors sition of facts, where the newly obtained knowledge and
performed an assessment. They compared the performance of skills are not transferred to previously unseen, real-world
students’ answering the questions about rule-based reasoning problems [6]. It does not adopt a fully constructivist
and semantic networks and the performance of students’ an- approach either, in which students are given a vaguely
swering the other four questions (search algorithms, predicate specified problem that they should refine and then solve,
logic, knowledge acquisition, and distributed AI) on the test. since this approach has been proven unsuitable for
The grade obtained for each question was compared with those teaching programming to freshmen [7], [16]. Rather, it
obtained for the other questions by computing the ratio between blends the two approaches: the students are presented
the average score achieved by the students to the maximum with well-defined assignments (objectivist approach)
score for each question. The semantic networks question rated aimed at monitoring, filtering, and retrieving relevant
the highest, 0.89, with the scores for the other questions equal to information from the World Wide Web (constructivist
0.69 (rule-based reasoning question and the distributed AI ques- approach). Classroom experience indicates that this “hy-
tion), 0.59 (search algorithms question), 0.45 (predicate logic brid” teaching method significantly increases the extent
question), and 0.38 (knowledge acquisition question). These re- of learning compared with use of only the objectivist
sults indicate that the specified programming assignments im- approach to teaching programming to novices.
proved the students’ ability to apply the pertinent ideas to novel • The implemented pedagogy has intellectual rigor while
problems. They also suggest that the course material is highly being engaging for students. The students are given a
suitable for the purposes of teaching students the basics of AI, standardized plan for realizing the assignments, but they
including semantic network concepts, rule-based reasoning, and build personalized versions of the intended multiagent
the intelligent agents paradigm. systems according to their preferences from the large
stock of information available on the Web.
• The implemented pedagogy represents a method of
VI. SUMMARY teaching intelligent, multiagent, system development
This paper describes a flexible method of teaching introduc- that provides the student with a deeper understanding
tory artificial intelligence (AI) using a novel Java-implemented of the process in a real-world-oriented (Web-based),
simple agent framework. The simplicity of the proposed agent cooperative (team-based) setting.
framework, a requisite quality for a tool aimed at teaching pro- These results strongly indicate that the implemented pedagogy
gramming to novices, has in its possession only those function- and the utilized newly developed educational tool presented in
alities that are specified by the intended educational purposes this paper form a highly effective way of teaching introductory
and no other. The simple agent framework (SAF) supports the AI. In turn, the SAF system and the specified AI programming
development of intelligent agent applications aimed at moni- projects can be widely useful for many different AI courses,
toring, filtering, and retrieving relevant information from the including courses for noncomputer-science majors.
390 IEEE TRANSACTIONS ON EDUCATION, VOL. 48, NO. 3, AUGUST 2005
Finally, the SAF system provides a basis for the develop- [9] AgentLink. Agent Software—European co-ordination action for
ment of other courses having intelligent agents programmed to agent–based computing. [Online]. Available: http://www.agentlink.org
/resources/agent-software.php
perform specific tasks with the goal of solving more complex [10] FIPA–OS Agent Toolkit. [Online]. Available: http://www.emorphia.
problems. Robotics and computer games are examples of such com/research/about.htm
courses. The authors are currently engaged in the development [11] Fujitsu Laboratories, Ltd. Pathwalker—Agent-oriented programming li-
brary. [Online]. Available: http://www.labs.fujitsu.com/en/freesoft/paw/
of the practical part of a machine learning course as a set of [12] IEEE Distributed Systems Online—Distributed Agents Projects. [On-
assignments that requires the students to use SAF intelligent line]. Available: http://dsonline.computer.org/agents/projects.htm
agents and machine learning techniques to do the following: [13] M. Pantic, R. Zwitserloot, and R. J. Grootjans, “Simple agent frame-
work,” in IEEE Int. Conf. Information Technology in Research Educa-
• to detect the shown facial expression in an input video of tion, Newark, NJ, Aug. 2003, pp. 426–430.
the face; [14] J. B. Black and R. McClintock, “An interpretation construction approach
to constructivist design,” in Constructivist Learning Environments: Case
• to interpret this information in terms of emotions; Studies in Instructional Design, B. G. Wilson, Ed. Englewood Cliffs,
• to retrieve a video from a remote database of face images NJ: Educational Technology, 1995, pp. 25–31.
picturing the same emotion displayed by a face being the [15] S.-F. Chang, A. Eleftheriadis, and R. McClintock, “Next-generation con-
tent representation, creation, and searching for new-media applications
most similar to the face in the input video. in education,” Proc. IEEE, vol. 86, no. 5, pp. 884–904, May 1998.
Once this machine learning course is developed, one could [16] R. Lister and J. Leaney, “Bad theory versus bad teachers: Toward a
assess the usefulness of SAF in contexts other than the one dis- pragmatic synthesis of constructivism and objectivism,” in Int. Conf.
Higher Education Research and Development Society of Australasia,
cussed in this paper. Inc., Christchurch, New Zealand, Jul. 2003, pp. 429–436.
[17] G. P. Schell, “Universities marginalize online courses,” Commun. ACM,
ACKNOWLEDGMENT vol. 47, no. 7, pp. 53–56, Jul. 2004.