Predicting and controlling behavior