SlideShare a Scribd company logo
Intelligent agents in ontology-based applications
FLORIN STOICA
Computer Science Department
“Lucian Blaga” University Sibiu
Str. Dr. Ion Ratiu 5-7, 550012, Sibiu
ROMANIA
IULIAN PAH
Department of Sociology
“Babes-Bolyai” University Cluj-Napoca
Bd.21 decembrie 1989, no.128-130, 400604,
Cluj-Napoca, ROMANIA
Abstract: - Development of intelligent agents is not a trivial task. In this paper, a Web-interfaced JADE agent is linked
to a knowledge-base system in order to get intelligent behaviour. The knowledge-base system was implemented using
Protégé-2000 as tool for modeling ontologies and Algernon as inference engine. The example application was
developed in Sun Java Studio Creator 2, an Integrated Development Environment (IDE) for developing state-of-the-art
JavaServer Faces Web applications.
Key-Words: - agent, JADE, Protégé, Algernon, Knowledge-based systems
1 Introduction
When we talk about intelligent agents, the question often
arises, what do we mean by intelligence? In this paper,
we consider that an agent is intelligent if it acts
rationally. More specifically, intelligence refers to the
ability of the agent to capture and apply application
domain-specific knowledge and processing to solve
problems.
Intelligent behavior can be produced by the
manipulation of symbols. Symbols are tokens that
represent real-world objects or ideas and can be
represented inside a computer by character strings or by
numbers. In this approach, a problem must be
represented by a collection of symbols, and then an
appropriate algorithm must be developed to process
these symbols.
There are several typical ways of manipulating
symbols that have proven useful in solving problems.
The most common approach is to use symbols in
formulations of if-then rules that are processed using
reasoning techniques called forward and backward
chaining.
In this paper, we develop an example application
based on information agent, used to deliver useful
information to the user, according with his preferences.
This information is gathered by the agent from the Web
using web services or through collaboration with other
agents, and inserted into a knowledge base. The
knowledge base is then queried using a set of if-then
rules and an inference engine. The rules are defined
dynamically by the agent according to user preferences.
We are investigating some tools (Protégé, Algernon,
JADE) used in implementation of an intelligent agent
with reasoning capabilities.
2 Knowledge representation
What is knowledge? We adopt the following definition
for knowledge: “the fact or condition of being aware of
something” [8]. But how do we make a computer aware
of something? This problem, called knowledge
representation, is one of the first, most fundamental
issues that researchers in artificial intelligence had to
face. There are many different kinds of knowledge we
may want to represent: simple facts or complex
relationships, rules for natural language syntax,
associations between related concepts, inheritance
hierarchies between classes of objects. In addition to
being easy to use, a good knowledge representation also
must be easily modified and extended, either by
changing the knowledge using a GUI tool, or through
automatic techniques.
The most popular knowledge representation is
declarative representation. In declarative knowledge
representation, a user simply states the ontology and
specific instances of data, which represent pure
knowledge.
An ontology is a formal explicit description of
concepts in a domain of discourse (classes (sometimes
called concepts)), properties of each concept describing
various features and attributes of the concept (slots
(sometimes called roles or properties)), as well as the
relationships between the concepts
The knowledge base is the central repository of
information containing the ontology and specific
instances of data (a set of individual instances of classes
- the facts known about objects).
The process of mapping the set of knowledge in a
particular problem domain and converting it into a
knowledge base is called knowledge engineering or
knowledge acquisition. While essential, the knowledge
acquisition is a difficult and costly process, in which are
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 274 ISSN: 1790-5109
identified several unique roles: a domain expert and a
knowledge engineer. A knowledge engineer is a person
who can take the domain knowledge and represent it in a
form for use by the reasoning system. Using an
appropriate tool for this task (such as Protégé) may be
very useful.
A reasoning system is used in conjunction with a
knowledge base and with a set of if-then rules to answer
questions and solve problems regarding the domain.
3 Knowledge-based systems
A knowledge-based system is the common term used to
describe a rule-based processing system. If-then rules are
easily manipulated by reasoning systems because if-then
rules are easily understandable, each rule can be viewed
as standalone unit of information, new knowledge can be
easily added, and existing knowledge can be easily
changed by creating or modifying individual rules.
A knowledge-based system consists of four major
elements: a knowledge base (ontology + a set of
individual instances of classes), a set of if-then rules, a
working memory or database of derived facts and data,
an inference engine, which contains the reasoning logic
used to process rules and data.
Fig. 1 Architecture of a knowledge-based system
The reasoning logic of an inference engine is based
on forward chaining and backward chaining [8].
Forward chaining is a data-driven reasoning process
in which a set of rules is used to derive new facts from
initial set of data. The forward-chaining algorithm
generates new data by calling effector procedures
(procedural program code) or firing of the rules.
Backward chaining is often called goal-directed
inferencing, because a particular consequence or goal
clause is evaluated first, and then the algorithm
backward through the rules. Backward chaining uses
rules to answer questions about whether a goal clause is
true or not, processing only rules that are relevant to
question. One advantage of backward chaining is that,
because the inferencing is directed, information can be
requested from the user when it is needed.
4 Tools for implementing a Knowledge-
based system
4.1 Comparative study of tools
When starting out on an ontology project, the first and
reasonable reaction is to find a suitable ontology
software editor. The ability to organize and manage an
emerging ontology is very important to an editor's
usability. Convenient and intuitive presentations and
manipulations of ontology’s interlinking concepts and
relations are essential. Because many ontology models
support multiple inheritances in the concept hierarchies
and relation hierarchies, keeping the associations straight
is a challenge. A graph presentation is less common,
although it can be quite useful for actual ontology
editing functions that change concepts and relations.
Finally, it is worth considering the inferencing support
afforded by the ontology editor (beyond classification in
description logic editors). While ontologies themselves
can be treated as standalone specifications, they are
ultimately used to help answer queries about a body of
information. Some editors incorporate the ability to add
additional axioms and deductive rules to the ontology for
evaluation within the defined target of the development
environment.
The survey presented in [10] covers software tools
that have ontology editing capabilities and are in use
today. The tools may be useful for building ontology
schemas (terminological component) alone or together
with instance data.
The following implementation levels were
considered: 0 = Nil, 1= Poor, 2 = OK, 3 = Good, 4 =
Very Good, 5 = Excellent
Criteria Ontolingua
Protégé
2000
OntoEdit
Clarity of interface 3 5 5
Interface Consistency
Meaning of Commands
4
2
5
4
5
4
Visualization
Ontology overview
2
2
5
5
5
5
HCI 13 24 24
Local installation 0 5 5
Updating speed 2 4 4
Help system 4 5 2
Operational Aspects 6 14 11
Stability of the tool 3 5 5
User support 4 5 0
Features of free version 5 5 2
Tool Support Features 12 15 7
Total 31 53 42
Table 1 Comparison of Usability Aspects [10]
Knowledge base
(ontology + facts)
If-then rules
Inference engine
Working memory
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 275 ISSN: 1790-5109
Criteria Ontolingua
Protégé
2000
OntoEdit
Multiple inheritance 4 5 0
Exhaustive
decomposition
Disjoint decomposition
4
5
0
5
0
5
Structural aspects 13 10 5
Example ontologies 3 5 0
Ontology Library 5 3 0
Library 8 8 0
Java based 0 5 5
Database Backend 0 5 0
Implementation
features
0 10 5
Total 21 28 10
Table 2 Comparison of Ontological Aspects [10]
4.2 Protégé-2000 and Algernon
In order to implement a knowledge-base system, we are
using Protégé-2000 for ontology development and
knowledge-acquisition and Algernon as inference
engine.
Why select protégé? The Protégé-2000 tool provides
access to all of his functionality through a uniform GUI
(graphical user interface) whose top-level consists of
overlapping tabs for compact presentation of the parts
and for convenient co-editing between them.
This "tabbed" top-level design permits an integration
of the modeling of ontology of classes describing a
particular subject, the creation of a knowledge-
acquisition tool for collecting knowledge, the entering of
specific instances of data and creation of a knowledge
base, and the execution of applications [6].
Besides its user friendly interface, plug-in
architecture and other features mentioned above, Protégé
2000 supports collaborative ontology editing. In the
multi-user mode, Protégé 2000 allows multiple clients to
edit simultaneously the same ontology hosted on a
Protégé server. All changes made by one client are
immediately visible by other clients.
The main assumption of Protégé-2000 is that
knowledge-based systems are usually very expensive to
build and maintain. Protégé-2000 is designed to guide
developers and domain experts through the process of
system development. Protégé-2000 is designed to allow
developers to reuse domain ontologies and problem-
solving methods, thereby shortening the time needed for
development and program maintenance. Several
applications can use the same domain ontology to solve
different problems, and the same problem-solving
method can be used with different ontologies.
Algernon can be used from stand-alone applications
(in our example, the Algernon API will be used in order
to call the Algernon engine from a JADE agent) or as a
Protégé tab plug-in that allows all operations to be
performed from within the Protégé GUI.
Algernon is an inference engine that supports both
forward and backward chaining rules. Also, Algernon is
suitable for reading and writing Protégé knowledge
bases, providing a concise way to retrieve and store
information in a knowledge base (KB). Likewise, calls
out to Java and LISP for non-KB calculations are
possible [7].
Algernon's syntax for a clause is like a predicate:
(slot frame value). A path is a sequence of clauses.
In Algernon, a variable starts with a question mark
(example: ?name). Variables do not have to be declared,
but they are implicitly assigned a type according to their
first use. They keep that type throughout the scope of
their current path. A variable may be bound (assigned a
value) through a query or through explicit assignment
(with the :BIND command). A variable’s binding is
passed to all succeeding clauses in the path.
A ground clause (assert) either contains no variables,
or all of its variables have been bound by previous
clauses in the path. When Algernon processes a ground
clause, it will assert the information into the KB if it is
not there already. If it is already there the clause will
succeed, but will not change the KB. Asserting new
information into the KB will cause Algernon to fire
relevant forward-chaining rules.
A non-ground clause (query) contains an unbound
variable. When Algernon processes a non-ground clause,
i.e. the knowledge base is queried, it will first fire any
relevant backward-chaining rules, and then it will query
the KB for the information in the clause.
In order to fire, the key clause of the rule must match
the new fact. In forward chaining rules the key clause is
the first clause in the antecedent. In backward chaining
rules the key clause is the first clause in the consequent.
A rule can contain commands that perform KB
retrievals, KB assertions, KB class, instance and slot
creation commands, and other Algernon operators that
print output, retrieve the current date, call external Java
or LISP routines, etc.
Algernon facilities include [7]: supports interleaved
forward and backward chaining, provide direct
manipulation and interaction with Protégé knowledge
bases, contains operators that create and delete classes,
instances and slots, retrieve and store slot values,
supports access to multiple concurrent KBs, provide a
Protégé tab plug-in that allows all operations to be
performed from within the Protégé GUI, etc.
5 General architecture of ontology-
based application
One of the main reasons for building an ontology-based
application is to use a reasoner to derive additional truths
about the concepts we are modeling and/or to answer
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 276 ISSN: 1790-5109
queries and solve problems regarding the domain.
Figure 2, taken from [9], shows the proposed layers
of the Semantic Web, of the Tim Berners-Lee’s
Semantic Web architecture, with the higher level
languages using the syntax (and semantics) of the lower
level languages.
Fig. 2 The Tim Berners-Lee’s Semantic Web
layered mode
Our application focuses primarily on the ontology
development level, on the rules describing logic and
used by an inferencing engine in order to answer queries
about a requested information, and the sort of agent-
based computing that enable exploitation of the
constructed knowledge-based system.
6 Reasoning JADE agents
JADE is a middleware that facilitates the development of
multi-agent systems and applications conforming to
FIPA standards for intelligent agents [1]. It includes: a
runtime environment where JADE agents can “live” and
that must be active on a given host before one or more
agents can be executed on that host, a library of classes
that programmers have to/can use (directly or by
specializing them) to develop their agents and a suite of
graphical tools that allows administrating and
monitoring the activity of running agents.
The computational model of an agent is multitask,
where tasks (or behaviours) are executed concurrently.
Each functionality/service provided by an agent should
be implemented as one or more behaviours. A scheduler,
internal to the base Agent class and hidden to the
programmer, automatically manages the scheduling of
behaviours.
A behaviour represents a task that an agent can carry
out and is implemented as an object of a class that
extends jade.core.behaviours.Behaviour. In order to
make an agent execute the task implemented by a
behaviour object it is sufficient to add the behaviour to
the agent by means of the addBehaviour() method of the
Agent class.
In order to adding reasoning capabilities to a JADE
agent, this must be interfaced with Algernon. Using the
Algernon Java API, the code is simple:
// Algernon instance
protected Algernon f_algy = null;
protected AlgernonKB f_kb = null;
//Protégé Knowledge Base
protected String f_prjFile = "airfarekb.pprj";
ErrorSet errors = new ErrorSet();
f_algy = new Algernon();
f_kb = new AlgernonProtegeKB(
f_algy, f_prjFile);
f_algy.addKB(f_kb);
Result result = (Result)f_algy.ask(query, errors);
where query represents a valid Algernon path.
7 The example Web application
In the following we will describe a sample JADE agent
which use a rule base and backward chaining to
determine when a discovered airfare is of interest to the
user. The JADE agent is part of a Web application
developed with Java Studio Creator 2, a powerful IDE
based on JavaServer Faces technology [2].
When scheduling a trip, a user will often find that the
airfare fluctuates over time, based on different factors:
the number of seats available, how far in advance the trip
is booked, etc. To get the best fares available, the user
needs to keep checking the airline or travel services Web
site for flight schedules that meet his travel criteria,
waiting for a convenient price.
We suppose that our agent is getting the information
about published airfares by invoking web services or by
querying other agents.
Let’s further suppose that the user desires to fly from
Sibiu to Bucharest on April 1st
and returns on April 11th
.
The user is willing to pay up to 100 € for his ideal flight
time: he desires to fly from Sibiu between 8 and 12
o’clock or after 17 o’clock and catches his return flight
between 16 and 22 o’clock.
But often, when scheduling a trip, a user is willing to
settle for less than ideal if the price is right. Thus, the
user may take a flight that departs before 8 o’clock and
returns between 16 and 22 o’clock, if the price is less
than 80 €. Or he may be willing to leave before 8 o’clock
and returns after 22 o’clock if the price is less than 50 €.
Without using an agent, the user would periodically
goes out to the Web site, enter in his dates, and check the
flights that are were returned to see if any mach his flight
schedule and pricing criteria. If the prices are changing
rapidly, the user may needs to repeat this process quite
often in order to get the right flights at the desired price.
Our JADE agent does just that.
Resource Description
Framework + RDF Schema
Ontology Digitalsignature
UNICODE Universal resource
indicator (URI)
XML + Name space + XML Schema + XML Querry
Logic + rules
descrybing logic
PROOF
Trust
Encryption
Inference
Meaning
of data
Self-
describing
document
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 277 ISSN: 1790-5109
7.1 Ontology development
Our proposed ontology contains three classes: Flight,
Option and Rank. Slots of class Flight are described in
figure 4, and have the following signification (table 3):
Fig. 3 Classes
from Protégé
ontology
Fig. 4 Slots of class Flight
Slot name Description
d_date (r_date) Departure (return) date
d_time (r_time) Departure (return) time
d_option (r_option) Captures the user preferences:
departure (return) time is desirable
or undesirable. Values of these
slots are instances of class Option
from_City Departure City
to_City Destination City
number Flight number
price Price of the trip
rank Captures the user preferences,
involving values of the following
slots: d_option, r_option and price
Table 3. Ontology slots and their signification
The class Rank has three instances: good, better and
best.
For testing purposes, we can use the Instance Editor
of Protégé to introduce some instances of class Flight in
the Knowledge base (figure 5), and then we can test the
reasoning rules with Algernon plug-in, using Algernon
tab (figure 6).
Fig. 5 Protégé Instance Editor
Fig. 6 Testing rules in Algernon tab
7.2 Generating rules
After the user is questioned about his preferences, the
JADE agent will generate rules to update the knowledge
base (setting values for slots d_option, r_option and rank
of instances of class Flight) and for delivering useful
information to the user.
By example, the following backward chaining rule
will be used to define whether the return time is in
desired range:
((:add-rule Flight
((r_option ?flight undesirable) <- (r_time
?flight ?time) (:TEST (:LISP (string< ?time
"16.00"))))
((r_option ?flight desirable) <- (r_time
?flight ?time) (:TEST (:LISP ( and (string>
?time "16.00") (string< ?time "22.00")))))
((r_option ?flight undesirable) <- (r_time
?flight ?time) (:TEST (:LISP (string> ?time
"22.00"))))
))
The following rule will be used to rate each set of
flight options, and will assert a value for the rank slot.
This slot can take on the value of good, better or best
(which are instances of class Rank).
((:add-rule Flight
((rank ?flight best) <- (d_option ?flight ?d)
(r_option ?flight ?r) (price ?flight ?p)
(:NAME ?d ?dn) (:NEQ ?dn "undesirable")
(:NAME ?r ?rn) (:NEQ ?rn "undesirable")
(:TEST (:LISP (< ?p 100))))
...
((rank ?flight good)<-(d_option ?flight ?d)
(r_option ?flight ?r) (price ?flight ?p)
(:NAME ?d ?dn) (:NEQ ?dn "desirable")
(:NAME ?r ?rn) (:NEQ ?rn "desirable")
(:TEST (:LISP (< ?p 50))))
))
Invoking the defined backward rules will be done by
executing the following queries:
((:INSTANCE Flight ?f) (:trace :verbose)
(:CLEAR-RELATION ?f d_option)
(d_option ?f ?o))
((:INSTANCE Flight ?f) (:trace :verbose)
(:CLEAR-RELATION ?f r_option)
(r_option ?f ?r))
((:INSTANCE Flight ?f) (:trace :verbose)
(:CLEAR-RELATION ?f rank) (rank ?f ?r))
Finally, is constructed a last query to deliver the
requested information to the user, according to his
preferences, captured from the Web page of application.
Such a query may be in the following form:
((:INSTANCE Flight ?f) (rank ?f better)
(d_date ?f "01.04.2008")
(r_date ?f "11.04.2008")
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 278 ISSN: 1790-5109
(from_City ?f "Sibiu")(to_City ?f "Bucuresti")
(:NAME ?f ?fn)(number ?f ?nr))
7.3 The JADE ProxyAgent
First of all, the JADE agent must be interfaced with a
Web browser. A technical solution for this problem can
be found in [4] where is provided a general method of
how can be linked a JADE agent to a JavaServer Faces
(JSF) component, in order to allow Web applications to
be interfaced with a JADE platform.
The example JSF application is developed in Sun
Java Studio Creator 2, an Integrated Development
Environment (IDE) for developing state-of-the-art web
applications. Based on JSF technology [3], this IDE
simplifies writing Java code by providing well-defined
event handlers for incorporating business logic, without
requiring developers to manage details of transactions,
persistence, and other complexities.
The Web application is interfaced with a proxy-agent
running on a JADE platform, in order to retrieve and
display the requested information to the user. Each
user’s request is linked to a behavior of the JADE
ProxyAgent in charge of handling the request. In fact,
the ProxyAgent has three behaviours in order to provide
the required functionality:
- behaviour AddRules, executed only once, to define
the backward chaining rules;
- behaviour UpdateKB, executed periodically,
querying the Web for information about flights
which satisfy the user preferences;
- behaviour GetFlights, executed at each user
request, and handling that request by querying the
knowledge base and displaying the information
retrieved.
All behaviours are using Algernon API in order to
access the Algernon inference engine, as mentioned in
section 6.
In figure 7 is showed the ProxyAgent running within
a JADE platform, and in figure 8 is depicted the Web
interface of the application, which interacts with the
user.
Fig. 7 The reasoning ProxyAgent
References:
[1] F. Bellifemine, G. Caire, T. Trucco, G.
Rimassa, JADE programmer's guide,
http://jade.tilab.com
Fig. 8 The Web interface of the JSF application
[2] Java Studio Creator Field Guide, 2nd ed.,
Sun Microsystems,
http://developers.sun.com/jscreator/
learning/bookshelf/
[3] D. Geary, C. Horstmann, Core JavaServer
Faces, Prentice Hall, 2004, ch. 1-5.
[4] F. Stoica, Building a Web-bridge for JADE
agents, Proceedings of the RoEduNet IEEE
International Conference, 2006, “Lucian
Blaga” University of Sibiu Printing House,
ISBN 973-739-277-9
[5] Protégé-Frames User's Guide,
http://protege.stanford.edu/doc/
users_guide/index.html
[6] H. Knublauch, An AI tool for the real
world - Knowledge modeling with Protégé,
http://www.javaworld.com/javaworld/jw-
06-2003/jw-0620-protege.html
[7] M. Hewett, Algernon in Java,
http://algernon-j.sourceforge.net/doc/
[8] J. P. Bigus, J. Bigus, Constructing
Intelligent Agents using Java, 2nd ed., John
Wiley & Sons, Inc., 2001
[9] M. Davis, Next-Wave Publishing,
Revolutions in Content, The Seybold
Report, Vol. 3, No. 23, March 2004
[10]R. Jakkilinki, N. Sharda, I. Ahmad,
Ontology-Based Intelligent Tourism
Information Systems: An overview of
Development Methodology and
Applications, Tourism Enterprise
Strategies: Thriving – and Surviving – in
an Online Era, 11-12 July 2005, Centre for
Hospitality and Tourism Research (CHTR),
Victoria University, Melbourne, Australia
12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008
ISBN: 978-960-6766-85-5 279 ISSN: 1790-5109

