pit (one's) wits against (someone or something)
To engage in a contest of intelligence with someone or something. In the show, five couples will pit their wits against each other to see who knows more pop culture trivia. The best chess player in the world is pitting his wits against a supercomputer.
ˌpit your ˈwits (against somebody/something)
compete with somebody/something in a test of intelligence or knowledge: He’s pitting his wits against the computer chess game.