I'm not certain you have the General Rules in the correct order - GR2 should happen after GR3, and suchlike. Also, I suspect that all Items have three different values of dirt, which need to be combined in various ways. In C++: class Item { private: // Humans cannot distinguish between types of dirt. dirt required; // Dirt level required to satisfy human it is "clean". dirt intrinsic; // Perceived intrinsic dirt level. Not actual dirt. Mostly class dependant, but may be affected by prior mould colonies, use in a student flat, being left somewhere for several weeks, etc. dirt extrinsic; // Actual dirt. (And mould colonies). public: bool dirtier( Item const & i ) const { // Note that it is const - staring at items deciding which is worse does not make them cleaner. dirt total_left = required - ( extrinsic + intrinsic ); dirt total_right = i.required - ( i.extrinsic + i.intrinsic ); if( total_left > total_right ) { return true; } else if( total_left < total_right ) { return false; } total_left += extrinsic; total_right += i.extrinsic; if( total_left > total_right ) { return true; } else if( total_left < total_right ) { return false; } return required < i.required; } bool should_throw() const { // Again, const - No point cleaning something you'll be throwing away anyway. return intrinsic > required; } }; Hope this helps solve the ordering problem and the Great Wash Up Or Throw Away issue (O'Brien, 1999). Dave. -- Yes, I must be bored.