More Related Content

PDF
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
PDF
Expert system neural fuzzy system
PDF
International Journal of Engineering Inventions (IJEI)
PDF
A Comparative Study of Recent Ontology Visualization Tools with a Case of Dia...
PDF
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
PDF
Soft computing
 
PDF
Concept integration using edit distance and n gram match
PDF
Neural networks, naïve bayes and decision tree machine learning
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
Expert system neural fuzzy system
International Journal of Engineering Inventions (IJEI)
A Comparative Study of Recent Ontology Visualization Tools with a Case of Dia...
Universal Artificial Intelligence for Intelligent Agents: An Approach to Supe...
Soft computing
 
Concept integration using edit distance and n gram match
Neural networks, naïve bayes and decision tree machine learning

What's hot (16)

PPTX
Regression with Microsoft Azure & Ms Excel
PDF
Army Study: Ontology-based Adaptive Systems of Cyber Defense
PDF
Tools for Ontology Building from Texts: Analysis and Improvement of the Resul...
PDF
Artificial Neural Networks: Applications In Management
PDF
UML MODELING AND SYSTEM ARCHITECTURE FOR AGENT BASED INFORMATION RETRIEVAL
DOC
Representation of ontology by Classified Interrelated object model
PDF
2014 Practical emotional neural networks
DOC
ETRnew.doc.doc
PDF
A Semi-Automatic Ontology Extension Method for Semantic Web Services
PDF
Evaluation of rule extraction algorithms
PDF
A SYSTEM OF SERIAL COMPUTATION FOR CLASSIFIED RULES PREDICTION IN NONREGULAR ...
PDF
Face Detection and Recognition using Back Propagation Neural Network (BPNN)
PDF
The Optimization of choosing Investment in the capital markets using artifici...
PDF
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
PDF
Nature Inspired Reasoning Applied in Semantic Web
PDF
AUTOMATED DISCOVERY OF LOGICAL FALLACIES IN LEGAL ARGUMENTATION
Regression with Microsoft Azure & Ms Excel
Army Study: Ontology-based Adaptive Systems of Cyber Defense
Tools for Ontology Building from Texts: Analysis and Improvement of the Resul...
Artificial Neural Networks: Applications In Management
UML MODELING AND SYSTEM ARCHITECTURE FOR AGENT BASED INFORMATION RETRIEVAL
Representation of ontology by Classified Interrelated object model
2014 Practical emotional neural networks
ETRnew.doc.doc
A Semi-Automatic Ontology Extension Method for Semantic Web Services
Evaluation of rule extraction algorithms
A SYSTEM OF SERIAL COMPUTATION FOR CLASSIFIED RULES PREDICTION IN NONREGULAR ...
Face Detection and Recognition using Back Propagation Neural Network (BPNN)
The Optimization of choosing Investment in the capital markets using artifici...
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
Nature Inspired Reasoning Applied in Semantic Web
AUTOMATED DISCOVERY OF LOGICAL FALLACIES IN LEGAL ARGUMENTATION
Ad

