Gravar-mail: Evolutionary principles for polynomial models of frequency-dependent selection