Control of legged robots via learned models of central pattern generators