# Basic chaining with the GA mechanism (demo script www.learningsimulator.org) # Here we deal with a situation where an animal encounters a plant that contains berries # The berries contain suger, which is a primary reinforcer with a value (u) # Initially, the animal does not know that there are edible berries in a particular plant # They are, initially, not interested in approaching either the plant or the berry # This script shows how the animals acquire a chain of behaviours: approaching the plant and eating the berry # Over time the w-value for the berry increases and acts as a conditional reinforcer rewarding approaches to the plant n_subjects : 100 mechanism : GA behaviors : approach,eat,other stimulus_elements : plant,berry,sugar,no_reward response_requirements : approach:plant, eat:berry start_v : plant->other:0, berry->other:0, default:-1 alpha_v : 0.1 alpha_w : 0.1 beta : 1 behavior_cost : approach:1, default: 0 u : sugar:10, default:0 @phase acquisition stop: plant=150 START | @omit_learn, PLANT PLANT plant | approach: BERRY | START BERRY berry | eat: REWARD | NO_REWARD REWARD sugar | START NO_REWARD no_reward | START @run acquisition xscale: plant subject: average @figure Chaining: plant -> approach -> berry -> eat -> sugar @subplot 131 - {'xlabel':'Trial','ylabel':'Probability of response', 'title':'Probability of response' } @pplot berry->eat {'linewidth':3,'color':'red'} @pplot plant->approach {'linewidth':3,'color':'green'} @legend @subplot 132 w-value (berry) {'xlabel':'Trial','ylabel':'w-value',} @wplot berry {'linewidth':3,'color':'steelblue'} @legend @subplot 133 {'xlabel':'Trial','ylabel':'v-value','title':'v - values' } @vplot berry->eat {'linewidth':3,'color':'red'} @vplot plant->approach {'linewidth':3,'color':'green'} @legend