Epifyte Model - PendulumProject2020/PendulumProject GitHub Wiki
This article is about the Metaphysical layer.
Over the past couple of years, I have been strongly influenced by ideas of the form "everything is X". In particular, the topic of lambda calculus has given me some very important inspirations. Lambda calculus is a branch of mathematics that characterizes everything as lambdas, essentially functions that can be applied on anything, including other functions. The design of an object as something that "isn't picky about what you use it for" is precisely what enabled lambda calculus to be a possible basis of all of mathematics.
The basic unit of metaphysical existence in this project, the Epifyte, is designed with similar rationales. The conceptual definition of an epifyte is simply "something that binds to other epifytes". This should sound familiar - a tensor is something that transforms like a tensor, a lambda is something that acts on lambdas, a set is something that contains sets, and an epifyte is something that binds to other epifytes.
While the source of inspiration of the epifyte model is the idea in lambda calculus, the source of motivation is something more indirect. I have been brainstorming on a work of fiction that I plan to produce in the future. As the work of fiction will be of the fantasy genre, there will be things like "magic" and "souls", so the setting obviously would not be so scientific. But in order to avoid plot holes, I need to come up with some metaphysical rules on how things like "souls" work. Yet, a fiction with too many rules defined would seem convoluted and pretentious, and potentially be even more inconsistent. It would also be hard to understand, which makes it harder to invoke emotions in the audience - the most important effect that I want to achieve. Therefore, my rationale has been to define relatively simple rules that explain wide ranges of phenomena.
One of these rules is that everything is made of a fundamental substance, to which I give the name "aether". A pattern formed by aether and the lack thereof is known as an "aether code". Everything in the universe, including space and time, are manifestations of aether code. As the pattern itself, rather than the manifestation of it from aether, is something purely of logic and is not a substance, it cannot be described solely by the concept of "aether". Therefore, the universe is constructed out of both logic, more pretentiously named "elementary order", and aether, more pretentiously named "elementary chaos". Since logic by its nature does not have a "location", and aether precedes the existence of space-time as well as any idea of quantity or magnitude based on space-time, it can be said of both that they are everywhere yet nowhere.
After these basic ideas have been established, it becomes easy to make the distinction between a physical object and a non-physical object. A physical object is something that binds to space-time, while a non-physical object is something that does not. It is easier to visualize this if you know Cell Biology - just like how an object in the reality that I have defined is the manifestation of an aether code, a protein is the manifestation of an amino-acid code. Therefore, you can visualize a physical object binding to space-time as a smaller protein fitting onto the active site of a bigger protein. In both cases, it is the structure of the code that determines if and where it would fit.
There are many important thought experiments in the Philosophy of Mind that are hard to solve. One classical thought experiment is the problem of Causal Closure: Assuming that there is a component of a human that is not physical and yet also not purely logical, how can this component interact with the physical world?
It appears that the metaphysical model that I have constructed for my work of fiction does provide an elegant explanation to this: Firstly, the body, as a physical object, must be able to interact with the physical world and other physical objects. The proper way to describe this according to my model is that the body binds to space-time, which other physical objects also bind to. Whenever two objects are connected by a chain of binding links, it is possible for one to influence the other. According to my model, when two physical objects interact, it is not because they are physically in contact, but because there is a chain of binding links between them through the space-time plane. Secondly, while the soul does not bind to space-time, it does bind to the brain, which is part of the body. As such, it is connected by binding links to the rest of the physical world.
Below is an illustration. The light blue arrows indicate binding.
Since my model managed to answer some important questions, I realized that its use may extend well beyond my fictional work. I could see a lot of potential in using it for this project, so I did that. However, there is an important difference between this metaphysics theory and other metaphysics theories. While most of metaphysics theories seek and claim to accurately describe our reality, and try to prove that that is the case, this theory does not. Instead, this theory merely seeks to be a model of reality.
While this theory was conceived way before this start of this project, the name "Epifyte" was only thought of during the project. It is an alternate spelling of the word "Epiphyte", which refers to a plant that grows on the surfaces of other plants, a metaphor of my idea of "binding". At first, I wanted to name it "Matryoshka", but I realized that while it is logically similar to my idea, it is not a good visualization of "binding" since the direction of focus of the former goes from outside to inside, instead of from bottom to top like the latter.
Not only can multiple epifytes bind to one epifyte, it is also possible for one epifyte to bind to multiple epifytes.
The Fairy Chess side-project is a test of the epifyte model for the purpose of familiarizing with and improving on it.
EpifyteModifier
An epifyte modifier is a special kind of epifyte that facilitates a process known as "information propagation". There is a fairly clear way to visualize an information propagation:
Imagine that you are in a competition where you have to answer questions regarding some topic. It so happens that you have no experience and are clueless about the topic, and you are unwilling to answer any of them, since there is a large point penalty for answering a question wrongly. But you find a loophole in the rules of the competition and bring a few of your friends who each knows a bit about the topic. The friends will take turns (based on a fixed sequence) to help you answer the questions. As a result of the loophole in the rules, the organizers of the competition could not stop you from doing this.
For some questions, there is one friend who knows very well, while everyone else knows nothing. But since he knows it very well, he gives the right answer while all of your other friends are unable to tell you anything. You take the answer from the one friend and get the points for the question.
For some questions, there are multiple friends who each knows a part of the answer, so each one builds on what the previous one has left off. On a few occasions, a friend in the later part of the sequence would correct a mistake that a friend in the earlier part of the sequence has made.
As a result of the friends helping you, you managed to answer most questions correctly and win the competition. However, everyone thinks that you are the one who answered the questions and won the competition, since you were the one who signed up for it.
The analogy is as follows:
The competition -> The program
A question -> An information request
You -> The epifyte to which the information request is directed at
The friends -> A stack of epifyte modifiers binding to the above-mentioned epifyte
The epifyte to which the information request is directed at does not give an answer or an output. Instead, it will rely on the epifyte modifiers binding to it.
Epifyte modifiers can be attached separately instead of as a stack, but the stack structure is preferred if we want to ensure that there is a fixed sequence of invocation. When there are multiple epifyte modifiers attached separately to a single epifyte, they will be contained in an ArrayList. The information propagation will be done as a Depth-First Search starting from element zero. Below is an illustration:
Note:
- This diagram shows the binding relations of epifyte modifiers (which, note, are all also epifytes). Each circle represents an epifyte and each blue arrow represents binding. Every epifyte here other than the one at the bottom (which is the recipient of the information request) is an epifyte modifier. There is a special ArrayList (an instance field of each epifyte) that contains all the epifyte modifiers binding to it and leaves out all the non-modifier epifytes. A non-modifier epifyte is not capable of handling or propagating information.
- Among the epifyte modifiers binding to the same epifyte, left-right direction indicates the position in the said ArrayList. That is, the order is fixed.
- The program will carry out a Depth-First Search starting from the element zero of this ArrayList. There is a single DataSet encapsulating the information that is passed, and each epifyte modifier modifies this DataSet if it has the job of doing so, or pass it down as it is if that is not its job.
- The numbers represent the order in which the epifyte modifiers are called. The origin of the propagation, that is, the recipient of the information request, does not handle the request on its own even if it is also an epifyte modifier.
- Note that each epifyte above 13 and 16 are called twice. That is because the request passes through 13 once and also through 16 once. Generally, we try to avoid binding epifyte modifiers in such a manner.
- There are two ways to respond to the possibility of there being a directed cycle. We either try to avoid having a directed cycle in the first place, or we avoid the program crash with the help of an information propagation permission judge.
EpifyteArm
The EpifyteArm class is a subclass of the EpifyteModifier class. The additional feature that an epifyte arm has is that it is capable of acting on a command. All epifyte modifiers can propagate commands, but only epifyte arms can act on them. The algorithm for command propagation is essentially the same as that of information propagation.