Not exact but it sounds familiar. My guess:
Show: It's Always sunny in Philadelphia. Episode: Flowers for Charlie. Description: Charlie gets accepted in an intelligence study. At one point he plays chess with a scientist who is taking notes on his "progress".