Witch Hunt

1. The accused is guilty, and must be interrogated.

2. If they plead innocent, then that shows they are unrepentant. Punish them.

3. To show they are repentant they must plead guilty to something and they must name their co-conspirators. GOTO 1. (GotoConsideredHarmful)

OK, since someone objected to goto....

 void witchHunt (AccusedWitch aWitch, LynchMob mob)
 {
    while (!mob.isSatisfied())
    {
         bool guiltyPlea = aWitch.interrogate();
         if (!guiltyPlea) {
            aWitch.punish();
            continue;
         } else 
         {
            AccusedWitch coConspirators[] = aWitch.getCoConspirators();

// filter out any alleged conspirators favored by the mob (or management), // punish witch for lack of cooperation. This must be done before burning // the witch at the stake (one cannot punish a dead witch, obviously).

int numConspirators = 0;

for (AccusedWitch w : coConspirators) { if (mob.likes(w)) { aWitch.punish(); } else { numConspirators++; } } // at least one conspirator must be named; otherwise we interrogate the witch further // Conspirators filtered about above don't count. if (!numConspirators) { aWitch.punish(); continue; }

// At least one conspirator has been named, so put the witch out of his/her misery // The witch must now be done away with; lest his/her confession and testimony // be retracted at a later time. aWitch.burnAtStake(); // sacking is more appropriate in some settings for (AccusedWitch w : coConspirators) { if (mob.likes(w)) { continue; } witchHunt (w,mob); } } } }
Note that in its proper formulation the WitchHunt is not tail recursive. Since a witch confessing but claiming to be acting alone is not an acceptable outcome, the number of witches increases monotonically; in order to prevent an endless loop (and to modify reality), the algorithm terminates when the crowd gets bored (or management is satisfied).


Note that lying awake at night thinking of ways to seek and destroy OffTopic content on this Wiki is a form of...


EditText of this page (last edited December 4, 2005) or FindPage with title or text search