public double calculateAverageEscapeProbability(long seed, double tolerance) {
		Random rng = new Random(seed);
		int count = 0;
		int numberOfPoints = (int) (this.xMax * this.yMax * 10);
		double currentAvg;
		double newAvg = -1;
		currentAvg = avgEscProbForNRandomPoints(numberOfPoints, rng);
		
		while (Math.abs(currentAvg - newAvg) > tolerance) {
			currentAvg = newAvg;
			count += 1;
			if (count % 10 == 0) {
				numberOfPoints *= 10;
			}
			newAvg = avgEscProbForNRandomPoints(numberOfPoints, rng);
		}		
		return newAvg;
	}