A new technique enables artificial intelligence agents to think much farther into the future when considering how their behaviors can influence the behaviors of other AI agents, toward the completion of a task. This approach improves long-term performance of cooperative or competitive AI agents.