A simulation and AI for sheepherding