A naive predictor

This uses functions from Andy's code.