Phase Transitions in a Neural Model of Problem Solving