There are many theories of humor which attempt to explain what humor is, what social functions it serves, and what would be considered humorous. Among the prevailing types of theories that attempt to account for the existence of humor, there are psychological theories, the vast majority of which consider humor to be very healthy behavior; there are spiritual theories, which consider humor to be an inexplicable mystery, very much like a mystical experience. Although various classical theories of humor and laughter may be found, in contemporary academic literature, three theories of humor appear repeatedly: relief theory, superiority theory, and incongruity theory. Among current humor researchers, there is no consensus about which of these three theories of humor is most viable. Proponents of each one originally claimed their theory to be capable of explaining all cases of humor. However, they now acknowledge that although each theory generally covers its own area of focus, many instances of humor can be explained by more than one theory. Incongruity and superiority theories, for instance, seem to describe complementary mechanisms which together create humor.
Relief theory maintains that laughter is a homeostatic mechanism by which psychological tension is reduced. Humor may thus for example serve to facilitate relief of the tension caused by one's fears. Laughter and mirth, according to relief theory, result from this release of nervous energy. Humor, according to relief theory, is used mainly to overcome sociocultural inhibitions and reveal suppressed desires. It is believed that this is the reason we laugh whilst being tickled, due to a buildup of tension as the tickler "strikes". According to Herbert Spencer, laughter is an "economical phenomenon" whose function is to release "psychic energy" that had been wrongly mobilized by incorrect or false expectations. The latter point of view was supported also by Sigmund Freud.
The superiority theory of humor traces back to Plato and Aristotle, and Thomas Hobbes' Leviathan. The general idea is that a person laughs about misfortunes of others (so called schadenfreude), because these misfortunes assert the person's superiority on the background of shortcomings of others. Socrates was reported by Plato as saying that the ridiculous was characterized by a display of self-ignorance. For Aristotle, we laugh at inferior or ugly individuals, because we feel a joy at feeling superior to them.
The incongruity theory states that humor is perceived at the moment of realization of incongruity between a concept involved in a certain situation and the real objects thought to be in some relation to the concept.
Since the main point of the theory is not the incongruity per se, but its realization and resolution (i.e., putting the objects in question into the real relation), it is often called the incongruity-resolution theory.
Francis Hutcheson expressed in Thoughts on Laughter (1725) what became a key concept in the evolving theory of the comic: laughter as a response to the perception of incongruity. Arthur Schopenhauer wrote that the perceived incongruity is between a concept and the real object it represents. Hegel shared almost exactly the same view, but saw the concept as an "appearance" and believed that laughter then totally negates that appearance.
The first formulation of the incongruity theory is attributed to the Scottish poet Beattie.
The most famous version of the incongruity theory, however, is that of Kant, who claimed that the comic is "the sudden transformation of a strained expectation into nothing." Henri Bergson attempted to perfect incongruity by reducing it to the "living" and "mechanical".
An incongruity like Bergson's, in things juxtaposed simultaneously, is still in vogue. This is often debated against theories of the shifts in perspectives in humor; hence, the debate in the series Humor Research between John Morreall and Robert Latta. Morreall presented mostly simultaneous juxtapositions, with Latta focusing on a "cognitive shift" created by the sudden solution to some kind of problem.
Humor frequently contains an unexpected, often sudden, shift in perspective, which gets assimilated by the Incongruity Theory. This view has been defended by Latta (1998) and by Brian Boyd (2004). Boyd views the shift as from seriousness to play. Nearly anything can be the object of this perspective twist; it is, however, in the areas of human creativity (science and art being the varieties) that the shift results from "structure mapping" (termed "bisociation" by Koestler) to create novel meanings. Arthur Koestler argues that humor results when two different frames of reference are set up and a collision is engineered between them.
The Script-based Semantic Theory of Humor (SSTH) was introduced by Victor Raskin in "Semantic Mechanisms of Humor", published 1985. While being a variant on the more general concepts of the Incongruity theory of humor (see above), it is the first theory to identify its approach as exclusively linguistic. As such it concerns itself only with verbal humor: written and spoken words used in narrative or riddle jokes concluding with a punch line.
The linguistic scripts (a.k.a. frames) referenced in the title include, for any given word, a "large chunk of semantic information surrounding the word and evoked by it [...] a cognitive structure internalized by the native speaker". These scripts extend much further than the lexical definition of a word; they contain the speaker's complete knowledge of the concept as it exists in his world. Thus native speakers will have similar but not identical scripts for words they have in common.
To produce the humor of a verbal joke, Raskin posits, the following two conditions must be met:
Humor is evoked when a trigger at the end of the joke, the punch line, causes the audience to abruptly shift its understanding from the primary (or more obvious) script to the secondary, opposing script.
As an example Raskin uses the following joke:
For this example, the two scripts contained in the joke are DOCTOR and LOVER; the switch from one to the other is triggered by our understanding of the "whispered" reply of the "young and pretty wife". This reply only makes sense in the script of LOVER, but makes no sense in the script of a bronchial patient going to see the DOCTOR at his (home) office. Raskin expands further on his analysis with more jokes, examining in each how the scripts both overlap and oppose each other in the text.
In order to fulfill the second condition of a joke, Raskin introduces different categories of script opposition. A partial list includes: actual (non-actual), normal (abnormal), possible (impossible), good (bad), life (death), obscene (non-obscene), money (no money), high (low) stature. A complete list of possible script oppositions for jokes is finite and culturally dependent. For example, Soviet political humor does not use the same scripts to be found in Jewish humor. However, for all jokes, in order to generate the humor a connection between the two scripts contained in a given joke must be established. "...one cannot simply juxtapose two incongruous things and call it a joke, but rather one must find a clever way of making them make pseudo-sense together".
The General Theory of Verbal Humor (GTVH) was proposed by Victor Raskin and Salvatore Attardo in the article "Script theory revis(it)ed: joke similarity and joke representation model". It integrated Raskin's ideas of Script Opposition (SO), developed in his Script-based Semantic Theory of Humor [SSTH], into the GTVH as one of six levels of independent Knowledge Resources (KRs). These KRs could be used to model individual verbal jokes as well as analyze the degree of similarity or difference between them. The Knowledge Resources proposed in this theory are:
To illustrate their theory, the authors use 7 examples of the light bulb joke, each variant shifted by a single Knowledge Resource. Each one of the KRs, ordered hierarchically above and starting with the Script Opposition, has the ability to "determine the parameters below themselves, and are determined [circumscribed] by those above themselves. 'Determination' is to be intended as limiting or reducing the options available for the instantiation of the parameter; for example, the choice of the SO [script opposition] DUMB/SMART will reduce the options available to the generation in the TA (in North America to Poles, etc.)" 
One of the advantages of this theory (GTVH) over Raskin's script-based semantic theory (SSTH) is that through the inclusion of the Narrative Strategy (NS) any and all humorous texts can be categorized. Whereas Raskin's SSTH only deals with jokes, the GTVH considers all humorous text from spontaneous one-liners to funny stories and literature. This theory can also, by identifying how many of the Knowledge Resources are identical for any two humorous pieces, begin to define the degree of similarity between the two.
As to the ordering of the Knowledge Resources, there has been much discussion. Willibald Ruch, a distinguished German psychologist and humor researcher, wanted to test empirically the ordering of the Knowledge Resources, with only partial success. Nevertheless, both the listed Knowledge Resources in the GTVH and their relationship to each other has proven to be fertile ground in the further investigation of what exactly makes humor funny.
The Computer Model of a Sense of Humor theory was suggested by Suslov in 1992. Investigation of the general scheme of information processing shows the possibility of a specific malfunction, conditioned by the necessity of a quick deletion from consciousness of a false version. This specific malfunction can be identified with a humorous effect on psychological grounds: it exactly corresponds to incongruity-resolution theory. However, an essentially new ingredient, the role of timing, is added to the well-known role of ambiguity. In biological systems, a sense of humor inevitably develops in the course of evolution, because its biological function consists of quickening the transmission of the processed information into consciousness and in a more effective use of brain resources. A realization of this algorithm in neural networks justifies naturally Spencer's hypothesis on the mechanism of laughter: deletion of a false version corresponds to zeroing of some part of the neural network and excessive energy of neurons is thrown out to the motor cortex, arousing muscular contractions.
The theory treats on equal footing the humorous effect created by the linguistic means (verbal humor), as well as created visually (caricature, clown performance) or by tickling. The theory explains the natural differences in susceptibility of people to humor, absence of humorous effect from a trite joke, the role of intonation in telling jokes, nervous laughter, etc. According to this theory, humor has a pure biological origin, while its social functions arose later. This conclusion corresponds to the known fact that monkeys (as pointed out by Charles Darwin) and even rats (as found recently) possess a sense of humor.
A practical realization of this algorithm needs extensive databases, whose creation in the automatic regime was suggested recently.
The Ontic-Epistemic Theory of Humor (OETC) proposed by P. Marteinson (2006) asserts that laughter is a reaction to a cognitive impasse, a momentary epistemological difficulty, in which the subject perceives that Social Being itself suddenly appears no longer to be real in any factual or normative sense. When this occurs material reality, which is always factually true, is the only percept remaining in the mind at such a moment of comic perception. This theory posits, as in Bergson, that human beings accept as real both normative immaterial percepts, such as social identity, and neological factual percepts, but also that the individual subject normally blends the two together in perception in order to live by the assumption they are equally real. The comic results from the perception that they are not. This same result arises in a number of paradigmatic cases: factual reality can be seen to conflict with and disprove social reality, which Marteinson calls Deculturation; alternatively, social reality can appear to contradict other elements of social reality, which he calls "Relativisation". Laughter, according to Marteinson, serves to reset and re-boot the faculty of social perception, which has been rendered non-functional by the comic situation: it anesthetizes the mind with its euphoria, and permits the forgetting of the comic stimulus, as well as the well-known function of communicating the humorous reaction to other members of society.
Evolutionary psychologist Geoffrey Miller contends that, from an evolutionary perspective, humour would have had no survival value to early humans living in the savannas of Africa. He proposes that human characteristics like humor evolved by sexual selection. He argues that humour emerged as an indicator of other traits that were of survival value, such as human intelligence.
In 2011, three researchers, Hurley, Dennett and Adams, published a book that reviews previous theories of humor and many specific jokes. They propose the theory that humor evolved because it strengthens the ability of the brain to find mistakes in active belief structures, that is, to detect mistaken reasoning. This is somewhat consistent with the sexual selection theory, because, as stated above, humor would be a reliable indicator of an important survival trait: the ability to detect mistaken reasoning. However, the three researchers argue that humor is fundamentally important because it is the very mechanism that allows the human brain to excel at practical problem solving. Thus, according to them, humor did have survival value even for early humans, because it enhanced the neural circuitry needed to survive.
Misattribution is one theory of humor that describes an audience's inability to identify exactly why they find a joke to be funny. The formal theory is attributed to Zillmann & Bryant (1980) in their article, "Misattribution Theory of Tendentious Humor", published in Journal of Experimental Social Psychology. They derived the critical concepts of the theory from Sigmund Freud's Wit and Its Relation to the Unconscious (note: from a Freudian perspective, wit is separate from humor), originally published in 1905.
The benign violation theory (BVT) is developed by researchers A. Peter McGraw and Caleb Warren. The BVT integrates seemingly disparate theories of humor to predict that humor occurs when three conditions are satisfied: 1) something threatens one's sense of how the world "ought to be", 2) the threatening situation seems benign, and 3) a person sees both interpretations at the same time.
From an evolutionary perspective, humorous violations likely originated as apparent physical threats, like those present in play fighting and tickling. As humans evolved, the situations that elicit humor likely expanded from physical threats to other violations, including violations of personal dignity (e.g., slapstick, teasing), linguistic norms (e.g., puns, malapropisms), social norms (e.g., strange behaviors, risqué jokes), and even moral norms (e.g., disrespectful behaviors). The BVT suggests that anything that threatens one's sense of how the world "ought to be" will be humorous, so long as the threatening situation also seems benign.
There is also more than one way a violation can seem benign. McGraw and Warren tested three contexts in the domain of moral violations. A violation can seem benign if one norm suggests something is wrong but another salient norm suggests it is acceptable. A violation can also seem benign when one is psychologically distant from the violation or is only weakly committed to the violated norm.
For example, McGraw and Warren find that most consumers were disgusted when they read about a church raffling off a Hummer SUV to recruit new members. However, many consumers were simultaneously amused. Consistent with the BVT, people who attended church were less likely to be amused than people who did not. Churchgoers are more committed to the belief that churches are sacred and, consequently, were less likely to consider the church's behavior benign.
According to George Eman Vaillant's (1977) categorization, humor is level IV defense mechanism: overt expression of ideas and feelings (especially those that are unpleasant to focus on or too terrible to talk about) that gives pleasure to others. Humor, which explores the absurdity inherent in any event, enables someone to "call a spade a spade", while "wit" is a form of displacement (level 3). Wit refers to the serious or distressing in a humorous way, rather than disarming it; the thoughts remain distressing, but they are "skirted round" by witticism.
One must have a sense of humor and a sense of seriousness to distinguish what is supposed to be taken literally or not. An even more keen sense is needed when humor is used to make a serious point. Psychologists have studied how humor is intended to be taken as having seriousness, as when court jesters used humor to convey serious information. Conversely, when humor is not intended to be taken seriously, bad taste in humor may cross a line after which it is taken seriously, though not intended.
Tony Veale, who takes a more formalised computational approach than Koestler, has written on the role of metaphor and metonymy in humour, using inspiration from Koestler as well as from Dedre Gentner's theory of structure-mapping, George Lakoff and Mark Johnson's theory of conceptual metaphor, and Mark Turner and Gilles Fauconnier's theory of conceptual blending.
The O'Shannon model of humor (OMOH) was introduced by Dan O'Shannon in "What Are You Laughing At? A Comprehensive Guide to the Comedic Event", published in 2012. The model integrates all the general branches of comedy into a unified framework. This framework consists of four main sections: context, information, aspects of awareness, and enhancers/inhibitors. Elements of context are in play as reception factors prior to the encounter with comedic information. This information will require a level of cognitive process to interpret, and contain a degree of incongruity (based on predictive likelihood). That degree may be high, or go as low as to be negligible. The information will be seen simultaneously through several aspects of awareness (the comedy’s internal reality, its external role as humor, its effect on its context, effect on other receivers, etc.). Any element from any of these sections may trigger enhancers / inhibitors (feelings of superiority, relief, aggression, identification, shock, etc.) which will affect the receiver’s ultimate response. The various interactions of the model allow for a wide range of comedy; for example, a joke needn’t rely on high levels of incongruity if it triggers feelings of superiority, aggression, relief, or identification. Also, high incongruity humor may trigger a visceral response, while well-constructed word-play with low incongruity might trigger a more appreciative response. Also included in the book: evolutionary theories that account for visceral and social laughter, and the phenomenon of comedic entropy.
This model defines laughter as an acoustic signal to make individuals aware of an unnoticed fall-back to former behaviour patterns. To some extent it unifies superiority and incongruity theory. Ticklishness is also considered to have a defined relation to humor via the development of human bipedalism.
In Laughter: An Essay on the Meaning of the Comic, French philosopher Henri Bergson, renowned for his philosophical studies on materiality, memory, life and consciousness, tries to determine the laws of the comic and to understand the fundamental causes of comic situations. His method consists in determining the causes of comic instead of analyzing its effects. He also deals with laughter in relation to human life, collective imagination and art, to have a better knowledge of society. One of the theories of the essay is that laughter, as a collective activity, has a social and moral role, in forcing people to eliminate their vices. It is a factor of uniformity of behaviours, as it condemns ludicrous and eccentric behaviours.
In this essay, Bergson also asserts that there is a central cause that all comic situations are derived from: that of mechanism applied to life. The fundamental source of comic is the presence of inflexibility and rigidness in life. For Bergson, the essence of life is movement, elasticity and flexibility, and every comic situation is due the presence of rigidity and inelasticity in life. Hence, for Bergson the source of the comic is not ugliness but rigidity. All the examples taken by Bergson (such as a man falling in the street, one person's imitation of another, the automatic application of conventions and rules, absent-mindedness, repetitive gestures of a speaker, the resemblance between two faces) are comic situations because they give the impression that life is subject to rigidity, automatism and mechanism.
Bergson closes by noting that most comic situations are not laughable because they are part of collective habits. He defines laughter as an intellectual activity that requires an immediate approach to a comic situation, detached from any form of emotion or sensibility. A situation is laughable when the attention and the imagination are focused on the resistance and rigidity of the body. Thus somebody is laughable when he or she gives the impression of being a thing or a machine.