More work on decision making algorithm.