public double scoreRackDE(Distribution target, Distribution err_weight){
		double sum = 0;
		for (int i=0; i<cards.length; i++){
			double err = Math.abs(target.eval(i) - cards[i]);
			if (err_weight != null)
				err *= err_weight.eval(i);
			sum += err;
		}
		//Min err = 0, Max err = rack_size(max_card-rack_size)
		//Max err formula was computed from the rack [n, n-1, n-2, ... 3, 2, 1], where n is the max card in deck
		sum /= (double) (cards.length*(game.deck.cards-cards.length));
		assert(sum >= 0 && sum <= 1);
		return sum;
	}