The Slim Shady AlgorithmThe Slim Shady Algorithm javelin Sat, 2006-09-09 13:04
The goal of this challenge is to implement the Slim Shady Algorithm.
Create a dozen or so listening objects that all exhibit similar responses to a trigger phrase ("Will the real Slim Shady please stand up?"). The responses should be triggered in a probabilistic fashion (e.g., when asked to stand up, there is a 50% chance that each object will stand up). These are the imposter Slim Shadys.
Create a single listening object with the same response to the trigger, but 90% of the time. This is the real Slim Shady.
Create an object that repeatedly asks for the real slim shady to please stand up, and keeps track of which objects respond how often. This object should repeat the algorithm and provide its best guess of which of the standing objects is the real Slim Shady.