Cooperative Task Assignment using Dynamic Ranking