Posts

  • Retrospective on Friendship is Magic Season 5

    Very minor spoilers for season 5, use your own judgment.

    This was a worryingly good season.

    When watching Friendship is Magic, you always need to remember it’s a kids show first. It can be frustrating to see episodes relying heavily on kids show stereotypes, or episodes that are as blunt as a hammer in their moralizing. Every season has a few episodes that are duds, which makes season 5 so surprising. In retrospect, very few episodes fell flat for me. There were certainly mediocre ones, but on average this might be the highest quality season yet.

    That’s why I’m worried. Everything about this show and this fandom feels like its living on borrowed time. I mean, the 100th episode aired this year. The five year anniversary episode aired this year. Season 6 is confirmed, and a feature length movie is in production. It’s hard to believe the show staff have kept the heart of the show alive after all this time, but they did. My favorite episode of the entire show was in this season, for crying out loud! (And I thought nothing was going to top Pinkie Pride from season 4.) Over five years later, the jokes are still good and the ponies are still going through character development. A crash feels inevitable, but for now the hype train keeps rolling.

    That isn’t to say this season was perfect. I have mixed feelings on the finale, and on season 5’s action in general. The show blew all its serial escalation on the explosively good season 4 finale, and although that shouldn’t be a slight against season 5, it still colors my perception of the action and adventure this season. It’s a lot like Breaking Bad season 4 and the first half of Breaking Bad season 5. Both are good, but I compare episodes to the previous season, not to some Absolute Scale Of TV Quality. Luckily for season 5, its weaker adventure is counterbalanced by the heart in its slice of life episodes. The guiding theme this season was executed very well, and led to a lot of touching scenes that felt natural and genuine.

    More than anything else, this season shows the staff isn’t afraid to try something new. Episodes have deeper continuity, tons of status quo was told to buck right off, and the envelope wasn’t just pushed, it was shoved beyond recognition.

    wasteland

    Welcome back to My Little Pony. Here’s a desolate wasteland with no civilization. For kids!

    It’s a great sign for season 6. I’m still unsure they can keep the charm that makes the show great, but this time I’ll give them the benefit of the doubt.

    Comments
  • Math in Movies: The Friendship Games Geometry Problem

    (Very minor spoilers for Friendship Games. Read at your own risk.)

    (Click on any image to see the full size photo.)

    It’s not well known outside the fandom, but My Little Pony: Friendship is Magic has a high school spinoff called Equestria Girls. It’s a movie series that exists only because of the merchandise potential. Reception to the films is mixed, but it’s widely agreed they’re nowhere near as good as the show.

    The most recent entry, Friendship Games, came out September of this year. It’s…well, it’s definitely a movie. The pacing is off, the plot is silly, and the world stretches suspension of disbelief way too much. (Magic is real, humans are growing wings, there’s a portal to an alternate universe, and no one outside the school knows about it despite almost no attempts to hide it. Really?)

    That being said, I still enjoyed it. The animation is excellent, and the songs are catchy. Here’s one of those songs.

    This segment is a ton of fun. It gets so much mileage out of facial expressions and body language, the way good animation should. I’d also like to point out all the badass science and carpentry these girls are doing. Hooray for casually breaking gender stereotypes!

    But, that’s not what this blog post is about. It’s about this frame.

    first scene

    Wait. Is that…

    second scene

    It is.

    third scene

    It’s Euclidean geometry.

    Let me explain why this is the best thing ever.

    I did math contests in high school. My favorite subject was Euclidean geometry. I took a course on Euclidean geometry for math contests. I made honorable mention in Bay Area Math Olympiad because I knew about radical axes. This is an animation of two high school students competing on a geometry problem. THIS WAS ACTUALLY MY LIFE. One huge part of my identity got animated into another huge part of my identity. It’s so wonderful.

    And the animators didn’t half-ass it either. These chalkboards look like valid geometry proofs. There’s no immediate reason to believe they aren’t. I wonder if the proof’s correct…

    Cue the nerdsniping.

    ***

    To investigate this, I first gave the animators the benefit of the doubt and assumed it was real. There’s a good reason to assign a high prior on this. The time travel episode from season 2 of Friendship is Magic included equations from special relativity describing time dilation. The 100th episode had a free body diagram and several equations from Newtonian physics. I give the team a lot of respect on attention to detail. At this point, they could add Fermat’s Last Theorem as an Easter egg and I wouldn’t bat an eye.

    Let’s chase that assumption for a bit. It’s easiest to see the diagram at the start and end of the contest.

    second scene

    ninth scene

    On a closer look, the diagram looked vaguely familiar. Let’s set that aside for now and ask what else we can figure out.

    At the beginning, there’s no text accompanying the diagram, so the problem must require no additional detail. At the end, the writing on the chalkboard only involves lines, triangles, and angles. Notably, no trigonometry and no side lengths. If it is a real problem, then it’s an angle chasing problem. Yet for an angle chasing problem, this is a surprisingly long proof. In my experience, angle chasing is pretty short, but Sunset and Twilight have filled an entire chalkboard with derivations.

    (Again, at this point it’s only likely this is a real proof. What I’m doing here is finding out what a real proof would imply to help narrow down what the problem is. Based on how easy/hard it is to find a problem matching those deductions, I can adjust how likely I believe the proof is real. It’s possible the animators made a new geometry problem just for this movie, but I don’t think they’re crazy enough to do that for 25 seconds of animation.)

    After some searching, I found the World’s Hardest Easy Geometry Problem. It hits all the key details: it uses only angles, requires only basic geometry, and has a difficult solution. I had actually seen this problem several years ago, which explains why the problem looked so familiar. The solution is \(x = 20^\circ\), which matches the answer from the movie.

    side by side answer

    and the given angles match up

    side by side diagram

    and \((180 - 80) / 2 = 50\) shows up in both proofs.

    side by side 50

    Jackpot.

    Verification

    It’s certain this is a real geometry problem and proof. The only question left is to see how accurate the animators were.

    Unfortunately for geometry enthusiasts, the movie spends very little time on the proof. Most of the proof is in this montage.

    gif of proof scene

    Stepping through this frame by frame gives the money shot.

    fifth scene

    This is the clearest shot of the chalkboard in the entire sequence. It’s also only shown for 0.2 seconds. A lot of work, for something that people will barely notice. The text lines up exactly with the second section of the proof.

    middle of proof

    However, it’s not perfect. Neither character draws the parallel to \(AB\) through \(D\), so there’s no point \(F\). Also, neither character draws segment \(AF\), so there’s no point \(G\). They’re both pulling these points out of nowhere. (If curious, click here for the diagram with added lines.) Also, the derivation \(\angle CDF = \angle CAB = 70 + 10 = 80^\circ\) has a small animation error. They accidentally drew \(- 80^\circ\) instead of \(= 80^\circ\).

    The rest of the montage has nothing new. There’s this shot

    sixth scene

    which is a closeup of the top line of the second section, and this shot

    seventh scene

    which is a closeup of the \(\angle DEF = 30 + x = (180 - 80)/2\) line.

    The first section of the proof only appears in the final shot. I had to zoom to see it, so it’s a bit blurry.

    proof start

    It reads

    \[\angle ACB = 180 - (10+70) - (60+20) = 20^\circ\] \[\angle AEB = 180 - 70 - (60+20) = 30^\circ\]

    which again lines up with

    original proof start

    The ending of the proof is best seen in the two closeups

    third scene

    fourth scene

    which gives the final lines

    \[\triangle ACG \cong \triangle CAE\] \[FC - CE = FA - AG = \overline{FE} = \overline{FG}\] \[\overline{FG} = \overline{FD}, \overline{FE} = \overline{FD}\]

    There are some more errors here. Sunset derives \(\angle CDF = \angle CAB = 70+10 = 80^\circ\) after writing \(\overline{FE} = \overline{FG}\); she’s proving things out of order. There’s no way she can justify \(\overline{FC} - \overline{CE} = \overline{FA} - \overline{AG}\) before that line. (Points to Twilight for proving things in the right order. It could be a subtle way to show Twilight is better, but it’s probably an error.)

    Going back to the original proof, both characters skipped stating triangles \(\triangle DFG\) and \(\triangle AGB\) are equilateral. However, that’s reasonable. They’ve shown the angles of \(\triangle DFG\) and \(\triangle AGB\) are all \(60^\circ\), so the equal side lengths are implied. They also skipped justifying \(\overline{FC} = \overline{FA}\) from isosceles \(\triangle FCA\), and didn’t prove \(CG\) is the angle bisector of \(\angle C\), but these are also reasonable skips given the diagram.

    Overall, I’m impressed the animators got as much right as they did. It also shows that Sunset almost, almost solved the problem, since her only error is an arithmetic mistake at the end. Sometimes that’s how these things go. Now that I’ve done all of this, I actually like this scene more. Sunset Shimmer’s fall to villainy was based around a desire to be the best at all costs, and her redemption is about her anxiety at failing to make up for all the damage she caused. With all the self-loathing and setbacks she goes through, it’s easy to forget she’s almost as good as Twilight.

    Nice job team! Now, if only you remembered how to spell…

    spelling gif

    Comments
  • A Proposition For The Formula to Humor

    DISCLAIMER

    Wrote this only to remind myself to keep practicing my writing. Persons criticizing the stodgy language or lack of polish will be prosecuted; persons pointing out the copious bullshit will be banished; persons noticing this disclaimer’s unoriginality will be shot.

    By Order of the Author, Per G.G., Chief of Ordnance

    Also, I am at most 50% serious about all of this.

    Abstract

    Humor and jokes have experienced a great surge in popularity, which can attributed to the creation of more efficient delivery systems, like the Internet. However, the field of humor analysis is still notably underdeveloped. We posit a hypothesis on a formula describing the humor of a joke as a product of factors that depend on the speaker, the joke’s content, and the listener, in the hopes that this will inspire society to think about why it considers something to be funny, instead of taking it as a given. As evidence, we use material from professional comedians, and math puns that have made the rounds in mathematician subculture folklore.

    Clearing Misconceptions

    One common criticism against the field of humor analysis is that explaining a joke ruins the joke. Thus, much like the goto statement, detractors say that analyzing humor should be considered harmful. This misconception is misguided and often forms the bases of most criticism against the field, so we would like to briefly explain away these worries.

    First of all, humor analysis is the study of humor in general. This involves making grand, sweeping statements about why we consider jokes to be funny, without leaking or exposing any information about the jokes themselves, and this indirect analysis is what lets us make progress while minimizing joke destruction.

    Secondly, it is arguable whether explaining a joke is harmful at all. Suppose a listener hears a joke, gets it immediately, then hears an explanation of the joke. That listener’s enjoyment is not ruined by hearing that explanation, because the listener already has an implicit representation of that explanation in their head. Now, suppose a listener hears a joke, and does not get it. Then that listener has so far received zero entertainment from the joke, and hearing an explanation can only increase that entertainment. And in some rare cases, explaining the joke can itself be a joke. This is known as meta humor, and is outside the purview of this post. For further discussion, see [1]

    We admit that this argument for humor analysis is informal, and that there are other complicating factors, To be frank, we will not give a shit, and will proceed with the analysis regardless.

    Notation

    It is a well known fact that including unneeded mathematical notation makes text more persuasive and legitimate. Thus, we formalize some notation that will be used in later sections.

    \(J\) will represent the set of all jokes, and \(j\) will represent a joke from that set. \(P\) will represent the set of all people, and \(p\) represents a person from that set. \(H: P \times J \times P \rightarrow R\) denotes the humor function. We assume humor depends on the person saying the joke, the joke’s content, and the person hearing the joke. This will often be written as \(H(p_s, j, p_l)\), where the subscripts indicate “speaking” and “listening” respectively. The output is a real value, denoting how funny \(p_l\) finds joke \(j\) when it is delivered by \(p_s\).

    Lest people worry about drowning in notation, we have endeavored to explain all further equations with English as well.

    Proposed Humor Formula

    We propose that humor is the product of three factors: the inherent funniness of the joke when delivered by the speaker, the amount of education needed to understand the joke. and the amount of sleep deprivation the listener has.

    More formally, let \(I(j, p_s)\) be the inherent humor joke \(j\) has when delivered by \(p_s\), \(E(j)\) be the amount of education needed, and \(S(p_l)\) be the amount of sleep deprivation the listener has. Then

    \[H(p_s, j, p_l) = I(j,p_s)E(j)S(p_l)\]

    We spend the rest of the post explaining the reasoning behind these terms.

    The Inherent Humor Term, \(I(j,p_s)\)

    Clearly, different people will find different jokes funny. Given the wide variability, it doesn’t seem reasonable to talk about inherent humor. However, professional comedians are a counterexample to this line of reasoning. These people make a living doing stand-up or creating comedy sketches that a wide range of people enjoy. They can do this because most of their jokes are inherently funny. Behind the scenes, show hosts like Jon Stewart and Stephen Colbert spend hours crafting jokes that are likely to work on a wide audience (that have high inherent funniness), then spend more hours rehearsing their material (improved delivery makes a joke funnier. Note this is why this term depends on the speaker as well as the joke.)

    The Education Term, \(E(j)\)

    PhD comics

    Fig 1. Prior work on the link between education and humor. [2]

    Consider the following example jokes from math.

    Q: “What’s purple and commutes?”

    A: “An abelian grape!”

    Q: “What’s sour, yellow, and equivalent to the Axiom of Choice?”

    A: “Zorn’s lemon!”

    The first joke requires knowing abstract algebra, since it is a play on “abelian group”. The second requires knowing some foundational mathematics, as it is a play on “Zorn’s lemma”. Both of these jokes have terrible inherent humor. (Should you disagree, we advise getting a second opinion immediately.) But, because they use obscure concepts from math at the university level, they still demand a chuckle from people “in the know”. We call this the phenomenon privileged shared knowledge. People with privileged knowledge know something that the average person does not know. A group with privileged shared knowledge knows they all know something the average person does not know. When someone delivers a joke, it is implied that person knows the background required to understand the joke as well. Thus, listeners “in the know” have privileged shared knowledge with the speaker. This triggers a deep seated tribal mentality, where the tribe is everyone who knows abstract algebra, or everyone who knows about the Zorn’s Lemma. Once included in this tribe, the listener gives the speaker and joke much more leeway, and will consider what the speaker says to be considerably funnier than it actually is.

    As further evidence, consider this especially extreme case.

    It’s an old joke that a mathematician is a device for turning coffee into theorems. However, it’s also true that a comathematician is a device for turning cotheorems into ffee.

    The first joke is slightly funny on its own, and is further elevated because it mentions “mathematicians” and “theorems” in passing. However, the second joke has no inherent humor at all. It is only funny if you know a little bit of category theory. [3] Then, as if by magic, it suddenly becomes humorous. Not only do you need to know category theory, you need to know that there is an old joke that mathematicians are coffee -> theorem converters. By this point, anyone who has all the requisite background information must find it funny.

    This also explains why people feel “left out” when they “don’t get” a joke. Because they do not have the privileged shared knowledge, they are excluded (or “left out”)) from the tribe. They are forced to rely on the inherent humor, and unfortunately jokes like these math puns have terrible scores in that department.

    As a side note, this observation seems naturally extendable to Internet memes and in-jokes. For memes, the privileged shared knowledge is knowledge of the meme itself. For in-jokes, the privileged shared knowledge is the context in which the in-joke was first created. We leave finding examples of this to the reader, but suggest Reddit threads as a good starting point.

    The Sleep Deprivation Term, \(S(p_l)\)

    The final term we propose is the tiredness of the listener. When especially tired, people are more likely to find things funny than they normally would be. One possible explanation for this is that it is a subcategory of the privileged shared knowledge, where living through the context of no sleep is the common information. However, this does not accurately why a joke that is funny at 3 AM is no longer funny the next morning, as everyone involved should still have the shared context. Somehow, the joke becomes less funny, even when said from the same speaker to the same listener.

    Therefore, humor must depend on some temporal structure. We propose that sleep deprivation makes jokes funnier because the brain is less able to judge a joke due to stress and fatigue. When we are told we are about to hear a joke, our brains start expecting humor, and primes our mental state with a baseline level of funniness. As the brain hears and considers the joke, further adjustments are made to this value, and eventually we decide on the humor level and laugh/facepalm appropriately. When tired, the listener’s brain gets less computation time, giving less time to adjust the baseline value. In this scenario, the final humor output relies more on the primed state, explaining why jokes can be funnier deep into the night; the joke itself was awful, and we simply did not have the time to realize it.

    Note this also suggests that especially good jokes are not as funny when tired, since our brains have less time to adjust the internal humor value upwards. This lines up with our anecdotal experience, and therefore must be true.

    Conclusion

    The great surge in viral videos and memeing, as fueled by the Internet, has made humor analysis an exceptionally useful field. Should the trend continue, we believe considering questions like this one will continue to be useful in the future. We hope this incredibly dumb post inspires future work, which will ideally be much more insightful.

    References

    1. Don’t Explain the Joke - TVTropes
    2. PhD Comics - Your Shrinking Sense of Humor
    3. Joke Explanation of Comathematicians - Math StackExchange
    Comments