Trainable robot