Sphex is a genus of insects in the Family Sphecidae, order Hymenoptera.
Digger Wasps are predators that can sting and paralyze prey insects. In preparation for egg laying they construct a protected “nest” (some species dig nests in the ground, while others use pre-existing holes; mud-dauber wasps build nests from mud) and then stock it with captured insects. Typically the prey are left alive, but paralyzed by wasp toxins. The wasps lay their eggs in the provisioned nest. When the wasp larvae hatch, they feed on the paralyzed insects.
Another species of digger wasp is the Great Golden Digger (Sphex ichneumoneus) which is found in North America. The developing wasps spend the winter in their nest. When the new generation of adults emerge they contain the genetically-programmed behaviors that are required to carry out another season of nest building. During the summer, a female might build as many as half a dozen nests, each with several compartments for her eggs. The building and provisioning of the nests takes place in a stereotypical, step-by-step fashion.
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 (or, as Hofstadter described it, antisphexishness).