Patrick Taillandier
email: patrick.taillandier@univ-rouen.fr

Olivier Therond
email: olivier.therond@toulouse.inra.fr

Benoit Gaudou
email: benoit.gaudou@univ-tlse1.fr

A new BDI agent architecture based on the belief theory. Application to the modelling of cropping plan decision-making

Keywords: agent-based modelling, BDI architecture, belief theory, cropping plan decision-making. 1

Agent-based simulations are now widely used to study complex systems. However, the problem of the agent design is still an open issue, especially for social-ecological models, where some of the agents represent human beings. In fact, designing complex agents able to act in a believable way is a difficult task, in particular when their behaviour is led by many conflicting needs and desires. A widely used way to formalise the internal architecture of such complex agents is the BDI (Belief-Desire-Intention) paradigm. This paradigm allows to design expressive and realistic agents, yet, it is rarely used in simulation context. A reason is that most agent architectures based on the BDI paradigm are complex to understand by non-computer-scientists. Moreover, they are often very timeconsuming in terms of computation. In this paper, we propose a new architecture based on the BDI paradigm that copes with these two issues. In our architecture, the choice of the most relevant action by an agent is based on the belief theory. We present an application of our agent architecture to an actual model dedicated to cropping plan decision-making. This application that takes into plays thousands of farmer agents shows promising results.

INTRODUCTION

The study of social-ecological systems is a major issue for our society. It has many applications such as risk assessment, country planning or management of natural resources (e.g. (MAELIA, 2012)). Carrying out such studies is most of time very complex. In fact, these systems involve complex spatial and social dynamics. One of the most promising modelling techniques to study the dynamic of such systems is the agent-based modelling and simulation. This technique consists in modelling the studied system as a collection of entities called agents representing both inactive resources and autonomous decision-making actors. An autonomous agent can individually assess its situation and makes its own decisions. An agent-based model can exhibit complex behaviour patterns and provide useful information about the dynamics of the real-world system that it emulates. These last years have seen the emergence of several platforms allowing to ease the development of agentbased models. However, even with these platforms, the problem of the agent design is still an open issue. In fact, designing agents able to make complex reasoning and to interact with its biophysical environment and other agents is a difficult task, in particular for researchers that have no programming skills. In this paper, we propose a new cognitive agent architecture that is particularly well-fitted for simulation of complex systems with numerous autonomous agents. This architecture is based on the BDI (Belief-Desire-Intention) paradigm and the use of the evidence theory to formalise the agent reasoning. EXISTING AGENT ARCHITECTURES

The problem of the agent design and implementation is a classic problem in multiagent simulations and numerous agent architectures were proposed. Some of these architectures such as the finite state machines or the motivational architecture [START_REF] Robert | A motivational architecture of action selection for nonplayer characters in dynamic environments[END_REF] can be very useful when designing simple agents, but are not adapted to complex cognitive agents as their representation capability is fairly limited. A classic paradigm to formalize the behaviour of more complex cognitive agents is the BDI paradigm [START_REF] Rao | Modeling Rational Agents within a BDI-Architecture[END_REF]. Some works showed the interest of using such paradigm in simulation context (e.g. [START_REF] Adam | Agents BDI et simulations sociales. Unis pour le meilleur et pour le pire[END_REF]), yet, it is still rarely used. A reason is that most agent architectures based on the BDI paradigm (e.g. JAM (Hubert, 1999), JASON [START_REF] Bordini | Programming Multi-Agent Systems in AgentSpeak Using Jason[END_REF]) are complex to understand and to use by non-computer-scientists. Moreover, they are often very time-consuming in terms of computation and thus not adapted to simulations with thousands of agents.

ARCHITECTURE PROPOSED

General Architecture

We propose a new agent architecture based on the BDI paradigm that copes with two issues mentioned in Section 2: the understandability aspect and the scalability problem. Our architecture is composed of four databases (Figure 1):

• Plans: the agent's strategic vision. The plans define the strategies that can be followed by the agent. A plan is composed of the following components: o Action set: defines the action that can be applied while considering the plan.

o Action application rules: define the conditions to apply the different actions.

o Plan update rules: define when and how the plan has to be updated (or deleted from the intention base). • Desires: agent's desires. Desires are formalised as a set of criteria that will be used to evaluate the plans. Section 3.2 gives more details about the desires. When an agent acquires new information (by its own perception or by a message sent by another agent), it automatically updates its belief base. When an agent has no chosen intention (empty intention base), it evaluates each plan of its plan base according to its desires and beliefs. Then the agent selects a plan through a multicriteria decision-making process. The selected plan is then added to its intention base. The agent will then continuously choose among the actions proposed by the plan the one that is the most relevant according to its context (defined by its beliefs and desires). At each simulation step, the plan can be deleted or updated through a plan execution control process. In the next sections, we describe the 3 main decision processes: choice of a plan, choice of an action and plan execution control.

