• No se han encontrado resultados

4. Matriz A: Indicadores de acceso, progreso y egreso para estudiantes

5.3 Egreso para estudiantes con talento extraordinario

sensor input action output Modelling layer Planning layer Reactive layer Control subsystem Action subsystem

Figure 5.8: Hybrid agent horizontal layered TouringMachines architecture. Adapted from Wooldridge (2009)

The TouringMachines architecture was first implemented to provide a rule set for autonomous vehicles driving between locations where there were other vehicles. The Reactive layer is implemented as a set of state action pairs that simply suggest an action based on the situation, such as collision avoidance. The Planning layer deals with attempting to satisfy the agent’s goals from a set of reference schemas. Based on these schemas and the current situation, the planning layer will adopt a strategy that is most beneficial for fulfilling the current goal. The Modelling layer renders a representation of the other agents in the system in an attempt to predict conflicts and generates goals to try to avoid them. These new goals are then passed to the Planning layer which will provide a strategy, based on these goals. These three layers make up the Control subsystem which decides which layer should have control of the agent at the present moment.

5.11

Java Agent DEvelopment Framework (JADE)

JADE is a Java based platform for developing FIPA compliant agent based systems. It comprises a set of classes that allow the user to produce a multi-threaded agent system and a set of tools for testing the functionality of both individual agents and the system as a whole. It is distributed under an open source Library GNU Public Licence (LGPL) allowing for a

5.11. Java Agent DEvelopment Framework (JADE) 111

large degree of collaboration both with projects using the platform and with the development of the platform itself. Unlike JAVA, where objects have methods to perform actions, JADE provides a set of behaviours that can be utilised and extended to allow the agent to act in the desired manner.

5.11.1 Behaviours

It is possible, with JADE, to run several behaviours concurrently. However, the schedul- ing, unlike with JAVA, is not preemptive, so it is up to the programmer to decide when a behaviour should switch and take precedence over another. This can be done by making a behaviour active or blocked using JAVA methods within JADE. The ability to do this makes programming in JADE more flexible for scheduling. However, it does become more challeng- ing from a complexity point of view. A description of some of the more useful behaviours provided by JADE are given below.

One Shot Behaviour

A One Shot Behaviour, as the name might suggest, is an action that is performed only once. It can be used to set up parameters for agents when they are initialised or to form subroutines of a Sequential Behaviour, as will be discussed later in this section.

Cyclic Behaviour

A Cyclic Behaviour is one of the more commonly used behaviours, especially with regard to agent communication. For message receiving, a Cyclic Behaviour can be implemented to lie dormant in the background until a new message is received. Once it receives a message, the behaviour can become active to process the message information.

Ticker Behaviour

Another commonly used behaviour is the Ticker Behaviour which performs an action peri- odically as defined by a specified duration. This is useful for values that need to be updated periodically or for messages to other agents, informing them of the current state of the sys- tem.

5.11. Java Agent DEvelopment Framework (JADE) 112

Sequential Behaviour

A Sequential Behaviour is used when the type of action to be performed becomes more complex and a sequence of smaller actions is required. An example of when this might be useful would be if two agents need to cooperate to perform a task, but both are reliant on the other performing one stage of the task before they can start on theirs. However, in this example, safeguards would need to be implemented to avoid deadlock. It would be possible to produce a Contract-Net Protocol routine using a Sequential Behaviour. However, JADE provides two Java classes that can be extended to provide this functionality called the ContractNetInitiator class and the ContractNetResponder class.

Whilst there are more behaviours that JADE provides, they are essentially extensions of the ones detailed here and therefore will not be discussed here.

5.11.2 Agent Communication in JADE

One of the most useful elements of JADE is its handling of message passing between agents without the need for direct location knowledge or handling of complex string parsing. The agent’s location is all handled by the AMS and the MTS. The addition of an appropriate AID to the receiver field of the message is all that is required from a programming viewpoint. The message content requires encoding and decoding in a string format and, while this could be done by systematically adding parameters to Java strings, JADE provides message content tools that does this automatically, provided that there is a fully formed set of ontologies that JADE can encode into and parse from strings. This feature allows for any Java objects to be passed from one agent to another whilst still maintaining the principles of user readable messaging.

5.11.3 Debugging Tools

JADE provides a number of debugging tools to allow the user to check the operation of their multi-agent system. All of the debugging tools are implemented as agents within the AP so they are not global inspectors, but cohabitants of the system. This section details some of the more useful debugging agents.