majority.pp 536 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
population protocol "Majority Protocol" {
    states { good bad neutral mildlybad}
    transitions { x_good_bad x_good_mildlybad x_bad_neutral x_neutral_mildlybad }
    arcs {
       { good, bad } -> x_good_bad -> { neutral, mildlybad }
       { good, mildlybad } -> x_good_mildlybad -> { good, neutral }
       { bad, neutral } -> x_bad_neutral -> { bad, mildlybad }
       { neutral, mildlybad } -> x_neutral_mildlybad -> { mildlybad, mildlybad }
    }
    initial { good bad }
11 12
    true { good neutral }
    false { bad mildlybad }
13
}