implemented method choice in ClosestAgent and RandomAgent