Evolution of learned strategy choice in a frequency-dependent game