As a kid I wouldn't have probably tried to "beat" the experiment, whatever that would have meant for me at the time. That could have been either "alright, free marshmallow. I'm not wasting my time here" or "let's see how many marshmallows I can get out of this."
These days, if I knew I was being tested, I wouldn't take the marshmallow. However, should that not be the case, I'd likely take it with the justification "there's a fair chance I'm not going to want more later."