Selective Perception As a Mechanism To Adapt Agents To The Environment: An Evolutionary Approach