validate.state(), validate.outcome() factored out of best.R