How does evolution learn the form-fitness relationship?
It's the same thing here, you randomly try various token-relationship values and the ones which are slightly better will be favoured.