Cooperative Learning For The Consensus Of Multi-Agent Systems