Finished draft implementation. Test shows only 87/200 predictions are correct for N=10000, so we think something is amiss.