Namespace AS2.Algos.ChiralityCompass
Classes
ChiralityAndCompassInitializer
ChiralityAndCompassParticle
Implementation of the chirality agreement and compass alignment algorithms described in https://arxiv.org/abs/2105.05071v1. Both chirality and compasses can be random at initialization.
Both phases use the following basic procedure:
- Find out which neighbors agree with the particle's chirality/compass direction and setup the pin configuration to contain all of these neighbors in one partition set. This establishes the regional circuit.
- Beep on the regional circuit if there is a neighbor particle that does not have the same chirality/compass direction. If no particle has beeped in this round, there is only one region and the algorithm can terminate.
-
Let all candidates in the region perform a coin toss. All particles in the
region observe the result, which can be HEADS, TAILS, or FAILED.
If the result is FAILED, all candidates that tossed TAILS withdraw their candidacy. All boundary particles send the coin toss result to their neighbors that are not part of the region. - Regions merge as follows: A region that tossed TAILS tries to merge into a neighboring region that has tossed anything other than TAILS. The boundary particles beep in reserved rounds if their neighboring region is a candidate for a merge. If a candidate exists, the first round in which a beep was sent determines how the merge can be performed. If no beeps are sent, no neighbor region was eligible and the next iteration starts. If a merge is performed, all candidates in the region withdraw.