private GPNode initRandom2(double probTerm,
						GPNode parent,
						int minDepth,
						boolean grow,
						int depth) {
		GPNode node;
		double p = RandomGenerator.random.nextDouble();
		if (((!grow) || (p > probTerm)) && (depth < minDepth)) {
			int fun = RandomGenerator.random.nextInt(GPFun.FUN_COUNT);
			node = new GPNode(this);
			node.initFun(fun, parent);
			for (int i = 0; i < node.arity; i++)
				node.params[i] = initRandom2(probTerm, node, minDepth, grow, depth + 1);
		}
		else {
			if (RandomGenerator.random.nextBoolean() && (varcount > 0)) {
				int var = RandomGenerator.random.nextInt(varcount);
				node = new GPNode(this);
				node.initVar(var, parent);
			}
			else {
				double val;
				int r = RandomGenerator.random.nextInt(10);
				if (r == 0) {
				    val = 0.0;
				}
				else if (r > 5) {
				    val = RandomGenerator.random.nextInt(10);
				}
				else {
				    val = RandomGenerator.random.nextDouble();
				}
				
				node = new GPNode(this);
				node.initVal(val, parent);
			}
		}

		return node;
	}