Principles of flexible and robust decision making using multiple sensory modalities