• No results found

Solving the Resource Reallocation Problem

The resource reallocation problem (r.r.p.) amounts to identifying a reallocation of resources in an agent system wrt the initial allocation in the system, so that as many agents as possible can fulfil their goals.

Definition 3.4 (solving the r.r.p.) Given an agent system AS = (G, R, A)

• the r.r.p. for an agent hx, Res(x), G(x), B(x)i ∈ A is the problem of finding an agent system AS′

= (A′

, G, R) with hx, Res′

(x), G(x), B′

(x)i ∈ A′

such that r ∈ Res′

(x) and fulfils(r,G(x)) ∈ B′

(x); we say that this AS′

solves the r.r.p. for x (wrt AS); and we say that any such r solves the r.r.p. for x;

• the r.r.p. for the agent system AS is the problem of finding AS′

= (G, R, A′

) with names(AS′

) = names(AS) solving the r.r.p. for as many agents in A as possible wrt AS, namely, given that, for any agent system Z, happyAS(Z) is a set of agent names

such that happyAS(Z) ⊆ names(AS) and Z solves the r.r.p. for every x ∈ happyAS(Z),

AS′

is such that

– happyAS(AS) ⊆ happyAS(AS ′

) – there does not exist AS′′

6= AS′

such that happyAS(AS ′′

) ⊃ happyAS(AS ′

); we say that this AS′

solves the r.r.p. for AS;

we also say that the r.r.p. for AS is solved if such AS′

is found.

Note that we take the term “solving the r.r.p.” to mean “optimising the r.r.p.”, i.e. finding an agent system and a possible reallocation of resources such that as many agents as possible have fulfilled their goals wrt the initial agent system. Also, we assume that the agents’ goals (G(x)) are fixed and cannot change during the reallocation. Instead, the reallocation may require changing the agents’ belief sets, e.g. so as to include information about other agents’

3.3. Solving the Resource Reallocation Problem 57 resources and goals. This will be discussed in greater detail in Chapter 5. Note also that our definition above disallows for the set of agents in a solution AS′

to the r.r.p. for an agent system AS to contain agents other than the ones originally in AS (namely such that names(AS) 6= names(AS′

)). Our definition allows different plans (i.e. P lAS(x) 6= P lAS′(x)) in principle. However, in this thesis, our aim is to obtain AS′

with the same plans (P lAS(x)) as

in AS. In summary:

Our aim, in this thesis, is to obtain an agent system AS′

that solves the r.r.p. for an agent system AS with the same agents in AS′

as in AS (namely such that names(AS) = names(AS′

)), with the same goals (G) and resources (R), and such that the agents’ goals (G(x)) and plans (P lAS(x)) are the same in AS′ as in AS. It is the resources and

beliefs of agents that may undergo change.

We demonstrate below how the resource reallocation problem of Example 3.1 could be solved.

Example 3.2 (solving the r.r.p. for an agent system) Given the agent system AS = (G, R, A) of Example 3.1, the r.r.p. for ag1 is solved since it has goal g1, resource r1 and there is a plan such that r1 fulfils g1, and the r.r.p. for ag3 is solved since it has goal g3, resource r3 and there is a plan such that r3 fulfils g3. The r.r.p. for ag2 on the other hand is not solved since it has goal g2, resource r2 but no plan such that r2 fulfils g2. The r.r.p. for the agent system AS is solved by the agent system AS′

= (G, R, A′ ) with A′ = {hag1, Res′ (ag1), G(ag1), B′ (ag1)i, hag2, Res′ (ag2), G(ag2), B′

(ag2)i, hag3, Res(ag3), G(ag3), B′

(ag3)i} as follows, with resources that have changed hands between agents underlined:

ag1 ag2 ag3

Res′(ag1) = {r2}, Res′(ag2) = {r1}, Res(ag3) = {r3}, G(ag1) = g1, G(ag2) = g2, G(ag3) = g3, B′(ag1) = B(ag1) B′(ag2) = B(ag2) B′(ag3) = B(ag3)

Indeed AS′

The agent system AS′

in the example above could be seen as arising from AS by allowing agents ag1 and ag2 to exchange resources r1 and r2. In our realistic example, this would amount to the two patients swapping medical appointments. Note that ag3 (i.e. its resources, goal and beleifs) is unchanged by the swap and hence still happy, and ag1 is happy before the swap and still happy after the swap. ag2 is happy after the swap since it has obtained a resource that solves its r.r.p. Generally:

Lemma 3.2 (obtaining a resource that solves the r.r.p. for an agent) Let AS = (G, R, A) be an agent system that contains allocation Res and such that hx, Res(x), G(x), B(x)i ∈ A. Let AS′

= (G, R, A′

) be an agent system that contains allocation Res′

and such that hx, Res′

(x), G(x), B′

(x)i ∈ A′

. Assume P lAS(x) = P lAS′(x). If AS′ solves the r.r.p. for x and AS does not solve the r.r.p. for x, then there exists some r ∈ R such that fulfils(r,G(x)) ∈ P lAS(x), r /∈ Res(x) and r ∈ Res

(x).

The lemma above follows trivially from Definition 3.4. The assumption in the lemma above makes sense for the kind of settings considered in this thesis, where plans are common knowledge and do not change.

Lastly, note that the agent system AS′

found in Example 3.2 is such that all agents are happy and is trivially a solution of the resource reallocation problem for the initial agent system AS. However, in general, it may not be the case that such an “ideal” solution can be found where all agents are happy.