 The episode was written by Tim Long , and directed by Michael Polcino . James L. Brooks got the inspiration for the episode from the 2006 documentary Wordplay which chronicles the national crossword puzzle championships , and he thought that Lisa should go to a championship in the episode . Will Shortz and Merl Reagle , who both starred in the documentary , appear in the episode . " We felt both Will and Merl were very compelling , off @-@ the @-@ beaten @-@ track personalities [ in Wordplay ] , who would fit into our universe very well " , Brooks said . 