Similar to Intelligent agents in ontology-based applications (20)

PDF
Constructing an Office Domain Ontology using Knowledge Engineering Process
PDF
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
PDF
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
PDF
A Review on Reasoning System, Types, and Tools and Need for Hybrid Reasoning
PDF
Semantic IoT Semantic Inter-Operability Practices - Part 1
PDF
Finding new framework for resolving problems in various dimensions by the use...
PDF
Towards From Manual to Automatic Semantic Annotation: Based on Ontology Eleme...
PDF
IRJET - Deep Collaborrative Filtering with Aspect Information
PPS
Semantic Web in Action: Ontology-driven information search, integration and a...
DOCX
Towards Ontology Development Based on Relational Database
PDF
OOP ppt.pdf
PPTX
Software_Engineering_Presentation (1).pptx
PDF
Ijetcas14 368
PPTX
Building a Semantic search Engine in a library
PDF
Artificial-Intelligence--AI And ES Nowledge Base Systems
PDF
ARTIFICIAL INTELLIGENCE AND EXPERT SYSTEMS KNOWLEDGE-BASED SYSTEMS TEACHING ...
PDF
Feature analysis of ontology visualization methods and tools
PDF
IRJET- Factoid Question and Answering System
PDF
Novel Database-Centric Framework for Incremental Information Extraction
PPTX
expert systems dudychr go ovefivff[1].pptx
Constructing an Office Domain Ontology using Knowledge Engineering Process
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
ONTOLOGY VISUALIZATION PROTÉGÉ TOOLS – A REVIEW
A Review on Reasoning System, Types, and Tools and Need for Hybrid Reasoning
Semantic IoT Semantic Inter-Operability Practices - Part 1
Finding new framework for resolving problems in various dimensions by the use...
Towards From Manual to Automatic Semantic Annotation: Based on Ontology Eleme...
IRJET - Deep Collaborrative Filtering with Aspect Information
Semantic Web in Action: Ontology-driven information search, integration and a...
Towards Ontology Development Based on Relational Database
OOP ppt.pdf
Software_Engineering_Presentation (1).pptx
Ijetcas14 368
Building a Semantic search Engine in a library
Artificial-Intelligence--AI And ES Nowledge Base Systems
ARTIFICIAL INTELLIGENCE AND EXPERT SYSTEMS KNOWLEDGE-BASED SYSTEMS TEACHING ...
Feature analysis of ontology visualization methods and tools
IRJET- Factoid Question and Answering System
Novel Database-Centric Framework for Incremental Information Extraction
expert systems dudychr go ovefivff[1].pptx
Ad

