Taking robots out of the shop-floor and into service arm public-oriented applications brings up several challenges concerning the implementation of real-time trrt robust systems. In uncertain environments sensors are required to get feedback and detect the actual world state. Perception-action reasoning seems to be the right approach for real-time and robust connections between sensing and action. In order to adapt to new situations, robots must be able to learn from given examples or from their own experience. In addition, taking advantage of the available apriori task knowledge can speed up the learning task. The proposed sensor-based architecture combines several learning paradigms as well as pre-programmed modules, since experimental evidence suggests that some paradigms are more convenient for learning certain skills. The correspondence between qualitative states and actions is learnt. Programming is used to decrease the complexity of the learning process. A general approach is presented that is a suitable scheme for a wide range of robot situations. Results are provided for a simulated exploration task as well as for a real application of the architecture in dexterous manipulation.