Finding Friend and Foe in Multi-Agent Games