More from infopapers (20)

PDF
Implementing an ATL Model Checker tool using Relational Algebra concepts
PDF
Deliver Dynamic and Interactive Web Content in J2EE Applications
PDF
Building a Web-bridge for JADE agents
PDF
An Executable Actor Model in Abstract State Machine Language
PDF
A New Model Checking Tool
PDF
CTL Model Update Implementation Using ANTLR Tools
PDF
Generating JADE agents from SDL specifications
PDF
A general frame for building optimal multiple SVM kernels
PDF
Optimization of Complex SVM Kernels Using a Hybrid Algorithm Based on Wasp Be...
PDF
An evolutionary method for constructing complex SVM kernels
PDF
Evaluation of a hybrid method for constructing multiple SVM kernels
PDF
Interoperability issues in accessing databases through Web Services
PDF
Using Ontology in Electronic Evaluation for Personalization of eLearning Systems
PDF
An AsmL model for an Intelligent Vehicle Control System
PDF
Using genetic algorithms and simulation as decision support in marketing stra...
PDF
Models for a Multi-Agent System Based on Wasp-Like Behaviour for Distributed ...
PDF
A new co-mutation genetic operator
PDF
Modeling the Broker Behavior Using a BDI Agent
PDF
Algebraic Approach to Implementing an ATL Model Checker
PDF
Generic Reinforcement Schemes and Their Optimization
Implementing an ATL Model Checker tool using Relational Algebra concepts
Deliver Dynamic and Interactive Web Content in J2EE Applications
Building a Web-bridge for JADE agents
An Executable Actor Model in Abstract State Machine Language
A New Model Checking Tool
CTL Model Update Implementation Using ANTLR Tools
Generating JADE agents from SDL specifications
A general frame for building optimal multiple SVM kernels
Optimization of Complex SVM Kernels Using a Hybrid Algorithm Based on Wasp Be...
An evolutionary method for constructing complex SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernels
Interoperability issues in accessing databases through Web Services
Using Ontology in Electronic Evaluation for Personalization of eLearning Systems
An AsmL model for an Intelligent Vehicle Control System
Using genetic algorithms and simulation as decision support in marketing stra...
Models for a Multi-Agent System Based on Wasp-Like Behaviour for Distributed ...
A new co-mutation genetic operator
Modeling the Broker Behavior Using a BDI Agent
Algebraic Approach to Implementing an ATL Model Checker
Generic Reinforcement Schemes and Their Optimization

