You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Biancospino/Sandbox

From MafiaWiki
Jump to navigation Jump to search

??? Action Resolution

Basic Principles

An Ensemble E is the collection of night effects to be resolved. Effects are passive abilities and submitted actions.

To each effect f, are associated:

  • an actor AE(f) (the player who submitted the action, or who have the passive effect);
  • an n-tuple of targets TE(f), where n is the number of targets of the action, or 0 for passive effects;
  • a priority PE(f), which is a number selected by the mod (lower numbers indicate higher priority).

(N.B.: it is strongly suggested that passive effect have a priority of 0 and actions have a positive priority. This is to guarantee that passive effects have the highest priority and will not be arbitrarily suppressed unless there is truly no other way to resolve actions in a somewhat logical fashion.)

A Resolution for an ensemble E is a couple (R,S) such that:

  • R is a collection of effects, and is a (non necessarily proper) superset of E;
  • S is a subset of R (which represents the set of successfull effects).

A resolution is called acceptable if:

  • R is finite;
  • any effect in R but not in E would necessarily be created if all effects in E∩S succeeded and all effects in ES failed;
  • there is no effect in S that would necessarily fail if all other effects in S succeeded and all other effects in RS failed;
  • any effect in RS would necessarily fail if all other effects in S succeeded and all other effects in RS failed.
  • it is possible to coherently resolve the action redirections, if any, that would be created if all effects in S succeeded and all effects in RS failed.

The overall concept of ?AR is as such:

  • if one or more acceptable resolutions exists, the best one (as descrived below) is picked (or, if multiple optima exists, one of those is picked at random);
  • if no acceptable resolutions exists, one picks some effects to arbitrarily fail, in such a way to try to preserve the highest-priority effects when at all possible.

Non-Paradoxes

A non-paradox is an Ensemble that admits only one acceptable resolution, and there is only one way of coherently resolving action redirections. It is resolved in the obvious way, just by picking the one acceptable resolution available.

Quasi-Paradoxes

A quasi-paradox is an Ensemble E that admits more than one acceptable resolutions. In that case, available acceptable resolutions are partially ordered in this way:

  • (R1, S1) is better than (R2, S2) if R1 has fewer elements than R2

(N.B.: this rule is necessary to guarantee that only a finite number of optima exists.)

Among all optimal acceptable resolutions, one is picked at random. If the chosen resolution would admit multiple coherent ways of resolving action redirections, one of those ways is picked at random.

Examples

Even number of mutual roleblocks

One Roleblocker (R1) roleblocks another (R2) that roleblocks the first:

 R1 <-----> R2 

Thre are two acceptable resolutions (a, b), and one is picked at random:

a) R1 ------> R2
b) R1 <------ R2

Roleblocks and Rolestops

Two rolestoppers (S1,S2) rolestops each other; each of them is also roleblocked by a roleblocker (R1,R2) and shot by a vigilante (V1,V2):

         V1       V2
         |        |
         |        |
         v        v
R1 ----> S1 <---> S2 <---- R2

There are two acceptable resolutions:

a)
         V1       V2
         |        |
         |        |
         v        v
R1 ----> S1       S2 <---- R2

b)
         V1       V2



R1       S1 <---> S2       R2

Note that in b), nobody dies, while in a) both S1 and S2 die.

Reflexive roles

In the following, let "relexive" roles be triggered when they are successfully targeted.

A Roleblocker (R) targets a Visitor (V) that targets a reflexive Rolestopper (rS):

R ----> V ----> rS

There are two acceptable resolutions:

a) R ----> V       rS
b) R       V <---> rS

However (a) is better than (b), since (b) creates an action that wasn't in the ensemble; so (a) is picked over (b).

Paradoxes

A paradox is an ensemble E for which no acceptable resolution exists.

A Gordian cut is a set FE so that, if one were to replace all effects in E that are in F with effects that always fail and do nothing, the resulting ensemble would be a non-paradox or quasi-paradox. (N.B.: at least one such Gordian cut clearly exists, since F=E does clearly work)

Gordian cuts are partially ordered in the following way:

  • F1 is better than F2 if there exists some number x such that:
    • the set {fF1|PE(f)=x} has less elements than the set {fF2|PE(f)=x}
    • for every y<x, the set {fF1|PE(f)=y} has the same number of elements than the set {fF2|PE(f)=y}

One of the optimal Gordian cuts is picked at random, and the ensemble is reduced to the corresponding non-paradox or quasi-paradox, which is resolved further as described above.

Examples

Odd number of Roleblockers roleblocking in circle

Three Roleblockers (R1,R2,R3) mutually roleblock:

----> R2 ----> R3
|              |
R1 <------------

Thre are no acceptable resolutions; but there are 7 Gordian cuts (if one removes any non-zero number of actions from this ensemble, than it becomes a non-paradox). Of them (assuming, all roleblocks have the same priority), the three optimal ones are the three singletons each containing a single roleblock.

One of those three is picked at random; assuming (R3 ---> R1) is picked (the other cases are analogous) the ensemble is reduced to

R1 ----> R2 ----> R3

and the only acceptable resolution then becomes

R1 ----> R2       R3

Multiple Deflectors

A Visitor (V) targets a Deflector (D1), that targets a Deflector (D2) that targets D1. A Deflector redirects all action toward them to their target. If actions can be redirected more than once, this is a paradox:

 V ----> D1 <----> D2

V can't be targeting D1, because otherwise it would be deflected to D2; and similarly for D2. However, removing any one action is a Gordian cut.

Ignoring cuts removing more than one action (that are obviously non-optimal), one obtains the following possible ensembles:

a) V ----> D1 ----> D2
b) V ----> D1 <---- D2
c) V       D1 <---> D2

a), b) are non-paradoxes, that after evaluating the redirections produce those final resolutions:

a) V ----> D2 <---- D1
b) V ----> D1 <---- D2

c) is a quasi-paradox, since it admits two coherent ways to resolve the redirections, one of which is randomly picked:

c1) V      D1 ----> D2⮌
c2) V      D2 ----> D1⮌

(where the ⮌ denotes self-targeting)

If the Visitor and the Deflector actions have the same priority, one of a), b), c) is chosen at random, then if c) is chosen one of c1), c2) is chosen at random.

If the Visitor has lower priority (that is, PE(V)>PE(D)), then c) is always picked, and then one of c1), c2) is chosen at random.

If the Visitor has higher priority (that is, PE(V)<PE(D)), then one of a), b) is chosen at random.

Notes

By picking the priority of passive effect as 0, and the priority of active actions as in the Natural Action Resolution priority list, one obtains a resolution schema that is almost identical to NAR, except that all required tiebreaks not normally resolved by NAR are resolved at random. Also note that NAR is somewhat able to deal with quasi-paradoxes using (possibly arbitrary) tiebreaks, but is wholly incapable of dealing with true paradoxes. ?AR solves the problem by just giving up in those truly unsolvable situations s and just start cutting stuff down until the problem goes away.