• No se han encontrado resultados

Evaluación empleando el índice de calidad

2. Índice de calidad propuesto

3.3. Evaluación empleando el índice de calidad

In this section, we discuss the level of support that existing agent programming languages have for specifying a deliberation strategy for selecting intentions for adoption and exe- cution.

2.4.1 Programming selection of intentions for adoption

In most hybrid agent programming languages, the programmer can specify which plan to select for adoption by means of rule-based constructs which include a condition to de- termine when they are applicable. For example, in PRS, the programmer uses KAs where the body of a KA specifies the plan and the invocation condition of the KA determines when it is suitable to use the plan in the KA. “Plans” in AgentSpeak(L) also allow the programmer to specify sequences of actions to adopt where the triggering event of a plan determines when it is relevant to consider the plan, and the context query of the plan determines when it is applicable to use the plan with respect to the beliefs of the agent. Goal planning rules in 3APL and actions in GOAL have a similar purpose.

vide direct support for programming a strategy to select among multiple applicable plans in the languages. Instead, such a strategy is specified by means of selection functions which do not belong to the syntax of these agent programming languages and are de- fined the host languages which are used to implements their interpreters. For example, the selection function to select an applicable plan in Jason is implemented in Java, the host language which implement the Jason interpreter. The only way to alter this selection function is to reprogram it in Java and recompile the Jason interpreter.

PRS is an exception as it allows the programmer to define strategies to select multiple applicable KAs. Here, the programmer can use so-called metalevel beliefs for storing meta information about object-level KAs such as their estimated costs in time and money, their priorities, and their success rate to realise a goal. Furthermore, she can define metalevel KAs for reasoning about the level of importance and utility of object-level KAs so that the “best” KA can be determined and selected.

2.4.2 Programming selection of intentions for execution

Agent programming languages provide even less support for programming strategies to select intentions for execution. The interpreters of these languages usually implement a default strategy for selecting a plan to execute. For example, Jason by default imple- ments a selection strategy [Bordini et al., 2007] based on a “round-robin” scheduler. A different strategy can be implemented by over-riding this default selection function and recompiling the Jason interpreter. Additionally, the programmer can only change the de- fault selection for execution slightly by setting the atomic flag for plans. For an intention generated by a plan declared with the atomic flag, once it is selected for execution, it will be selected for execution in subsequent cycles until completed. However, this feature of Jason only leaves the agent programmer with a little space to change the default selection strategy.

define a meta language for programming deliberation strategies. In such a language, the programmer is provided with terms to define information about plans such as costs and meta-statements for selecting plans, applying plans and executing a plan. This meta- statements then can be combined using sequential, conditional and iterative constructs to define a deliberation program. The language defined in [Hindriks et al., 1998] was used to program deliberation cycles of AgentSpeak(L) and 3APL [Hindriks et al., 1999]. The language defined in [Dastani et al., 2003a] was used to program deliberation cycles of 3APL [Hindriks et al., 1999]. Obviously, this approach requires a language (in addition to agent programming languages) to define deliberation strategies.

No single deliberation strategy is clearly “best” for all agent task environments. For example, in a deliberation strategy, intentions can be executed in an interleaving or non- interleaving fashion. Interleaving can improve the performance of agents as they can achieve more than one goals in parallel. However, it can also give rise to contention for resources so that no intentions are executed successfully [Thangarajah et al., 2003]. For ex- ample, an agent has two intentions that achieve two goals to be at two different locations which are in opposite directions. Then, interleaving the execution of these two inten- tions makes the agent to go around a position between the two locations. It is therefore important that the agent developer has the freedom to adopt the strategy which is most appropriate to a particular problem. To this end, it is worth looking back at the discus- sion in [Hayes, 1977] about designing languages to program knowledge reasoners Hayes argues it is a good engineering practice that the language to represent knowledge and the language to specify strategies to reason about knowledge are the same. Similarly, agents can use their own knowledge (beliefs, goals, plans, intentions, etc.) to reason about which new plan to adopt, which existing intention to execute during deliberation. Therefore, it is also a good engineering practice if the language to program an agent and the language to specify the deliberation strategy for this agent are the same. One way to achieve this is to use procedural reflection.

Documento similar