@Override
    public float calculateDesire() {
        float desire = 0;

        //figure out the distance between player and mob
        int actorX = ai.getActor().getMapX();
        int playerX = registry.getClosestPlayerX(ai.getActor().getCenterPoint(), registry.getScreenWidth());
        int distance = Math.abs(playerX - actorX);
        
        //see if the mob needs to be scared
        //closer the player is, the more scared the mob is
        if (distance >= SAFE_DISTANCE) {
            desire = 0;
        } else {
            desire = 1.0f - ((float) distance / (float) SAFE_DISTANCE);
        }

        desire *= bias;
        desire = validateDesire(desire);

        return desire;
    }