Rational Perception