Plasticity in the development and expression of behavior may allow organisms to cope with novel and rapidly changing environments. However, plasticity itself may depend on the developmental experiences of an individual. For instance, individuals reared in complex, enriched environments develop enhanced cognitive abilities as a result of increased synaptic connections and neurogenesis. This suggests that costs associated with behavioral plasticity - in particular, increased investment in "self" at the expense of reproduction - may also be flexible. Using butterflies as a system, this work tests whether allocation of resources changes as a result of experiences in "difficult" environments that require more investment in learning. We contrast allocation of resources among butterflies with experience in environments that vary in the need for learning. Butterflies with experience searching for novel (i.e., red) hosts, or searching in complex non-host environments, allocate more resources (protein and carbohydrate reserves) to their own flight muscle. In addition, butterflies with experience in these more difficult environments allocate more resources per individual offspring (i.e., egg size and/or lipid reserves). This results in a mother's experience having significant effects on the growth of her offspring (i.e., dry mass and wing length). A separate study showed this re-allocation of resources comes at the expense of lifetime fecundity. These results suggest that investment in learning, and associated changes in life history, can be adjusted depending on an individual's current need, and their offspring's future needs, for learning.