Students learn their P's by playing chess