Text this: A first mathematical model of brood sorting by ants