PDL2 runs in two modes: learning and
execution/reasoning. Pseudo code for the learning
algorithm is given in Appendix A. Learning takes
place in two phases. In the first phase, the training
pair is broadcast to all the nodes. Each node computes
its matching state, which consists of the set
relationship between the sets of examples represented
by its stored pair and the training pair, and the binary
relationship (equal/not equal) between the pairs'
outputs. Nodes whose stored pairs are exceptions to
the training pair set their exception flags and return
false to their parent nodes. Nodes for which the
training pair is an exception to their stored pair return
true to their parent node. All other nodes return false
to their parent nodes. The result is gathered at the
root (priority being given to true). If true is returned
to the root node, then the training pair is an exception
to at least one existing pair.