implemented optimal move cpu method and fixed loss prevention test