Representation, Planning, and Learning of Dynamic Ad Hoc Robot Teams