A Framework for Optimal Sequential Planning in Multiagent Settings