optimal decision in games in ai