The Collaborative International Dictionary
To cudgel one's brains
Cudgel \Cudg"el\, v. t. [imp. & p. p. Cudgeled or Cudgelled (-?ld); p. pr. & vb. n. Cudgeling or cudgelling.] To beat with a cudgel.
An he here, I would cudgel him like a dog.
--Shak.
To cudgel one's brains, to exercise one's wits.