More and more service robots are being developed to be used in houses or in medical faculties to help people with disabilities. Such robots need to be coded by people that are not experts in robotics but experts in other fields such as the medical fields, or even by the end-users themselves. For this is used programming by demonstration methods. They allow the user to show the robot what to do instead of coding it. I use kinesthetic teaching which is a programming by demonstration approach where the user directly moves the robot to show the motion. Then, the motion is learnt and reproduced by the robot. This technique can be improved using interactive programming where the user can give feedback to the robot if the task is not done properly or if it needs to be updated. The user will have access to a graphical user interface (GUI) that allows simple interactions with the robot to make the teaching process easier. For my project I will focus on a specific type of tasks called conditional tasks. They are tasks for which the robot wanted behavior depends on the environment and its configuration. For example sorting tasks are conditional tasks because the robot should sort different objects in different ways. My first aim in my project will be to tackle one of the issues of programming by demonstration which is that the robot learns a specific task but is not able to generalize the learnt knowledge to other tasks. For example a robot that learns how to make a fruit salad wouldn’t be able to cut a fruit as it cannot extract and reuse knowledge from the previously taught task. I will work on an algorithm to fetch in previous demonstrations the appropriate knowledge to perform a task in a certain configuration of the environment without the need of a new demonstration.