public void run() {
		computePremices();
		Set<Entity> detectedEnemies = detectEnemies();

		// If dps is too high to win the battle : flee
		if (currentTotalDpsTaken > ship.getMaxDpsInflictable()) {
			LOGGER.debug("If I do not flee, the battle will end in a loss or a draw (" + currentTotalDpsTaken + "/"
					+ ship.getMaxDpsInflictable() + ")");
			if (!ship.hasBehaviorByClass(Flee.class)) {
				// TODO We should flee the barycenter of enemies positions weighted by the dps they deal
				LOGGER.debug("Run, Forest, run !!");
				ship.removeBehaviorsByClass(Movement.class);
				ship.addBehavior(new Flee(ship, mostDangerousEnemy, 1000));
				fleeing = true;
			}
		}

		// if we are fleeing but have not taken any damage for more than 2s, the break and reset AI
		if (fleeing) {
			if (ship.getPos().distance(new Vect3D(mostDangerousEnemy.getPos()).add(mostDangerousEnemy.getSpeed())) > 1000) {
				LOGGER.debug("Now, we're safe ... no damage for more than 3s");
				ship.removeBehaviorsByClass(Flee.class);
				ship.addBehavior(new Break(ship));
			} else {
				if (!ship.hasBehaviorByClass(Flee.class)) {
					ship.removeBehaviorsByClass(Movement.class);
					ship.addBehavior(new Flee(ship, mostDangerousEnemy, 200)); // The 200 is useless for now as it's not used by
				}
			}
		} else {
			// LOGGER.debug(fleeing + " - " + (Model.getModel().getCurrentTS() - lastTsOfDamageTaken) + " - "
			// + ship.hasBehaviorByClass(Flee.class) + " - " + ship.hasBehaviorByClass(Break.class));
			// LOGGER.debug("Inflictable damage: " + ship.getMaxDpsInflictable() + " - detected enemies: "
			// + detectedEnemies.size());

			if (ship.getMaxDpsInflictable() > 0 && !detectedEnemies.isEmpty() && target == null) {
				target = detectedEnemies.iterator().next();
				LOGGER.debug("Removing movement");
				ship.removeBehaviorsByClass(Movement.class);
				ship.addBehavior(new Follow(ship, target, 200));
				ship.addBehavior(new InflictLaserDamage(ship, target));
			}
		}

	}