Rugby questions, answered with algorithms