Learning behaviorally stable solutions to producer–scrounger games