The ecology of competition: A theory of risk-reward environments in adaptive decision making