public void split() {
		// System.out.println(depth);
		if (depth > maxDepth) {

			return;

		}

		if (!hasBeenSplit) {

			children = new ArrayList<StatisticsNode>();

			// choose a dimension at random

			int splitDim = 0;

			if (gamma < 1.0) {
				double[] splitProbs = new double[min.length];
				double sum = 0;
				for (int i = 0; i < min.length; i++) {
					splitProbs[i] = Math.pow(gamma, i);
					sum += splitProbs[i];
				}

				for (int i = 0; i < min.length; i++) {
					splitProbs[i] = splitProbs[i] / sum;

				}
				splitDim = Common.pickRandomProportionally(splitProbs);
				// System.out.println(Arrays.toString(splitProbs));
				// System.out.println(splitDim);
			} else {
				splitDim = twister.nextInt(min.length);

				double maxd = Double.NEGATIVE_INFINITY;
				int maxd_i = -1;
				for (int i = 0; i < min.length; i++) {
					double d = Math.abs(max[i] - min[i]);
					if (d > maxd) {
						maxd = d;
						maxd_i = i;
					}
				}
				splitDim = maxd_i;

			}
			// splitDim = twister.nextInt(min.length);
			// System.out.println(splitDim);
			double interval = Math.abs(max[splitDim] - min[splitDim])
					/ (double) splitPoints;

			HashMap<double[], Double>[] childrenSamples = new HashMap[2];
			childrenSamples[0] = new HashMap<double[], Double>();
			childrenSamples[1] = new HashMap<double[], Double>();

			// if (samples != null && samples.size() >= 1) {
			//
			// for (double[] sample : samples.keySet()) {
			// if (sample[splitDim] <= min[splitDim] + interval) {
			// childrenSamples[0].put(sample, samples.get(sample));
			// } else {
			// childrenSamples[1].put(sample, samples.get(sample));
			// }
			// }
			// //System.err.println(samples.keySet().size());
			// }

			// System.err.println(childrenSamples[0].keySet().size());
			// System.err.println(childrenSamples[1].keySet().size());
			for (int i = 0; i < splitPoints; i++) {

				double nMinD = min[splitDim] + i * interval;
				double nMaxD = min[splitDim] + (i + 1) * interval;

				double[] nMin = ArraysCopy.fastShallowArrayCopy(min);
				double[] nMax = ArraysCopy.fastShallowArrayCopy(max);
				nMin[splitDim] = nMinD;
				nMax[splitDim] = nMaxD;

				// System.out.println(Arrays.toString(nMin) +
				// Arrays.toString(nMax));

				MCTSContinuousNode node = new MCTSContinuousNode(nMin, nMax,
						splitPoints, i, depth + 1, maxDepth, gamma);
				node.actionStatistics = new SummaryStatistics();

				if (propagateSamples) {

					node.samples = childrenSamples[i];
					node.recalculateStatistics();
				}
				// node.actionStatistics.addValue(actionStatistics.getMean());
				node.contId = contId;
				children.add(node);
			}
			// System.out.println("");
			hasBeenSplit = true;
		}

	}