  However, the organism must first detect the state of the environment, and detectors are not in general perfectly reliable. If the organism responds automatically to the detector, we can use the probabilities of responses given states to characterize the reliability of the detector. We write the probability of \(R_1\) given \(S_1\) as \(\Pr(R_1 \mid S_1)\). This allows us to calculate that responding to the detector rather than always choosing \(R_1\) or \(R_2\) will be advantageous just in case the following inequality holds (cf. Godfrey-Smith 1996):