A Structured Prediction Approach for Generalization in Cooperative Multi-Agent Reinforcement Learning