The robot sheepdog is a computer/engineering project developed at the University of Oxford. It was originally started in the late 1990's, with the aim of programming a robot to herd sheep without human assistance.
To make this easier ducks were used, since they are apparently used to train sheepdogs anyway. The robot used a mathematical model describing the expected behaviour of ducks in order to work out the best way of herding them without causing them distress.
Further developments on this project could potentially involve machine learning, in which computers learn what to do by processing known data or statistics.