pit one's wits

Verb

 * 1)  To engage in a test of mental skill.
 * We must pit our wits against our enemy and find a way to defeat him.