• No se han encontrado resultados

DEL APRENDIZAJE

2.5. LA EVALUACIÓN INTEGRAL POR PROCESOS

Recall that a multiagent rule is a function that takes a setup and returns an ordering over actions (Definition 1.3.1):

F: QQA

×(wor(Q))J× 2Q\{∅}J

→wor(A)

We now provide a synonym for referring to functions of such types. Note that the following is declared with a pinch ofcurrying:

Agg.hs type Rule = TSQ

-> Profile (LOL' State) -> Profile (BEL' State)

-> LOL' Action

The hope is that the fairly verbose style makes it clearer what each string in the above refers to. We now give explicit declarations for each of the sub-types above. First, BEL' represents sets of beliefs and State represents states, thus

BEL' Staterepresents beliefs over states. In fact, such sets of beliefs over states are simply implemented as lists of integers.

Agg.hs type BEL' a = [a]

type State = Int type BEL = [Int]

As beliefs will are typically over states, we will typically use the synonymBEL

instead ofBEL' Int.30

Occurring with two different arguments above, LOL' is an (unfortunate) acronym for lists of lists. These are used to represent the preferences over both states andActions. If preferences were linear we could simply write them as lists. However, as per Section 2.4.2, we work with weak orders. A weak order is represented as a list of lists as follows: elements in the same sublist are indifferent, and elements in earlier sublists are preferred to those in later sublists. So in [[2],[0,3],[1]]: 2 is preferred to both 0 and 3, which are themselves indifferent. All three are preferred to 1.

Agg.hs type LOL' a = [[a]]

type Action = Int type LOL = [[Int]]

As we represent Actions as integers as well as States, we will often use the synonym LOL for preferences over both. Whenever we want to make it clear that one or the other is the intended representation, we use eitherLOL' State

orLOL' Actionas required.

Though only implicit in the Profile type above, agents are also to be thought of as integers. A profile is a collection of homogeneous structures, one for each of a group of individuals. We utilise the library implementation of key-value mappings. Each agent corresponds to a key, and their beliefs or preferences are the value associated with that key.

Agg.hs type Profile a = M.Map Int a

That leavesTSQ. This represents the transition function, here written as atran- sition sequence. It implicitly relies upon the fact that actions and states are represented as integers.

Agg.hs type TSQ = [[Int]]

The idea is that thenth action is represented by thenth list. Within an action’s sublist, the output of the action in statemis the value of the coordinate at this position. As states, individuals and actions are all composed of integers there is potential for confusion here: refer to Figure 4.1 for a diagrammatic example.

As well as causing potential confusion, the use of integers for states, actions and agents implies that we here really considerfamilies of functions that range over different sized setsQ, J and A. We will at least try to keep the integers that are considered at any one time as an initial segment of the natural numbers (including zero). We now move on to consider our first family of rules, or to be precise, family of families of rules.

Early aggregation

Endriss (2013) suggested a method for reducing multiagent models to a single agent model. The basic idea is to aggregate the profiles of beliefs and preferences 30In general, we will add a “'” for container types, and omit the symbol when the usual container (typicallyInt) is used.

Figure 4.1The transition function represented as a transition sequence—a list of lists of integers—and corresponding diagram.

[[0,1,3,1],[1,2,2,2]] 0 1 2 3 0 1 2 3 0 0 0 0 1 1 1 1

In the diagram the starting states run along the bottom. Each starting state has two ac- tions, 0 and 1, going out of it. These actions lead to an out- come state along the top of the diagram.

first, then apply a single agent rule. An Aggregator takes a profile over a structure and returns a single structure. Single agent rules are denotedSAR.

Agg.hs type Aggregator a = Profile a -> a

type SAR = TSQ -> LOL' State -> BEL -> LOL' Action

Thus, a full multiagent rule is defined from two aggregators and a single agent rule byearlyAgg.

Agg/Rules.hs

earlyAgg :: Aggregator LOL -> Aggregator BEL -> SAR -> Rule earlyAgg prefAgg belAgg sar tsq prefProf belProf =

sar tsq (prefAgg prefProf) (belAgg belProf)

An early-aggregator thus takes three arguments: an aggregator of lists of lists, an aggregator of beliefs, and a single agent rule. These then produce a full multiagent rule with the composition as described above.

Note we have still not yet described any specific rule—as mentioned above, early-aggregators are really a family of families. To remove one of these levels we now define some single agent rules and aggregators.