private String getClosestRobotName() {
        double closestDistance = Double.MAX_VALUE;
        String closestRobot = "";
        disabledRobotExists = false;
        HashMap<String, ArrayList<RobotIntel>> intel = Observer.getLog();

        for (String key : intel.keySet()) {
            // change target to any disabled opponents immediately
            if (intel.get(key).get(intel.get(key).size()-1).getEnergy() == 0){
                closestRobot = key;
                disabledRobotExists = true;
                return key;
            }

            if (intel.get(key).get(intel.get(key).size()-1).getDistance() < closestDistance){
                closestDistance = intel.get(key).get(intel.get(key).size()-1).getDistance();
                closestRobot = key;
            }
        }

        if (closestRobot.equals("")) {
            if (debug)
                System.out.println("The closest index is null");
            return null;
        } else {
            if (debug)
                System.out.println("Target is: " + closestRobot);
            return closestRobot;
        }
    }