Stereotypy
A stereotypy (Template:PronEng) (plural stereotypies) is a repetitive or ritualistic movement, posture, or utterance, found in patients with mental retardation, autism spectrum disorders, tardive dyskinesia and stereotypic movement disorder. Stereotypies may be simple movements such as body rocking, or complex, such as self-caressing, crossing and uncrossing of legs, and marching in place. Several causes have been hypothesized for stereotypy, and several treatment options are available.

# Proposed causes
There are several possible explanations for stereotypy, and different stereotyped behaviors may have different explanations. A popular explanation is stimming, which hypothesizes that a particular stereotyped behavior has a function related to sensory input. Other explanations include hypotheses that stereotypy discharges tension or expresses frustration, that it communicates a need for attention or reinforcement or sensory stimulation, that it is learned or neuropathological or some combination of the two, or that it is normal behavior with no particular explanation needed.

# Treatment
Treatment options include replacing the repetitive behavior with a more socially acceptable behavior, exercise, or medications. Where sensory integration dysfunction is involved, sensory integration therapy may be used. When gauged to be appropriate, some behavioral specialists allow a child to engage in self-stimulatory behavior as positive reinforcement in interventions such as Applied Behavior Analysis.

# In animals
Stereotypies also occur in non-human animals.  It is considered an abnormal behavior and is sometimes seen in captive animals, particularly those held in small enclosures with little opportunity to engage in more normal behaviors. These behaviors may be maladaptive, involving self-injury or reduced reproductive success.
They can be induced by confinement; for example, cats pace in zoo cages. Pregnant sows whose feed is restricted bite at their stalls' bars, and chew without anything in their mouths. In laboratory rats and mice, grooming is the most common activity other than sleep, and grooming stereotypies have been used to investigate several animal models of anxiety and depression.  Examples of stereotypical behaviors include pacing, rocking, swimming in circles, excessive sleeping, self-mutilation (including feather picking and excessive grooming), and mouthing cage bars. Stereotypies are seen in many species, including primates, birds, and carnivores. Up to 40% of elephants in zoos display stereotypical behaviors. Stereotypic behaviour in giraffes is also common; they resort to excessive tongue use on inanimate objects, due to a subconscious response to suckle milk from their mother, which many human-reared giraffes and other captive animals do not experience.
Stereotypical behaviors are thought to be caused ultimately by artificial environments that do not allow animals to satisfy their normal behavioral needs. Rather than refer to the behavior as abnormal, it has been suggested that it be described as "behavior indicative of an abnormal environment." Stereotypies are correlated with altered behavioral response selection in the basal ganglia.
Stereotypical behavior in laboratory animals can confound behavioral research. It is also seen as a sign of psychological distress in animals, and therefore is an animal welfare issue.
Stereotypical behavior can sometimes be reduced or eliminated by environmental enrichment, including larger and more stimulating enclosures, training, and introductions of stimuli (such as objects, sounds, or scents) to the animal's environment. The enrichment must be varied to remain effective for any length of time. Housing social animals such as primates with other members of their species is also helpful. But once the behavior is established, it is sometimes impossible to eliminate due to alterations in the brain.