@Override
	public Object execute(TransitionSystem ts, Unifier un, Term[] terms) throws Exception {
		WorldModel model = ((MartianArch) ts.getUserAgArch()).getModel();
		Vertex myPosition = model.getMyVertex();
		List<Entity> opponents = model.getActiveOpponentsOnVertex(myPosition.getId());
		
		if (!opponents.isEmpty()) {
			for (Entity opponent : opponents) {
				if (opponent.getRole().equals(Percept.ROLE_SABOTEUR)) {
					opponent.setVertex(new Vertex(-1));
					return un.unifies(terms[1], ASSyntax.createString(opponent.getName()));
				}
			}
			for (Entity opponent : opponents) {
				if (opponent.getRole().equals(Percept.ROLE_REPAIRER)) {
					opponent.setVertex(new Vertex(-1));
					return un.unifies(terms[1], ASSyntax.createString(opponent.getName()));
				}
			}
			opponents.get(0).setVertex(new Vertex(-1));
			return un.unifies(terms[1], ASSyntax.createString(opponents.get(0).getName()));
			
		} else {
			int visibility = 0;
			String vis = ((Atom) terms[0]).getFunctor();
			if (null == vis) {
				visibility = (int) ((NumberTerm) terms[0]).solve();
			} else {
				visibility = Integer.parseInt(vis);
			}
			if (visibility > 1) {
				for (Vertex neighbor : myPosition.getNeighbors()) {
					List<Entity> opponentsOnNeighbor = model.getActiveOpponentsOnVertex(neighbor.getId());
					if (!opponentsOnNeighbor.isEmpty()) {
						opponentsOnNeighbor.get(0).setVertex(new Vertex(-1));
						return un.unifies(terms[1], ASSyntax.createString(opponentsOnNeighbor.get(0).getName()));
					}
				}
			}
		}
		return un.unifies(terms[1], ASSyntax.createString("none"));
	}