Ecologically rational strategy selection