The present invention concerns exercise robot suitable for rehabilitation and methods of its operation. The invention concerns in particular a method in which the exercise robot learns an exercise movement on the basis of movements conducted by the aid of a human assistant holding the leg of a patient and moving said leg with muscular form to conduct an exercise movement. The rehabilitation robot actively accompanies the exercise movement in an active compliance mode and records the movement so as to determine an exercise movement stored in the control unit of the device. The rehabilitation robot can then produce the determined exercise in an exercise mode.