···684684685685\subsubsection{Multi-agent transition rules}
686686687687-The execution of a 2APL multi-agent system is the interleaved executions of the involved individual agents and the environments.
688688-689689-We assume that the external shared environments can change either by the execution of an agent's external action in one of the environments or by the internal dynamics of the environments.
687687+The execution of a 2APL multi-agent system is the interleaved executions of the involved individual agents and the environments. We assume that the external shared environments can change either by the execution of an agent's external action in one of the environments or by the internal dynamics of the environments.
690688691689Therefore, {\bf the configuration of a multi-agent system can be modified} when either the configuration of one of the involved individual agents is modified or when the shared environments change.
692690693691\section{2APL Platform}\label{sec:platform} %%%%%%% BORJA+MARCOS HERE
694692695695-\subsection{Management of Messages}
693693+The 2APL platform is built on the top of JADE (Java Agent DEvelopment Framework). JADE is a software framework fully implemented in Java with the goal to simplify the implementation of multi-agent systems through a middleware that complies with the FIPA specifications and through a set of graphical tools that supports the debugging and deployment phases. We will briefly discuss the tools that can be used in the 2APL platform. Besides the tools from the JADE platform the 2APL platform provides some 2APL specific tools. We describe these tools which can be accessed through the toolbar buttons of the 2APL platform.
694694+695695+\subsection{JADE tools}
696696+697697+The current 2APL platform comes with three JADE tools: the {\bf RMA} tool, {\bf sniffer} tool, and the
698698+{\bf introspecto}r tool. The RMA (Remote Monitoring Agent) tool can be used to control the life cycle of the agent platform and of all the registered agents. We can see this tool in the figure~\ref{fig:rma}.
699699+700700+\begin{figure}[htp]
701701+\centering
702702+\includegraphics[keepaspectratio,scale=0.7]{fig/rma.png}
703703+\caption{Remote Monitoring Agent}
704704+\label{fig:rma}
705705+\end{figure}
706706+707707+The sniffer (figure ~\ref{fig:sniffer}) can be used for tracking messages exchanged in a JADE based environment.
708708+You can select agents to be sniffed. Every message directed to this agent(s) or coming from this
709709+agent(s) is tracked and displayed in the sniffer window.
710710+711711+\begin{figure}[htp]
712712+\centering
713713+\includegraphics[keepaspectratio,scale=0.7]{fig/sniffer.png}
714714+\caption{Sniffer}
715715+\label{fig:sniffer}
716716+\end{figure}
717717+718718+The introspector (figure ~\ref{fig:introspector}) allows to monitor and control the life-cycle of a running agent and its exchanged messages, both the queue of sent and received messages. It allows also to monitor the queue of behaviours, including executing them step-by-step.
719719+720720+\begin{figure}[htp]
721721+\centering
722722+\includegraphics[keepaspectratio,scale=0.7]{fig/introspector.png}
723723+\caption{Introspector}
724724+\label{fig:introspector}
725725+\end{figure}
726726+727727+\subsection{2APL specific tools}
728728+729729+\subsubsection{The FGDC tool}
730730+731731+The FGDC (Flexible Graphical Deliberation Cycle) tool (figure~\ref{fig:fgdc}) can be used to visualize and \textbf{program the deliberation cycle of an agent}.
732732+733733+The agent's deliberation cycle is used to determine what the agent should do next, e.g., execute an action, or select a plan to reach a goal. By clicking on the FGDC button of the toolbar, an extra tab will become available in the agent panel. The left panel of the FGDC window shows the deliberation cycle of the currently selected agent. In this panel, the rectangles represent the steps, whereas the arrows represent the sequence in which the steps are to be executed. The panel on the right shows the predefined deliberation steps that can be used. A deliberation step can be added to the deliberation cycle by double clicking on a predefined deliberation steps. The selected predefined deliberation step will then appear in the left panel. Deliberation steps can be linked by arrows by right clicking on the source, dragging the arrow to its destination and dropping it there. The steps and arrows can be deleted by right clicking on them. Some appearance settings of the FGDC can be changed in the FGDC settings window that can be accessed via the settings button located on the right panel. Any modification of the deliberation cycle will be lost by reloading the agent.
734734+735735+\begin{figure}[htp]
736736+\centering
737737+\includegraphics[keepaspectratio,scale=0.7]{fig/fgdc.png}
738738+\caption{Flexible Graphical Deliberation Cycle}
739739+\label{fig:fgdc}
740740+\end{figure}
741741+742742+\subsubsection{The state tracer}
743743+744744+The state tracer (figure~\ref{fig:state}) can be used for showing the execution trace of an agent. Each state shows the beliefs, plans, goals, and log of the agent as a result of executing one deliberation step. With the state tracer it is possible to browse through the history of the execution of the agent.
745745+746746+\begin{figure}[htp]
747747+\centering
748748+\includegraphics[keepaspectratio,scale=0.7]{fig/state.png}
749749+\caption{The state tracer}
750750+\label{fig:state}
751751+\end{figure}
752752+753753+The state tracer can be accessed by clicking on the state tracer tab in the agent panel. With the buttons in the upper part of the tab you can navigate through the state trace. You can select how many states (one, two, or three) to show on one screen and whether to show the beliefs, plans, goals, and log with the menu on the lower part of the tab.
754754+755755+\subsubsection{Management of Messages}
696756697757The fact that 2APL platform is built on the top of JADE (Java Agent DEvelopment Framework) allows to use all the functionality that this framework has to communicate to other agents. Thus, as JADE, 2APL follows FIPA specifications.
698758699759In order to be able to sending messages to running agent, 2APL implements {\bf the message agent}.The message agent can be accessed by clicking on the message agent button in the toolbar. We must specify the receiver, that can be in JADE format, the performatice and the content. Moreover, optionaly, we can specify the language and the ontology of the message.
700760701701-In Figure~\ref{fig:message_agent} we can see the form to send a message to a running agent.
761761+In figure~\ref{fig:message_agent} we can see the form to send a message to a running agent.
702762703763\begin{figure}[htp]
704764\centering