Teaching robots complex tasks is going to be much easier in the future. There are already various methods to do it. OpenAi has developed a robotic system that allows robots to learn from humans by just watching tasks done in a VR environment. The one-shot imitation learning allows humans to show new tasks to robots.
The system is powered by two neural networks: a vision and an imitation network. Here is how it works:
The vision network ingests an image from the robot’s camera and outputs state representing the positions of the objects. The imitation network observes a demonstration, processes it to infer the intent of the task, and then accomplishes the intent starting from another starting configuration. The network learns this from the distribution of training examples. It is trained on dozens of different tasks with thousands of demonstrations for each task. Each training example is a pair of demonstrations that perform the same task.
More info is available here.