Text this: Cooperative target allocation for heterogeneous agent models using a matrix-encoding genetic algorithm