Using Diagnostic Reasoning to Compute a System's Actions' Reliability and Foster Intelligent Behavior