Learning in coopetitive environments