Some sphex wasps drop a paralyzed insect near the opening of the nest. Before taking provisions into the nest, the sphex first inspects the nest, leaving the prey outside. During the sphex's inspection of the nest an experimenter can move the prey a few inches away from the opening of the nest. When the sphex emerges from the nest ready to drag in the prey, it finds the prey missing. The sphex quickly locates the moved prey, but now its behavioral "program" has been reset. After dragging the prey back to the opening of the nest, once again the sphex is compelled to inspect the nest, so the prey is again dropped and left outside during another stereotypical inspection of the nest. This iteration can be repeated again and again, with the sphex never seeming to notice what is going on, never able to escape from its genetically-programmed sequence of behaviors.
Douglas Hofstadter and Daniel Dennett have used this mechanistic behavior as an example of how seemingly thoughtful behavior can actually be quite mindless, the opposite of human behavioral flexibility that we experience as free will.
-- wikipedia