Thursday, January 31, 2019

#mylittlepony - #Imagining unicorn magic as like computer programs


Imagining unicorn magic as like computer programs

This post is a sequel of sorts to a broader question I submitted several months ago. Unicorns are able to cast magical spells that can perform a wide variety of actions, from simple levitation to self-defense to transforming an apple into a chariot. We all know what magic can do and what it looks like on the screen, but what is far more difficult to imagine is just how magic works. That is, what does it feel like to cast magic as a unicorn?

I got a wide range of interesting responses when I asked this several months ago. The one that I want to key in on today was one which /u/Logarithmicon gave fascinating insight on. Consider the following thought: imagining unicorn magic as like computer programs. In the same vein, imagine the unicorn as being a computer programmer, with her horn being a computer.

What do we know about magic? I'm copying from my earlier post here:

  • We know that magic is something that can be taught and learned, as there are entire schools set up for gifted unicorns, which Twilight Sparkle attended.
  • We know that magic is something that one can get better at with practice, as shown by Sweetie Belle's progressive attempts at magically levitating a broom in S4E15 "Twilight Time".
  • We know that most unicorns are "only supposed to have a little magic that matches their special talents", but some unicorns special talent is magic and are thus highly skilled in a wide variety of magic, as explained by Twilight and Spike in S1E06 "Boast Busters".

Computer programming is something that can be taught and learned. Computer programming is certainly something that one can get better at with practice, and you'll typically have to learn a little programming if you go into any kind of science, technology, engineering, or math field – but for some people, computer science is their chosen field, similar to how for some unicorns, magic is their special talent.

Furthermore:

  • We know that magic spells can be written down on paper in some kind of language, which can then be read, interpreted, and cast by other unicorns. Twilight spends much of her time studying magic by reading about it in books.

Indeed, there are a variety of programming languages which computer programmers will use to write their code. The code that you write will then be interpreted or compiled, then executed. Imagine there being a "programming language" of sorts for unicorn magic, which unicorns can read, write, and execute via their horns.

Perhaps most critically:

  • We know that new magic spells can be created by unicorns. Infamously, in S3E13 "Magical Mystery Cure", Twilight is tasked with finishing a spell which Star Swirl the Bearded had started and written down. Spells aren't simply discovered, but they can be created by unicorns with a specific goal in mind.

This leads to a variety of interesting questions and thoughts:

  • Are there standard libraries of resources from which unicorns can draw magic? Think of levitation as being associated with a specific library of functions: we've got the lift(object) function and the release(object) function in the library. These functions have already been implemented for you by previous wizards and sages: you need only to abstract them away as levitation.
  • Does every unicorn have the same "computing power"? Or are some unicorns able to perform some spells faster than others? Are there artifacts (e.g. the Alicorn Amulet from S3E05) or transformations (e.g. alicornization) that can amplify one's magical power?
  • Is research into unicorn magic kind of like computer science research? Imagine doing algorithm analysis to construct the most efficient spells – Twilight sitting in her room and realizing a particular spell has an O(n2) runtime. Or imagine developing new "compilers" that more efficiently convert the high-level code you write down into "machine code" which your horn actually executes.


Submitted January 31, 2019 at 03:22AM by SmolderTheDragon
via reddit https://www.reddit.com/r/mylittlepony/comments/alo56i/imagining_unicorn_magic_as_like_computer_programs/?utm_source=ifttt

No comments :

Post a Comment