Added exception handling for cases where the numRobots parameter is not set.