Discovering Categorized Resources in Grids by Self-Organizing Agents