Archived from groups: rec.games.diplomacy (
More info?)
Hi All,
If someone is interested. Here the rewrite of chapter 5 of the DATC.
It will be in the next update.
In the rewrite, I separated the mathematical part of the Diplomacy
rules from the algorithm part. In the current version this is a little
bit mixed.
So, here a description of the adjudication in the form of 'equations'.
In the DATC it will be better readable, because it will be HTML formatted.
Any suggestion to make this better, are welcome.
Regards,
Lucas
5. THE PROCESS OF ADJUDICATION
Writing a Diplomacy adjudicator program may look not more difficult than writing a program that checks the moves of a chess
game. However, the contrary is true. A Diplomacy adjudicator that passes all test cases as described in this document
contains many small and difficult details.
To help with writing an adjudicator program or just with the manual adjudication, the adjudication of Diplomacy is analyzed
here. The first step in understanding the adjudication is to understand the principle that a set of orders leads to a set of
decisions to be made. One order may lead to multiple decisions to made. For instance, when a unit is ordered to move, it can
be decided that the move fails, but when the move uses a convoy, then it has also to be decided whether the unit has any
influence on the area where it was ordered to move.
The second step is to understand that the decisions depend on each other and in this way form a set of equations. Decisions
can only be made when all the variables (decisions) it depends on are known first. For instance, when the units are ordered
to follow each other in a move, then the decision of the unit moves at the end depends on the move decision of the unit at
the front.
In the final step an algorithm is constructed. This algorithm is based on the decisions and respects their dependencies. In
some other descriptions, such as the DPTG, the notion of "decision" is not described and the algorithm is described directly.
This has as disadvantage that it gives no understanding of adjudication and why the algorithm is constructed as it is.
Furthermore, with such description it is rather hard to look to alternative algorithms. We will see that there are multiple
ways to tackle the problem of writing an adjudication program.
Note that in the adjudication description some sanity checks are left out. For example a test whether a support order matches
with the order of the unit it supports. These are covered by the test cases and are not relevant for the understanding of the
process of adjudication.
5.A. OVERVIEW OF ADJUDICATION DECISIONS
There are eight different types of decisions. Each type of decisions is given a name, to refer easily to that decision type.
To distinguish the decision type of the other text, the name is given in CAPITALS.
The first three decisions are directly related to the success or failure of an order:
MOVE
Decision will result in 'moves' or 'fails'.
SUPPORT
Decision will result in 'given' or 'cut'.
DISLODGE
Decision will result in 'sustains' or 'dislodged'.
Example:
Italy:
A Tyrolia - Trieste
A Venice Supports A Tyrolia - Trieste
Austria:
F Trieste Hold
At the end of adjudication, the MOVE decision of Tyrolia is 'moves', the SUPPORT decision of Venice is 'given' and the
DISLODGE decision of the army in Trieste is 'dislodged'.
When a unit tries to dislodge another unit, then the strength of the move must be calculated and if that strength is larger
than the hold strength of the other unit, then the move of the unit succeeds. So, the following two decision types are
needed:
ATTACK STRENGTH
For each unit ordered to move, the strength to attack. A decision that results in a value equal or greater than zero.
HOLD STRENGTH
For each area on the board the strength to prevent that other units move to that area. A decision that results in a value
equal or greater than zero.
Both ATTACK STRENGTH and HOLD STRENGTH are numerical decisions, because the result of the decision is a number.
In the previous example the ATTACK STRENGTH of the army in Tyrolia is two, while the HOLD STRENGTH of the army in Trieste is
one.
A unit can not dislodge a unit of the same player. Also supports to a foreign unit can not be used to dislodge an own unit.
However, these supports can be used to prevent that another unit enters the area. This strength can be greater than ATTACK
STRENGTH and must also be calculated:
PREVENT STRENGTH
A numerical decision for each unit ordered to move. It is the strength to prevent other units to move to the area where it is
ordered to move. A decision that results in a value equal or greater than zero.
Example:
Austria:
A Vienna - Tyrolia
A Tyrolia - Munich
A Trieste Supports A Vienna - Tyrolia
Germany:
A Munich Supports A Venice - Tyrolia
A Venice - Tyrolia
The ATTACK STRENGTH of the army in Vienna is zero, because it can not dislodge its own unit in Tyrolia. However, the PREVENT
STRENGTH of the army in Vienna is two, which prevents that the move of the German army in Venice with an ATTACK STRENGTH of
two succeeds.
When a unit is dislodged in a head to head battle, then the unit has no effect anymore on the area it was ordered to move.
This means that the PREVENT STRENGTH is zero. However, it is still required to calculate the strength that prevents the
opposite unit in the head to head battle to move. This value can be greater than ATTACK STRENGTH since all support has to be
calculated. Therefore a separate numerical decision is necessary:
DEFEND STRENGTH
For each unit ordered to move in a head to head battle, the strength to defend its own area from the other unit of the head
to head battle to enter. A decision that results in a value equal or greater than zero.
Example:
France:
A Belgium Supports A Burgundy - Ruhr
A Holland Supports A Burgundy - Ruhr
A Burgundy - Ruhr
A Munich Supports A Ruhr - Burgundy
A Marseilles - Burgundy
Germany:
A Ruhr - Burgundy
In this example the French army in Munich supports the move of the German army in Ruhr instead of the French army in
Burgundy. This makes that the ATTACK STRENGTH, the PREVENT STRENGTH and the DEFEND STRENGTH of the German army in Ruhr are
all different. The ATTACK STRENGTH is one, because the French support should not be counted for the attack. The PREVENT
STRENGTH is zero, because it is dislodged by the French army in Burgundy and therefore it can not prevent the army in
Marseilles to go to Burgundy. However, the DEFEND STRENGTH contains all supports and is therefore two. Still this DEFEND
STRENGTH is insufficient in the head to head battle, since the French army in Burgundy has an ATTACK STRENGTH of three.
It is important to understand the difference between PREVENT STRENGTH and DEFEND STRENGTH. In some algorithms this is
calculated by the same routine. The returned strength of such routine depends on the moment in the adjudication process.
However, in this analysis decisions are defined independent from the moment in the adjudication process and therefore these
two strengths needs to be distinguished.
Finally, when an army is ordered to move and the move will be convoyed, it has to be decided whether the convoy will succeed:
PATH
For each unit ordered to move, the decision whether there is a path from the source to the destination. This decision will
result in 'path' or 'no path'. When the move is without any convoy, the decision always results in 'path'.
Example:
England:
A Yorkshire - Belgium
F North Sea Convoys A Yorkshire - Belgium
Germany:
F Holland Supports F Denmark - North Sea
F Denmark - North Sea
The fleet in the North Sea is dislodged, therefore the PATH decision of the Yorkshire order is 'no path'. The PATH decisions
of non-convoying units are always 'path'. In this case the PATH decisions of the moving fleet in Denmark is 'path'.
5.B. PRECISE DESCRIPTION OF THE DECISION EQUATIONS
With the clear meaning of the decisions, the next step can be made. In this step a detailed and precise description is given
for each of the decisions. These descriptions can be directly compared with the rules for verifying the correctness.
5.B.1. MOVE DECISION
A MOVE decision of a unit ordered to move results in 'moves' when the following conditions are true:
The ATTACK STRENGTH is larger than the DEFEND STRENGTH of the opposing unit in case of a head to head battle or otherwise
larger than the HOLD STRENGTH of the attacked area.
The ATTACK STRENGTH is larger than the PREVENT STRENGTH of any unit moving to the same area.
If one of the above conditions is not true, then the MOVE decision results in 'fails'.
Note, that this MOVE decision has only one 'fails' result. For proper reporting of the adjudication result to the players,
more information might be appropriate. For instance, if a move fails due to a move of another unit to the same area, this
could be reported as 'bounce'. Also the exact bouncing unit might be listed in the report. This can be implemented by
introducing different 'fails' as result of the MOVE decision result. Or this information could be part of the 'fails' result.
Anyway, these ways of failure should be treated the same in other parts of the adjudication.
5.B.2. SUPPORT DECISION
A SUPPORT decision of a unit ordered to support results in 'given' when the following conditions are true:
All units ordered to move to the area of the supporting unit have a ATTACK STRENGTH with value zero. However, if the support
order is a move support, then the unit that is on the area where the supported move is directed, can not cut this support and
can not make this condition false.
the DISLODGE decision of the unit has status 'sustains' (dislodge rule).
If one of the above conditions is not true, then the SUPPORT results in 'cut'.
If the 1982 rule about convoy disruption paradoxes is played, then the support is not cut in some cases (see for more details
choice b of issue 4.A.2).
5.B.3. DISLODGE DECISION
A DISLODGE decision of a unit results in 'dislodged' when the following conditions are true:
There is a unit ordered to move to the area of the unit, with 'moves' for the MOVE decision.
If the unit for which the DISLODGE decision is considered has a move order, then the MOVE decision must be 'fails'.
If one of the above conditions is not true, then the DISLODGE decision is 'sustains'.
5.B.4. ATTACK STRENGTH DECISION
In case the PATH decision is 'no path', then the ATTACK STRENGTH is zero. Otherwise, the ATTACK STRENGTH depends on the
result of the order of the unit in target area. The following situations must be distinguished:
Empty.
This is the case when the target area does not contain a unit or it contains a unit with a move order. Both units must not be
engaged in a head to head battle with each other. If the unit in the target has just another move, then the MOVE decision of
the unit in the target area must be 'moves'. In such case the ATTACK STRENGTH is one plus the number of orders that support
the move and for which the SUPPORT decision is 'given'.
Unit of the same nationality.
This is the case when the 'empty' condition does not hold and the unit in the target area is of the same nationality. At that
moment the ATTACK STRENGTH is zero.
Unit of different nationality.
This is the case when the 'empty' condition does not hold and the unit in the target area is of different nationality. At
that moment the ATTACK STRENGTH is one plus the number of orders that support the move. Only the supports must be counted for
units for which the SUPPORT decision is 'given' and for which the nationality is different from the nationality of the unit
in the target area.
5.B.5. HOLD STRENGTH DECISION
For calculating the HOLD STRENGTH, the following situations must be distinguished:
The area is empty.
In this case the HOLD STRENGTH is zero.
The area contains a unit without a move order.
The HOLD STRENGTH is one plus the number of orders that support the unit in hold and for which the SUPPORT decision is
'given'.
The area contains a unit with a move order.
If the MOVE decision has status 'failed', then the HOLD STRENGTH is one, otherwise zero.
5.B.6. PREVENT STRENGTH DECISION
The PREVENT STRENGTH is one plus the number of orders that support the move and for which the SUPPORT decision is 'given'.
However, there are two exceptions. In the following situations the PREVENT STRENGTH is zero:
If the unit is engaged in a head to head battle and the MOVE decision of the opposing unit is 'moves'.
If the PATH decision of the unit is 'no path'.
Note that for the first exception, it is essential that the unit is engaged in a head to head battle. If there is only a test
that the MOVE decision of the opposing unit is 'moves', then this may lead to a situation where two units end in the same
area (see test cases 6.G.16, 6.G.17 and 6.G.18).
If issue 4.A.7 must be adjudicated according to choice a, then it should not be checked whether the unit is engaged in a head
to head battle. Instead the PREVENT STRENGTH is zero when the MOVE decision of the same unit has status 'fails' and the MOVE
decision of the opposing unit has status 'moves'.
5.B.7. DEFEND STRENGTH DECISION
The DEFEND STRENGTH is one plus the number of orders that support the move and for which the SUPPORT decision is 'given'.
5.B.8. PATH DECISION
The PATH decision is 'path' when one of the following conditions holds:
The unit makes a valid move without convoy.
There is a path of fleets to the target area. Each fleet has a matching convoy order and has 'sustains' for the DISLODGE
decision.
If both conditions are false, then the PATH decision is 'no path'.
5.B.9. CIRCULAR MOVEMENT AND PARADOXES
The decisions are a kind of equations. The adjudicating person or computer, must find a resolution for which the conditions
of all the decisions are true at the same time.
However, there are situation for which there is no resolution or for which there is more than one resolution. At such moment
the board with orders contains a circular movement or convoy disruption paradox. These situations have to be handled
different. It is not possible anymore to look to the complete situation at once. Instead, subsets of the orders has to be
determined and adjudicated with the rules that deal with them.
The decisions that must be adjudicated, depend on each other. These dependencies form a directed graph. However, it is very
likely that this graph is not fully connected and consists of independent sub-graphs (situations on the board that are not
related).
Each sub-graph should be adjudicated separate from the other sub-graphs. If there is only one resolution for such sub-graph,
then that resolution should be taken. If there is no resolution or more than one resolution, then the sub-graph contains a
single circular movement or convoy disruption paradox. The circular movement or the core of the paradox, consists of all the
decisions that indirectly depend on theirselves (that means that there is a directed path from such decision to itself). This
is called the decision cycle.
The next step is to determine whether the decision cycle is a circular movement or a convoy disruption paradox. If the
decision cycle contains a MOVE decision of a unit that targets a fleet with a convoy order, then there is a convoy disruption
paradox. If there is no such decision, then there is a circular movement.
In case of a circular movement all the MOVE decisions of the decision cycle result in 'moves'. The remaining decisions of the
sub-graph are adjudicated as normal. Note, that if a unit interfers the circular movement, because it moves to the place of
one of the unit of the circular movement, then the sub-graph will have only one resolution (if not complicated by supports)
and the circular movement would already be adjudicated differently in an earlier stage.
In case of a convoy disruption paradox, the paradox rule as chosen in 4.A.2 should be applied on the decisions cycle. The
remaining decisions of the sub-graph are adjudicated as normal. Note, that the MOVE decision of the army that convoys is not
in the decision cycle, since for the paradox only the cutting of support is essential. Therefore only the ATTACK STRENGTH
decision of the army that convoys appears in the decision cycle. This is important when applying the Szykman rule or the 'All
Hold' rule.
When the Szykman rule is applied, all ATTACK STRENGTH decisions of the decision cycle are adjudicated to zero The
corresponding MOVE decision is set to 'fails' and the corresponding PREVENT STRENGTH is also adjudicated to zero. For these
decisions the description as specified in section 5.B should not be followed.
If you interpret the 2000 rulebook in such that in some very rare cases the attacked unit is dislodged by the convoying army
(see choice c in issue 4.A.2 and test case 6.F.17), then first the decision cycle must be searched for a SUPPORT decision of
a support order of an attack on a convoying fleet that convoys an army to the area of the supporting unit. That SUPPORT
decision must be set to 'given'. If no such decision could be found, then the 2000 rulebook has no resolution and a fallback
rule must be used such as the Szykman rule or the 'All Hold' rule.
Variant rules may introduce new kind of paradoxes (see test cases 9.E, 9.F and 9.G). If those rules are included, then it is
dangerous to conclude that there is a circular movement in case the decision cycle does not contain a convoy disruption
paradox. It is better to check if the moving units of all the MOVE decisions of the decision cycle are part of one single
circular movement. If so, these units advance, but if not then a fallback paradox rule must be applied. In this fallback
scenario all the MOVE decisions of the decision cycle resolve in 'fails' and all the SUPPORT decisions of the cycle resolve
in 'cut'.