// Author: Todd W. Neller
// For use with Sutton and Barto value iteration exercises
public class ValueIterationGamblersProblem {

	public static void main(String[] args) {
		int goal = 100;
		double p = 0.4;
		double theta = 1e-14;
		double delta;
		double[] v = new double[goal + 1];
		int[] bestStake = new int[goal];
		do {
			// IMPLEMENT VALUE ITERATION HERE
		} while (delta >= theta);
		
		System.out.println("state\tstake*\tV*\n");
		for (int s = 1; s < goal; s++)
			System.out.printf("%d\t%d\t%.8f\n", s, bestStake[s], v[s]);
	}

}
