In general recognizer functions must distinguish between three different types of recognitions corresponding to the different modes of their results (bound, exact, or fail). For any KB[B]K recognizer that does not access endgame databases taken as an example, this implies to detect the three conditions below.
Thanks to the KBBK scoring function from Section 1.4.4, we
already know how to calculate the bounded scores for a winning KBB side.
Now we simply put everything together in order to implement a working
function for our KB[B]K example. Figure 1.6 presents an
according skeleton for a KB[B]K recognizer function in ANSI-C. The
skeleton outlines the decision procedure of the recognizer that
evaluates the above three conditions and returns the appropriate
results. As usual it assumes all not explicitly declared identifiers to
be suitably defined and initialized.