Robots that can adapt and perform multiple tasks promise to be a powerful tool with many applications. In order to achieve such robots, control systems have to be constructed that have the capability to handle real world situations. Robots use sensors to interact with the world. Processing the raw data from these sensors becomes computationally intractable in real time. This problem can be tackled by learning mechanisms for focus of attention. This paper presents an approach that considers focus of attention as a problem of selecting controller and feature pairs to be processed at any given point of time in order to optimize system performance. The result is a control and sensing policy that is task specific and can adapt to real world situations using feedback from the world. The approach is illustrated using a number of different tasks in a blocks world domain.