private synchronized void updateScore(double counter, int color, int i) {
		// score how interesting this point is
		if (smart_random_points_score[color][i] > 0)
			smart_random_points_score[color][i] = 0.5 * counter + 0.5
					* smart_random_points_score[color][i];
		else
			smart_random_points_score[color][i] = counter;

		// if we are struggling and expanded the search zone, give points that
		// actually display a +1 bonus
		if (border_buffer > 40) {
			int roundCounter = (int) counter;
			double countDiff = ((double) roundCounter) - counter;
			if (countDiff != 0)
				smart_random_points_score[color][i] += 1;
		}

		// if the point had more than one hit, keep it
		if (smart_random_points_score[color][i] > 1.1) {
			accepted++;
			double factor = 0.01;

			if (smart_random_points_score[color][i] > avg_score[color]
					* (1.2 + zoom)) {
				// procreate this extra good point
				smart_random_points[color][replacePoint[color][0]][0] = smart_random_points[color][i][0]
						+ (Math.random() - 0.5) * factor * zoom;
				smart_random_points[color][replacePoint[color][0]][1] = smart_random_points[color][i][1]
						+ (Math.random() - 0.5) * factor * zoom;

				// overwrite a previously identified weak point
				int k = 0;
				for (k = 0; k < replacePoint[color].length - 1; k++) {
					replacePoint[color][k] = replacePoint[color][k + 1];
				}
				replacePoint[color][k - 1] = i;
			}

			// cull some points
			if (avg_score[color] > 3 && i % 3 == 0)
				factor = factor * 5;

			// this is an interesting point, try another one near it next time
			smart_random_points[color][i][0] += (Math.random() - 0.5) * factor
					* zoom;
			smart_random_points[color][i][1] += (Math.random() - 0.5) * factor
					* zoom;
		} else {
			// try another random point
			rejected++;
			smart_random_points_score[color][i] = 0;
			smart_random_points[color][i][0] = Math.random();
			smart_random_points[color][i][1] = Math.random();

			// add this weak point to the front of the list
			int k = 1;
			for (k = 1; k < replacePoint[color].length; k++) {
				replacePoint[color][k] = replacePoint[color][k - 1];
			}
			replacePoint[color][0] = i;
		}
	}