Learning from imperfect demonstrations in a surgical training task