Recently uploaded (20)

PPTX
INTRODUCTION TO EVS | Concept of sustainability
PDF
Placing the Near-Earth Object Impact Probability in Context
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
2. Earth - The Living Planet earth and life
PDF
An interstellar mission to test astrophysical black holes
PPTX
Microbiology with diagram medical studies .pptx
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PPTX
2Systematics of Living Organisms t-.pptx
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PDF
Sciences of Europe No 170 (2025)
PDF
. Radiology Case Scenariosssssssssssssss
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PDF
HPLC-PPT.docx high performance liquid chromatography
INTRODUCTION TO EVS | Concept of sustainability
Placing the Near-Earth Object Impact Probability in Context
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
2. Earth - The Living Planet earth and life
An interstellar mission to test astrophysical black holes
Microbiology with diagram medical studies .pptx
7. General Toxicologyfor clinical phrmacy.pptx
ANEMIA WITH LEUKOPENIA MDS 07_25.pptx htggtftgt fredrctvg
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
Phytochemical Investigation of Miliusa longipes.pdf
2Systematics of Living Organisms t-.pptx
Derivatives of integument scales, beaks, horns,.pptx
The KM-GBF monitoring framework – status & key messages.pptx
Introduction to Fisheries Biotechnology_Lesson 1.pptx
Biophysics 2.pdffffffffffffffffffffffffff
bbec55_b34400a7914c42429908233dbd381773.pdf
Sciences of Europe No 170 (2025)
. Radiology Case Scenariosssssssssssssss
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
HPLC-PPT.docx high performance liquid chromatography