Choice of a plan

The choice of a plan is carried out through a multi-criteria decision making process. In order to decrease the problem complexity, we propose to filter the set of plans by keeping only the ones belonging to the Pareto front, then to apply a decisionmaking method. The Pareto front is the set of plans that are non-dominated. A plan is dominated by another one if no desire (criterion) has a better value (higher or lower depending on the type of desire) for this plan than for the other one. In the literature, several methods were proposed to make a decision from a set of criteria. A first family of methods, called partial aggregation methods, consists in comparing the different possible decisions by pair by the mean of outranking relations (e.g. [START_REF] Behzadian | PROMETHEE: A comprehensive literature review on methodologies and applications[END_REF]. Another family of methods, called complete aggregation methods, consists in aggregating all criteria in a single criterion (utility function), which is then used to make the decision (e.g. Jacquet-Lagreze and Siskos 1982). Partial aggregation methods allow to address the problem of criterion incompatibility but lack clarity compared to complete aggregation methods (Ben [START_REF] Mena | Introduction aux méthodes multicritères d'aide à la décision[END_REF]. In our context, we propose to use the same decision-making method than the one we proposed in [START_REF] Taillandier | Use of the Belief Theory to formalize Agent Decision Making Processes: Application to cropping Plan Decision Making[END_REF]Taillandier et al., 2012). This method belongs to the complete aggregation methods and is built on the belief theory [START_REF] Shafer | A mathematical theory of evidence[END_REF]). An advantage of this theory is to allow to make a decision even with incompleteness, uncertainly and imprecision of knowledge. The belief theory defines a frame of discernment, noted Θ, composed of a finite set of hypotheses H i corresponding to the possible plans amongst which the choice has to be made:

Θ = {H 1 , H 2 ,…, H N }
From this frame of discernment, we define the set of all possible assumptions, noted 2 Θ :

2 Θ = {∅, {H 1 }, {H 2 }, ..., {H 1 , H 2 }, ...,Θ}
Each set {H i , ..., H j } represents the proposition that the most relevant hypothesis is one of the hypotheses (plans) of this set.

The belief theory is based on basic belief assignments, i.e. functions that assign to a proposition P, with P∈2 Θ , a value named the basic belief mass (bbm), noted m j (P). It represents how much a criterion j -called source of information-supports the proposition P. The bbm is ranged between 0 and 1 and has to check the following property:

1 P m 2 P j = ∑ ∈ Θ ) (
The proposed decision-making method is composed of 3 steps:

1. Initialization of the basic belief masses. 2. Combination of the criteria. 3. Selection of the best plan.

Step

1-Initialization of the basic belief masses

The first step consists in initializing the basic belief masses for each criterion. The criteria give agent's opinion in favour of a plan, in disfavour of it or do not give its opinion. For each plan, a subset S i of 2 Θ is defined:

S i = {{H i }, {¬H i }, Θ} • {H i }:
this proposition means that the hypothesis H i is true (i.e. the corresponding plan is the best one).

• {¬H i } = Θ -{H i }:
this proposition means that the hypothesis H i is not true (i.e. at least one plan is better than this one).

•

Θ: this proposition means the ignorance (i.e. the plan cannot be compared to the other ones). Thus, the initialization of the basic belief masses consists in computing, for each criterion and for each plan, the basic belief masses (bbm). To compute all the bbm, belief functions have to be defined. A belief function is a function that returns a float value between 0 and 1 according to the value of a considered criterion for a given hypothesis. Examples of belief functions are given in Section 4.1.

Step 2-Combination of the criteria This step consists in combining criteria with each other. We use the conjunctive operator introduced in [START_REF] Smets | The transferable belief model[END_REF] to provide a combined bbm synthesizing the knowledge from the different criteria. Let us consider two criteria C 1 and C 2 . The conjunctive operator is defined as follows:

{ } { } { } ) " ( ) ' ( ) ( , , , , 2 1 2 1 " ' P m P m P m H H P H i i i H C P P P H C H C C i i i × = Θ ¬ ∈ ∀ Θ ∈ ∀ ∑ = ∩
This conjunctive operator is commutative and associative. Thus, it is possible to combine the result of a previous fusion with the belief masses of another criterion.

Step 3-Selection of the best plan

The last step consists in making the decision. We use the pignistic probability [START_REF] Smets | Constructing the pignistic probability function in a context of uncertainty[END_REF] to evaluate each proposition. The pignistic probability of a proposition A is computed by the following formula:

∑ ⊆ = B A B A B m A P ) ( ) (
This probability represents the utility of the plan: the selected plan will be the one that maximizes this probability.

Definition of a desire in our BDI architecture

In our BDI architecture, a desire is then defined by:

• A function that computes the criterion (desire) value according to agent beliefs. • A belief function that evaluates the hypothesis that a plan is the best one according to the desire value. • A belief function that evaluates the hypothesis that a plan is not the best one according to the desire value. • A belief function that evaluates the ignorance according to the desire value.

Choice of an action

As mentioned is Section 3.1, a plan contains a set of actions and a set of rules that defines how to select the best action according to the agent beliefs and desires. This process consists in applying, according to the set of action application rules, the most pertinent action proposed by the plan.

Plan execution control

This process consists in determining if the plan has to be deleted from the intention base or updated. The plan contains rules defining, according to the agent beliefs, if the plan has to be deleted from the intention base. In the same way, it contains rules defining, according to the agent beliefs, if the plan has to be updated and how.

CASE-STUDY: CROPPING PLAN DECISION-MAKING

In this section, we present an application of our architecture to a real model concerning cropping plan decision-making. In Section 4.1, we present our model following the first part of the ODD protocol [START_REF] Grimm | A standard protocol for describing individual-based and agentbased models[END_REF]. Section 4.2 describes a first experiment carried out with our model.

Description of the model

Overview

Purpose

The model is part of the MAELIA project (MAELIA, 2012) aiming at developing a platform for the simulation of the socio-environmental impacts of water management norms on the water resources. In particular, this project proposes to model the impacts of norms on the farmer behaviours that are in many regions the most important water users in low water period. Our model aims at simulating the behaviours of farmers in their choice of crops and their day-life activities.

Entities, state variables, and scales

Two main types of entities are in the model: the farmer (autonomous) agents and the field agents.

A farmer agent has the following state variables:

• fields: a list of fields • plans: a list of the possible crop rotation-field combinations • intention: the current crop rotation for each field • desires: a list of desire (defined as described in Section 3.2).

• beliefs: information used to make decisions. It is composed of: o last_production_memory: production for each type of crop o last_weather: weather of the five last days (rain, temperature evapotranspiration) on each field o crop_prices: current cropping market price o crop_costs: cost of the different crop managements • water: quantity of water available • money: financial resources A field agent has the following state variables:

• shape: spatial geometry (georeferenced)

• is_irrigable: boolean • current_crop: current crop and crop management • weather: weather of the day (rain, temperature, evapotranspiration)

• water_irrigation: quantity of irrigation water

In the model, one time step represents one day. This time-step is necessary to take into account the daily activity of the farmers (that has a direct impact on the water resource), which is directly impacted by the daily weather and the government water crisis decrees (e.g. interdiction to use water for several days). The farmer agents make their cropping plan decision only once a year.

Process overview and scheduling

The field agents have only one behaviour: compute the quantity of crop produced.

For the non-irrigated crops, the computation is done by drawing a Gaussian random number according to the observed crop yield distribution. For the irrigated crops, the computation is done thanks to a simple plant growing model that depends on the weather and on the crop irrigation.

Concerning the behaviour of the farmer agent, we used the architecture described in Section 3. For the farmer agent, a plan represents a complete assignment of crop rotations to its fields. Farmer agents have to make a choice amongst a set of 10 different crop rotations (e.g. Durum wheat -Sunflower -Durum wheat -Rape).

A plan is then defined by: • Set of actions: o Sowing: updates the current_crop attribute of a field agent and the money attribute of the farmer agent. o Irrigating: updates the water_irrigation attribute of a field agent and the water attribute of the farmer agent. In this model, irrigation is costless.

o Harvesting: updates the current_crop attribute of a field agent and the money attribute of the farmer agent. • Action application rules: if it is possible to sow (good moment of the year for the considered crop -for instance, between the 10 th of April and the 15 th of May of maize-not too much rain during the last two days), the farmer agent sows, otherwise, it tries to harvest a field. If it is not possible to harvest (not the good moment of the year -for instance, between the 1 st of October and the 15 th of December for maize-or too much rain during the last two days), it tries to irrigate a field. The model takes into account the time taken by each type of field operations. A farmer agent is able to carry out several actions in a day defined as a set of work hours. After finishing a task on a field, a farmer agent will tend to work on fields close to the previous one (computed thanks to the field georeferenced shape).

• Plan update rules: if it was not possible to sow a crop in a field during the sowing season, the farmer agent can update its plan by replacing the crop by a substitute one. Moreover, each time the rotation of crops for a field is finished, the plan is removed from the intention base and a new choice of plan is triggered.

Concerning the desires of the agent, we defined 4 desires (criteria) based on the work of [START_REF] Dury | Modelling the Complexity of the Cropping Plan Decision-making[END_REF]:

• Maximise the expected profit • Minimise the financial risks • Minimise the workload • Maximise the similarity to the last cropping plans

Maximise the expected profit

A farmer tends to select a plan that potentially maximises its profit. The profit takes into account the price of cropping market price and the cost of the different variable costs (seeds, fertiliser…). The belief functions are shown in Figure 2. These functions depend on the profit expected over the years of the plan (P). P max is the maximal profit obtained with the different plans. D max is the maximal deficit that can be made considering the worst scenario (no plant grown).

Experiments

Context

The model was implemented with the GAMA simulation platform (Taillandier et al., 2012). The tests were carried out with a laptop computer running under Mac OS X, with an i7 processor and 4Go of RAM. We carried out an experiment aiming at simulating the cropping plan decision making of the farmers of two water basins (landscape size: 125×100 km) between 2005 and 2009 (1825 simulation steps). The experiment integrates more than 2700 farmer agents and 20 700 field agents. The first goal of this experiment was to test the scalability of our architecture. The second goal was to test the relevance of the built model. We do not use data to initialize the current_crop attribute of the field agent (set to null): the rotation data were only used to validate the model.

Results

A first result of this experiment concerns the scalability of our architecture: the 1825 simulation steps took less than 22 minutes, which is rather promising given the laptop used and that we did not try to optimise computation times of the model. A second result concerns the relevance of the model. For each year, we compare the percentage of field area occupied by each crop type in the real data and in the simulation results; the mean similarity over the five years between both data is equal to 76,5%. This result is rather promising knowing that in our experiment only one profile of farmers was used. In further experiments, we plan to define several profiles to improve the simulation results. At last, in terms of understandability, the architecture proved to be simple enough to be understood by domain-experts to allow them to participate to the definition of the farmer agent behaviour (in particular, the belief functions).

CONCLUSION

In this paper, we propose a new BDI architecture, based on the belief theory, dedicated to cognitive agents. We present an application of this formalism to a simulation dedicated to cropping plan decision-making. First experiments carried out showed that our architecture allows to simulate thousands of agents in a reasonable amount of time. Moreover, they showed that the model built with our architecture allows to obtain interesting results, close to the real system results. The next step of the MAELIA project will consist in coupling this model with a hydrological model and enriching it with new dynamics and agents such as a government agent (able to create norms), the land market or technology evolution.

•

  Beliefs: agent's beliefs about the system functioning. They are used to compute the values of the desires (criteria). Examples are given in Section 4.1. • Intention: the chosen plan.

Figure 1 .

 1 Figure 1. Agent architecture

Figure 2 .

 2 Figure 2. Belief functions for the "maximise profit" desireMinimise the financial risksA farmer tends to avoid plans that can lead to a high variation of the expected financial outcomes. The belief functions are shown in Figure3. These functions depend on the standard deviation of the expected outcomes according to the quantity of crops produced (R). R max is the maximal standard deviation obtained with the different plans.

Figure 3 .

 3 Figure 3. Belief functions for the minimise risk desire Minimise the workload A farmer tends to select a plan that maximises the number of free days (days without work). The belief functions are shown in Figure 4. These functions depend on the number of free days (F).

Figure 4 .

 4 Figure 4. Belief functions for the minimise workload desire Maximise the similarity to the last cropping plans A farmer tends to always keep the same plan over the years, or at least similar plans. The belief functions are shown in Figure 5. These functions depend on the similarity value compared to the last cropping plan (S), i.e. the rate of similar cropping choices.

Figure 5 .

 5 Figure 5. Belief functions for the maximise similarity to last cropping plan desire The belief base of a farmer agent is composed of the following attributes: current_cropping_plan, last_production_memory, last_weather, water, crop_prices and crop_costs Details Input The data used as input are the following ones: • The Land Parcel Identification System (LPIS) to 2009: describe the geometries (GIS) of the fields and whether they are irrigable. • Rotation CSV data (2006-2009): describe the rotation of crops for each field and the owner of the field (provided by processing of LPIS 2006 to 2009). • Weather data (2000-2010): describe the rain, temperature, evapotranspiration for each day. • Crop price/cost data (2000-2007): describe crop prices/costs for each year. • Crop information data: describe the characteristic of the different crops.