@Override public Action generateAchievementAction(String focus) { myToken.setStrategyType(AgentToken.STRATEGY_ZONE_BUILDER); // successfulParries is covered by defaultAction if (focus == "achievementsSurveyedEdges") { if (myPosition.getNumberOfUnsurveyedEdges() > 0) { Action ret = new Action("survey", myPosition.getIdentifier()); return ret; } } if (focus == "achievementsInspectedAgents") { if (longNotInspectedEnemyNear(myPosition)) { // return new Action("inspect", myPosition.getIdentifier()); LinkedList<AgentToken> agentsToCheck = new LinkedList<AgentToken>(); agentsToCheck.addAll(myPosition.getTokens()); for (Vertex w : myPosition.getAdjacentVertices()) agentsToCheck.addAll(w.getTokens()); for (AgentToken t : agentsToCheck) { if (!t.getTeam().equals(myTeam) && notRecentlyInspected(t)) return new Action("inspect", new Identifier(t.getName())); } } } if (focus == "achievementsAreaValue") { Action ret = ag.buildZone(); return ret; } return ag.expandOwnComponent(); }