Intelligent agents in ontology-based applications

  • 1. Intelligent agents in ontology-based applications FLORIN STOICA Computer Science Department “Lucian Blaga” University Sibiu Str. Dr. Ion Ratiu 5-7, 550012, Sibiu ROMANIA IULIAN PAH Department of Sociology “Babes-Bolyai” University Cluj-Napoca Bd.21 decembrie 1989, no.128-130, 400604, Cluj-Napoca, ROMANIA Abstract: - Development of intelligent agents is not a trivial task. In this paper, a Web-interfaced JADE agent is linked to a knowledge-base system in order to get intelligent behaviour. The knowledge-base system was implemented using Protégé-2000 as tool for modeling ontologies and Algernon as inference engine. The example application was developed in Sun Java Studio Creator 2, an Integrated Development Environment (IDE) for developing state-of-the-art JavaServer Faces Web applications. Key-Words: - agent, JADE, Protégé, Algernon, Knowledge-based systems 1 Introduction When we talk about intelligent agents, the question often arises, what do we mean by intelligence? In this paper, we consider that an agent is intelligent if it acts rationally. More specifically, intelligence refers to the ability of the agent to capture and apply application domain-specific knowledge and processing to solve problems. Intelligent behavior can be produced by the manipulation of symbols. Symbols are tokens that represent real-world objects or ideas and can be represented inside a computer by character strings or by numbers. In this approach, a problem must be represented by a collection of symbols, and then an appropriate algorithm must be developed to process these symbols. There are several typical ways of manipulating symbols that have proven useful in solving problems. The most common approach is to use symbols in formulations of if-then rules that are processed using reasoning techniques called forward and backward chaining. In this paper, we develop an example application based on information agent, used to deliver useful information to the user, according with his preferences. This information is gathered by the agent from the Web using web services or through collaboration with other agents, and inserted into a knowledge base. The knowledge base is then queried using a set of if-then rules and an inference engine. The rules are defined dynamically by the agent according to user preferences. We are investigating some tools (Protégé, Algernon, JADE) used in implementation of an intelligent agent with reasoning capabilities. 2 Knowledge representation What is knowledge? We adopt the following definition for knowledge: “the fact or condition of being aware of something” [8]. But how do we make a computer aware of something? This problem, called knowledge representation, is one of the first, most fundamental issues that researchers in artificial intelligence had to face. There are many different kinds of knowledge we may want to represent: simple facts or complex relationships, rules for natural language syntax, associations between related concepts, inheritance hierarchies between classes of objects. In addition to being easy to use, a good knowledge representation also must be easily modified and extended, either by changing the knowledge using a GUI tool, or through automatic techniques. The most popular knowledge representation is declarative representation. In declarative knowledge representation, a user simply states the ontology and specific instances of data, which represent pure knowledge. An ontology is a formal explicit description of concepts in a domain of discourse (classes (sometimes called concepts)), properties of each concept describing various features and attributes of the concept (slots (sometimes called roles or properties)), as well as the relationships between the concepts The knowledge base is the central repository of information containing the ontology and specific instances of data (a set of individual instances of classes - the facts known about objects). The process of mapping the set of knowledge in a particular problem domain and converting it into a knowledge base is called knowledge engineering or knowledge acquisition. While essential, the knowledge acquisition is a difficult and costly process, in which are 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 274 ISSN: 1790-5109
  • 2. identified several unique roles: a domain expert and a knowledge engineer. A knowledge engineer is a person who can take the domain knowledge and represent it in a form for use by the reasoning system. Using an appropriate tool for this task (such as Protégé) may be very useful. A reasoning system is used in conjunction with a knowledge base and with a set of if-then rules to answer questions and solve problems regarding the domain. 3 Knowledge-based systems A knowledge-based system is the common term used to describe a rule-based processing system. If-then rules are easily manipulated by reasoning systems because if-then rules are easily understandable, each rule can be viewed as standalone unit of information, new knowledge can be easily added, and existing knowledge can be easily changed by creating or modifying individual rules. A knowledge-based system consists of four major elements: a knowledge base (ontology + a set of individual instances of classes), a set of if-then rules, a working memory or database of derived facts and data, an inference engine, which contains the reasoning logic used to process rules and data. Fig. 1 Architecture of a knowledge-based system The reasoning logic of an inference engine is based on forward chaining and backward chaining [8]. Forward chaining is a data-driven reasoning process in which a set of rules is used to derive new facts from initial set of data. The forward-chaining algorithm generates new data by calling effector procedures (procedural program code) or firing of the rules. Backward chaining is often called goal-directed inferencing, because a particular consequence or goal clause is evaluated first, and then the algorithm backward through the rules. Backward chaining uses rules to answer questions about whether a goal clause is true or not, processing only rules that are relevant to question. One advantage of backward chaining is that, because the inferencing is directed, information can be requested from the user when it is needed. 4 Tools for implementing a Knowledge- based system 4.1 Comparative study of tools When starting out on an ontology project, the first and reasonable reaction is to find a suitable ontology software editor. The ability to organize and manage an emerging ontology is very important to an editor's usability. Convenient and intuitive presentations and manipulations of ontology’s interlinking concepts and relations are essential. Because many ontology models support multiple inheritances in the concept hierarchies and relation hierarchies, keeping the associations straight is a challenge. A graph presentation is less common, although it can be quite useful for actual ontology editing functions that change concepts and relations. Finally, it is worth considering the inferencing support afforded by the ontology editor (beyond classification in description logic editors). While ontologies themselves can be treated as standalone specifications, they are ultimately used to help answer queries about a body of information. Some editors incorporate the ability to add additional axioms and deductive rules to the ontology for evaluation within the defined target of the development environment. The survey presented in [10] covers software tools that have ontology editing capabilities and are in use today. The tools may be useful for building ontology schemas (terminological component) alone or together with instance data. The following implementation levels were considered: 0 = Nil, 1= Poor, 2 = OK, 3 = Good, 4 = Very Good, 5 = Excellent Criteria Ontolingua Protégé 2000 OntoEdit Clarity of interface 3 5 5 Interface Consistency Meaning of Commands 4 2 5 4 5 4 Visualization Ontology overview 2 2 5 5 5 5 HCI 13 24 24 Local installation 0 5 5 Updating speed 2 4 4 Help system 4 5 2 Operational Aspects 6 14 11 Stability of the tool 3 5 5 User support 4 5 0 Features of free version 5 5 2 Tool Support Features 12 15 7 Total 31 53 42 Table 1 Comparison of Usability Aspects [10] Knowledge base (ontology + facts) If-then rules Inference engine Working memory 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 275 ISSN: 1790-5109
  • 3. Criteria Ontolingua Protégé 2000 OntoEdit Multiple inheritance 4 5 0 Exhaustive decomposition Disjoint decomposition 4 5 0 5 0 5 Structural aspects 13 10 5 Example ontologies 3 5 0 Ontology Library 5 3 0 Library 8 8 0 Java based 0 5 5 Database Backend 0 5 0 Implementation features 0 10 5 Total 21 28 10 Table 2 Comparison of Ontological Aspects [10] 4.2 Protégé-2000 and Algernon In order to implement a knowledge-base system, we are using Protégé-2000 for ontology development and knowledge-acquisition and Algernon as inference engine. Why select protégé? The Protégé-2000 tool provides access to all of his functionality through a uniform GUI (graphical user interface) whose top-level consists of overlapping tabs for compact presentation of the parts and for convenient co-editing between them. This "tabbed" top-level design permits an integration of the modeling of ontology of classes describing a particular subject, the creation of a knowledge- acquisition tool for collecting knowledge, the entering of specific instances of data and creation of a knowledge base, and the execution of applications [6]. Besides its user friendly interface, plug-in architecture and other features mentioned above, Protégé 2000 supports collaborative ontology editing. In the multi-user mode, Protégé 2000 allows multiple clients to edit simultaneously the same ontology hosted on a Protégé server. All changes made by one client are immediately visible by other clients. The main assumption of Protégé-2000 is that knowledge-based systems are usually very expensive to build and maintain. Protégé-2000 is designed to guide developers and domain experts through the process of system development. Protégé-2000 is designed to allow developers to reuse domain ontologies and problem- solving methods, thereby shortening the time needed for development and program maintenance. Several applications can use the same domain ontology to solve different problems, and the same problem-solving method can be used with different ontologies. Algernon can be used from stand-alone applications (in our example, the Algernon API will be used in order to call the Algernon engine from a JADE agent) or as a Protégé tab plug-in that allows all operations to be performed from within the Protégé GUI. Algernon is an inference engine that supports both forward and backward chaining rules. Also, Algernon is suitable for reading and writing Protégé knowledge bases, providing a concise way to retrieve and store information in a knowledge base (KB). Likewise, calls out to Java and LISP for non-KB calculations are possible [7]. Algernon's syntax for a clause is like a predicate: (slot frame value). A path is a sequence of clauses. In Algernon, a variable starts with a question mark (example: ?name). Variables do not have to be declared, but they are implicitly assigned a type according to their first use. They keep that type throughout the scope of their current path. A variable may be bound (assigned a value) through a query or through explicit assignment (with the :BIND command). A variable’s binding is passed to all succeeding clauses in the path. A ground clause (assert) either contains no variables, or all of its variables have been bound by previous clauses in the path. When Algernon processes a ground clause, it will assert the information into the KB if it is not there already. If it is already there the clause will succeed, but will not change the KB. Asserting new information into the KB will cause Algernon to fire relevant forward-chaining rules. A non-ground clause (query) contains an unbound variable. When Algernon processes a non-ground clause, i.e. the knowledge base is queried, it will first fire any relevant backward-chaining rules, and then it will query the KB for the information in the clause. In order to fire, the key clause of the rule must match the new fact. In forward chaining rules the key clause is the first clause in the antecedent. In backward chaining rules the key clause is the first clause in the consequent. A rule can contain commands that perform KB retrievals, KB assertions, KB class, instance and slot creation commands, and other Algernon operators that print output, retrieve the current date, call external Java or LISP routines, etc. Algernon facilities include [7]: supports interleaved forward and backward chaining, provide direct manipulation and interaction with Protégé knowledge bases, contains operators that create and delete classes, instances and slots, retrieve and store slot values, supports access to multiple concurrent KBs, provide a Protégé tab plug-in that allows all operations to be performed from within the Protégé GUI, etc. 5 General architecture of ontology- based application One of the main reasons for building an ontology-based application is to use a reasoner to derive additional truths about the concepts we are modeling and/or to answer 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 276 ISSN: 1790-5109
  • 4. queries and solve problems regarding the domain. Figure 2, taken from [9], shows the proposed layers of the Semantic Web, of the Tim Berners-Lee’s Semantic Web architecture, with the higher level languages using the syntax (and semantics) of the lower level languages. Fig. 2 The Tim Berners-Lee’s Semantic Web layered mode Our application focuses primarily on the ontology development level, on the rules describing logic and used by an inferencing engine in order to answer queries about a requested information, and the sort of agent- based computing that enable exploitation of the constructed knowledge-based system. 6 Reasoning JADE agents JADE is a middleware that facilitates the development of multi-agent systems and applications conforming to FIPA standards for intelligent agents [1]. It includes: a runtime environment where JADE agents can “live” and that must be active on a given host before one or more agents can be executed on that host, a library of classes that programmers have to/can use (directly or by specializing them) to develop their agents and a suite of graphical tools that allows administrating and monitoring the activity of running agents. The computational model of an agent is multitask, where tasks (or behaviours) are executed concurrently. Each functionality/service provided by an agent should be implemented as one or more behaviours. A scheduler, internal to the base Agent class and hidden to the programmer, automatically manages the scheduling of behaviours. A behaviour represents a task that an agent can carry out and is implemented as an object of a class that extends jade.core.behaviours.Behaviour. In order to make an agent execute the task implemented by a behaviour object it is sufficient to add the behaviour to the agent by means of the addBehaviour() method of the Agent class. In order to adding reasoning capabilities to a JADE agent, this must be interfaced with Algernon. Using the Algernon Java API, the code is simple: // Algernon instance protected Algernon f_algy = null; protected AlgernonKB f_kb = null; //Protégé Knowledge Base protected String f_prjFile = "airfarekb.pprj"; ErrorSet errors = new ErrorSet(); f_algy = new Algernon(); f_kb = new AlgernonProtegeKB( f_algy, f_prjFile); f_algy.addKB(f_kb); Result result = (Result)f_algy.ask(query, errors); where query represents a valid Algernon path. 7 The example Web application In the following we will describe a sample JADE agent which use a rule base and backward chaining to determine when a discovered airfare is of interest to the user. The JADE agent is part of a Web application developed with Java Studio Creator 2, a powerful IDE based on JavaServer Faces technology [2]. When scheduling a trip, a user will often find that the airfare fluctuates over time, based on different factors: the number of seats available, how far in advance the trip is booked, etc. To get the best fares available, the user needs to keep checking the airline or travel services Web site for flight schedules that meet his travel criteria, waiting for a convenient price. We suppose that our agent is getting the information about published airfares by invoking web services or by querying other agents. Let’s further suppose that the user desires to fly from Sibiu to Bucharest on April 1st and returns on April 11th . The user is willing to pay up to 100 € for his ideal flight time: he desires to fly from Sibiu between 8 and 12 o’clock or after 17 o’clock and catches his return flight between 16 and 22 o’clock. But often, when scheduling a trip, a user is willing to settle for less than ideal if the price is right. Thus, the user may take a flight that departs before 8 o’clock and returns between 16 and 22 o’clock, if the price is less than 80 €. Or he may be willing to leave before 8 o’clock and returns after 22 o’clock if the price is less than 50 €. Without using an agent, the user would periodically goes out to the Web site, enter in his dates, and check the flights that are were returned to see if any mach his flight schedule and pricing criteria. If the prices are changing rapidly, the user may needs to repeat this process quite often in order to get the right flights at the desired price. Our JADE agent does just that. Resource Description Framework + RDF Schema Ontology Digitalsignature UNICODE Universal resource indicator (URI) XML + Name space + XML Schema + XML Querry Logic + rules descrybing logic PROOF Trust Encryption Inference Meaning of data Self- describing document 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 277 ISSN: 1790-5109
  • 5. 7.1 Ontology development Our proposed ontology contains three classes: Flight, Option and Rank. Slots of class Flight are described in figure 4, and have the following signification (table 3): Fig. 3 Classes from Protégé ontology Fig. 4 Slots of class Flight Slot name Description d_date (r_date) Departure (return) date d_time (r_time) Departure (return) time d_option (r_option) Captures the user preferences: departure (return) time is desirable or undesirable. Values of these slots are instances of class Option from_City Departure City to_City Destination City number Flight number price Price of the trip rank Captures the user preferences, involving values of the following slots: d_option, r_option and price Table 3. Ontology slots and their signification The class Rank has three instances: good, better and best. For testing purposes, we can use the Instance Editor of Protégé to introduce some instances of class Flight in the Knowledge base (figure 5), and then we can test the reasoning rules with Algernon plug-in, using Algernon tab (figure 6). Fig. 5 Protégé Instance Editor Fig. 6 Testing rules in Algernon tab 7.2 Generating rules After the user is questioned about his preferences, the JADE agent will generate rules to update the knowledge base (setting values for slots d_option, r_option and rank of instances of class Flight) and for delivering useful information to the user. By example, the following backward chaining rule will be used to define whether the return time is in desired range: ((:add-rule Flight ((r_option ?flight undesirable) <- (r_time ?flight ?time) (:TEST (:LISP (string< ?time "16.00")))) ((r_option ?flight desirable) <- (r_time ?flight ?time) (:TEST (:LISP ( and (string> ?time "16.00") (string< ?time "22.00"))))) ((r_option ?flight undesirable) <- (r_time ?flight ?time) (:TEST (:LISP (string> ?time "22.00")))) )) The following rule will be used to rate each set of flight options, and will assert a value for the rank slot. This slot can take on the value of good, better or best (which are instances of class Rank). ((:add-rule Flight ((rank ?flight best) <- (d_option ?flight ?d) (r_option ?flight ?r) (price ?flight ?p) (:NAME ?d ?dn) (:NEQ ?dn "undesirable") (:NAME ?r ?rn) (:NEQ ?rn "undesirable") (:TEST (:LISP (< ?p 100)))) ... ((rank ?flight good)<-(d_option ?flight ?d) (r_option ?flight ?r) (price ?flight ?p) (:NAME ?d ?dn) (:NEQ ?dn "desirable") (:NAME ?r ?rn) (:NEQ ?rn "desirable") (:TEST (:LISP (< ?p 50)))) )) Invoking the defined backward rules will be done by executing the following queries: ((:INSTANCE Flight ?f) (:trace :verbose) (:CLEAR-RELATION ?f d_option) (d_option ?f ?o)) ((:INSTANCE Flight ?f) (:trace :verbose) (:CLEAR-RELATION ?f r_option) (r_option ?f ?r)) ((:INSTANCE Flight ?f) (:trace :verbose) (:CLEAR-RELATION ?f rank) (rank ?f ?r)) Finally, is constructed a last query to deliver the requested information to the user, according to his preferences, captured from the Web page of application. Such a query may be in the following form: ((:INSTANCE Flight ?f) (rank ?f better) (d_date ?f "01.04.2008") (r_date ?f "11.04.2008") 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 278 ISSN: 1790-5109
  • 6. (from_City ?f "Sibiu")(to_City ?f "Bucuresti") (:NAME ?f ?fn)(number ?f ?nr)) 7.3 The JADE ProxyAgent First of all, the JADE agent must be interfaced with a Web browser. A technical solution for this problem can be found in [4] where is provided a general method of how can be linked a JADE agent to a JavaServer Faces (JSF) component, in order to allow Web applications to be interfaced with a JADE platform. The example JSF application is developed in Sun Java Studio Creator 2, an Integrated Development Environment (IDE) for developing state-of-the-art web applications. Based on JSF technology [3], this IDE simplifies writing Java code by providing well-defined event handlers for incorporating business logic, without requiring developers to manage details of transactions, persistence, and other complexities. The Web application is interfaced with a proxy-agent running on a JADE platform, in order to retrieve and display the requested information to the user. Each user’s request is linked to a behavior of the JADE ProxyAgent in charge of handling the request. In fact, the ProxyAgent has three behaviours in order to provide the required functionality: - behaviour AddRules, executed only once, to define the backward chaining rules; - behaviour UpdateKB, executed periodically, querying the Web for information about flights which satisfy the user preferences; - behaviour GetFlights, executed at each user request, and handling that request by querying the knowledge base and displaying the information retrieved. All behaviours are using Algernon API in order to access the Algernon inference engine, as mentioned in section 6. In figure 7 is showed the ProxyAgent running within a JADE platform, and in figure 8 is depicted the Web interface of the application, which interacts with the user. Fig. 7 The reasoning ProxyAgent References: [1] F. Bellifemine, G. Caire, T. Trucco, G. Rimassa, JADE programmer's guide, http://jade.tilab.com Fig. 8 The Web interface of the JSF application [2] Java Studio Creator Field Guide, 2nd ed., Sun Microsystems, http://developers.sun.com/jscreator/ learning/bookshelf/ [3] D. Geary, C. Horstmann, Core JavaServer Faces, Prentice Hall, 2004, ch. 1-5. [4] F. Stoica, Building a Web-bridge for JADE agents, Proceedings of the RoEduNet IEEE International Conference, 2006, “Lucian Blaga” University of Sibiu Printing House, ISBN 973-739-277-9 [5] Protégé-Frames User's Guide, http://protege.stanford.edu/doc/ users_guide/index.html [6] H. Knublauch, An AI tool for the real world - Knowledge modeling with Protégé, http://www.javaworld.com/javaworld/jw- 06-2003/jw-0620-protege.html [7] M. Hewett, Algernon in Java, http://algernon-j.sourceforge.net/doc/ [8] J. P. Bigus, J. Bigus, Constructing Intelligent Agents using Java, 2nd ed., John Wiley & Sons, Inc., 2001 [9] M. Davis, Next-Wave Publishing, Revolutions in Content, The Seybold Report, Vol. 3, No. 23, March 2004 [10]R. Jakkilinki, N. Sharda, I. Ahmad, Ontology-Based Intelligent Tourism Information Systems: An overview of Development Methodology and Applications, Tourism Enterprise Strategies: Thriving – and Surviving – in an Online Era, 11-12 July 2005, Centre for Hospitality and Tourism Research (CHTR), Victoria University, Melbourne, Australia 12th WSEAS International Conference on COMPUTERS, Heraklion, Greece, July 23-25, 2008 ISBN: 978-960-6766-85-5 279 ISSN: 1790-5109