in reply to Testing: shades of grey

"...results are better than others..."

My guess is, from a software engineering standpoint, you are interested in this because you want your solution to show a preference depending on an eventual 'confidence value' which would be expressed as a number between zero and one depending on various input and derived factors.

Once upon a time this was the core idea behind a branch of computer science that eventually morphed into today's artificial intelligence -- expert system development.

If interested there is an online working example of such a system called tmycin (written in lisp though) with examples of identifying things like species of snakes or different types of rocks. The user answers a series of prompts while the system computes a confidence value behind the scenes. The end result is a suggestion based on the system's best guess -- a diagnosis or, in your case, the best result from among a list of competitors.

With some work this could be reimplemented in Perl or you can check CPAN for a lisp interpreter. I am not aware of a test module in CPAN that utilizes this technique but would be happy to have one myself if it indeed does exist.

Celebrate Intellectual Diversity