Reinforcement learning constitutes a promising approach to achieve the adaptation of an animat's behavior to its environment. However, existing algorithms tend to be too time and space consuming, and become useless when the number of sensors and actions reach the typical sizes of a realistic animat situation. Existing generalization techniques mitigate somehow the problem, but they are still insufficient. In this paper, we suggest that the efficiency of learning observed in animals is possible, in part, because they capture important regularities, existing in the dynamics of its interaction with the environment, that are not exploited enough by the generalization algorithms. We characterize a kind of regularity that is plausible to hold for many animat environments, that we call categorizability, and propose an algorithm that takes advantage of such regularity. The main features of the algorithm axe: a competitive evaluation of actions through different partial views of the same situation, and the on-line generation of new partial views to improve the accuracy of action evaluation. The described algorithm is applied to the task of learning to walk with a simulated six-legged robot.