Time Travel and Programming 2: Paradoxes

    The era of time travel has not yet arrived, and mankind has long been trying to resolve the paradoxes that accompany them. We will talk about the most obvious of them: what will happen after interference in the course of history? There are several options for how the flow of time reacts to the actions of the traveler from the future. These models can be seen in science fiction films, more and more scientists are talking about them, but there is no consensus on which model is closer to the truth. We are just beginning to penetrate the secrets of time, and we still do not have the opportunity to experiment with movements in the past. What can be clarified in this matter now? Under the cut, we will have an excursion on the basics of the mechanics of time, we will discuss paradoxes and conduct a small experiment. Yes, it will be a test of the virtual machine of time,

    Previous article of the cycle.

    If you suddenly did not hear anything about grandfather's paradox, the essence of it is as follows: the happy owner of CF flies into the past, and by his actions interferes with his own birth. For example, it interferes with the familiarity of their parents. In the new version of the story, the traveler is absent, there is no flight to the past - that means the story does not change. But then the traveler will still be born, and eventually fly into the past ... - a vicious circle of mutually exclusive conditions, which is why this is called a paradox.

    I think everyone understands that the emergence of the paradox is not tied to either the poor grandfather or to erasing himself from history. A traveler can simply ask himself young not to invent the time machine (yeah, that's what he listened to!). Or send a “don’t send a note” note for 5 minutes to the past. The bottom line is: the result of a flight to the past is the abolition of this flight to the past.

    The paradox exists only as our misunderstanding of how time works. Surely nature does not allow the occurrence of paradoxes, but how exactly? Consider the basic models of time, noting their pros and cons.


    Model 1: the impossibility of time travel

    The bottom line: the laws of nature prohibit movement into the past, completely, or with any serious restrictions. There are several variations on this subject:
    • Moving into the past is fundamentally not possible.
    • Moving into the past, or at least its serious change, leads to the rupture of the fabric of space-time, the collapse of the Universe and other total cataclysms
    • Moving, say, 1 year into the past, the traveler will be at a distance of 1 light year from Earth, and will be able to reach the starting point only by the time he flies back - thereby not having the ability to influence himself in the past (i.e., the world line not locked in the ring).

    Pros: triviality of the solution. The easiest way to resolve the paradox is to exclude the conditions of its occurrence from the realm of the possible.
    Cons: but what about the dream of a time machine?) Seriously, the fundamental possibility of time travel is too broad a topic to talk about now, so let's consider what else we have left, hoping that they are still possible .

    Model 2: the predestination of history

    “At that moment, he realized that he was that same Joe. Joe, whom he had already met before. It was as if lightning suddenly illuminated in Bob's head the fact that it was not just the same situation that he himself went through, but it was just that situation_a_s_a_m_a_ya_. Only now did he take it from a different perspective. ” R. Heinlein, "On the heels."

    The bottom line: flights to the past are possible, but nothing will change there, since the pages of history are fixed. If archaeologists have found evidence that you visited Akhenaten in ancient Egypt, this flight will certainly take place, and it will take place exactly as it was in the past. To perform other actions there, or simply refuse to fly - due to some circumstances you will not be able to.
    Hence the conclusion that some points in history can be created by time travelers. For example, you decided to prevent the flooding of the Titanic - once on board, you either encounter a lot of difficulties and cannot take the ship away from the iceberg, or you are horrified to realize that your actions are the real cause of the disaster.
    It is appropriate to distinguish two versions of the model: strong and weak. Strong predetermination implies that it is impossible to change a single detail of the past. The weak allows for changes in small details, but the key points of history, the general direction of events are preserved.

    Obviously, predestination applies not only to the past, but also to the future.. After all, if the past is fixed, and contains events of the arrival of people from the future, the future is also predetermined to some extent, because it must necessarily have circumstances for these flights. Within the framework of this model, it becomes possible to obtain a kind of “guarantee of history”. For example, scientists find evidence of a visit to the past by people from the XXX century - this means that over the next thousand years, humanity will not only exist, but also actively develop science. It is important here not to depart from the laws of logic and understand that the lack of evidence of such visits does not prove anything. “If time travel is possible, then where are our descendants from the future” - this, you see, is not serious, there are many explanations for this.
    Examples:the film “Relic Hunters”, a story by R. Heinlein “On the heels”.
    Pros: there is a certain elegance in this model. Maybe because it occupies a middle ground between the complete denial of travel (model 1) and their description with the use of not the most trivial concepts (model 3). In addition, there are indirect experimental confirmations of this model at the level of quantum informatics.
    Minuses:the idea of ​​predetermining the past and the future seems at least strange. Even if this is a weak predetermination, it is not entirely clear exactly how the laws of physics limit the freedom of a person’s choice to commit, and even more so not to commit certain actions. It is understood that this limitation occurs through circumstances. Does every traveler in the past always have circumstances that will not allow him to abandon the flight? Something similar can still be represented at the level of quantum particles, but the operation of this mechanism in the macrocosm is not yet sufficiently described.
    Moving away from fatalism to weak predestination, we are faced with the question of criteria. To what extent does history allow itself to change? What is considered a key point? We will return to this issue.

    Model 3: alternate realities

    “-Apparently, the time continuum was broken, and a new event sequence appeared that changed reality
    —Doc, can it be easier?”
    Now, let’s illustrate. Imagine that this line represents time, now, 1985, future and past. Until of this point in time, somewhere in the past, the line deviated at such an angle and another 1985 arose, another for you, for me and for Einstein, but the present for everyone else. "," Back to the Future-2 "

    The bottom line: changing history generates a new stream of time, where an alternative scenario of events develops. The traveler himself remains in the reality he created.

    Fig. 1 - the classical idea of ​​the branching of reality.
    It is usually assumed that reality branches out only when there is a serious (yeah, is it again a criterion?) Influence on history. For example, you go to the past, and the observer (H) remains at the starting point. After your quiet walk through the past as a tourist, he will see your return.

    Fig. 2 - the time loop is closed
    But if you go to make (or prevent) a revolution, then for the observer you will not return from the past, because become part of a new reality.

    Fig. 3 - time loop broken

    For non-programmers:the terms “branch” (aka “branch”), “trunk”, “merge” are often used in the article - let them not scare you. These concepts are used in the SVN version control system, which you do not need to know to understand that:
    trunk is the original, “our” stream of time, the course of history.
    branch A branch is an alternative stream of time generated by interfering with history.
    merge - the process of injecting a branch into a trunk, i.e. the consequences of the events of the alternative history become part of the main stream of history (the concept of the main / additional stream is conditional, here we are talking more about one stream as a parent, and the second as a branch from it).

    Thus, you can even rewrite the story from scratch - only it will be its new branch, and the old one will remain intact. A sort of GitHub with forks from any previous revision.

    In this model, time ceases to be a one-dimensional line, because the axis of variation of events is added. Thus obtained Multiversum (the Universe with many alternative realities) is clearly depicted in the form of a tree.
    The tree can be depicted in expanded form, where nodes are events, and outgoing branches are possible outcomes (Fig. 4A). When it comes to changing history, it is more convenient to take one of the tree routes as a reference (zero reality, trunk), depict it as a straight line, and depict an alternative route as a branch (Fig. 4B).

    Fig. 4 - tree of alternative realities in two views
    It is logical: after intervention in the past, the course of events develops in a new way, thereby drawing a different trajectory in the space of options. The only question is what this space is: a theoretical model, or really existing parallel realities. The fact is that we are faced with the concept of an alternative course of events not only when traveling to the past. Remember the theory of the “dividing universe” of Everett. In its popular presentation, it is said that at each event the Universe splits into several realities, where possible outcomes of the event are realized. Roughly speaking, when a coin is thrown, reality is cloned into three copies: in one, an eagle falls, in the other a tails, in the third a coin rises to the edge. We threw a coin and an eagle fell out - what are the other two realities actually? Potential states of the quantum world, or physically existing parallel worlds? This is a fundamental question of modern physics, the answer to which we do not have yet.
    Examples: the film "Back to the Future"
    Pros: this theory really resolves paradoxes. And she does this without causing many questions of restriction of freedom of action in the past. The idea of ​​alternative time streams echoes a number of theories (the dividing Universe of Everett, the multi-sheeted Mega-Universe of Sakharov, the three-dimensional time of Bartini, etc.), and in general is seen as a logical extension of the one-dimensional time model.
    Minuses:brilliantly resolving some issues, the model introduced others. If a history branch is formed only with serious interference with history, then what is the criterion for this “seriousness”? If the branch is always formed, then how exactly does it flow back into the main stream, thereby ensuring the return of the traveler from the past? The hypothesis of merging realities is not new, but so far it is not sufficiently disclosed.

    Model Summary

    There is another model. It is rarely found in literature, it is fundamentally different from the rest, and now you yourself will understand why. So, the same initial data: the traveler erases himself from history, i.e. in the new scenario of events, he does not appear. In this model there are no parallel realities, the main one has changed, it is the only stream of time. Returning in due time, the traveler will be unrecognizable. The fact that now no one is flying into the past does not mean that a traveler will nevertheless be born, because a change in history has already occurred, and it simply remains.
    Imagine that a certain villain went by time machine to the distant past in order to radically change the history of mankind. We will simply disappear from reality, the word we never was. It is logical that already completed events cannot be “annulled” and simply disappear like that. More precisely, intuition dictates this to us, and we need to think about the rationale. I propose for now that it is simply considered an axiom: history cannot be rewritten. All previous models are various options for implementing this protection :
    1. It does not fly into the past
    2. Prevents anything from changing in the past
    3. It does not allow you to change the main flow of time, leading the changes to an additional

    Mankind’s search for a model for resolving paradoxes implies following this axiom. Therefore, we have 3 time models at our disposal. We assume that this is how we outlined the contours of the first question: protecting history from change. What can now be done with these models? I propose to immediately exclude the first: if time travel is impossible, then all our previous and subsequent reasoning is meaningless. Two models remain - which one is correct? Or maybe both are true, being particular cases of a more general model? Before we talk about this, we need to look at the issue of changing history from a different angle.

    Is Ray Bradbury right

    For a second, we forget about the considered models, about the predetermination of history or parallel realities. Before us is the flow of history, a change is being introduced into it - we are only interested in one thing: will the consequences of this influence die out, or will the degree of deviation from the primary scenario grow like a snowball?
    In Ray Bradbury’s short story “And the Thunder struck”, a butterfly crushed in the Jurassic period leads to large-scale changes in our time. The author develops a version about the high coherence of events, which makes the story extremely unstable: even the slightest change in the past, especially the distant one, causes a serious deviation.
    We do not want to change the future. Here in the Past, we are uninvited guests. The government does not approve of our excursions. We have to pay considerable bribes so that we are not deprived of the concession. The time machine is a delicate matter. Without knowing it, we can kill some important animal, pichuga, bug, crush a flower and destroy an important link in the development of the species.
    “I don’t understand something,” Ekels said.
    “Well then, listen,” Travis went on. “Suppose we accidentally killed a mouse here.” This means that all future descendants of this mouse will be gone - right?
    - Yes.
    - There will be no descendants from descendants from all her descendants! So, carelessly stepping foot, you destroy not one, not a dozen, and not a thousand, but a million - a billion mice!
    “Well, they are dead,” Ekels agreed. - So what?
    - What? Travis snorted contemptuously. - And what about the foxes that needed these mice to feed? Not enough ten mice - one fox will die. Ten less foxes - the lion will die of hunger. One lion less - all kinds of insects and vultures will perish, innumerable life forms will perish. And here is the result: after fifty-nine million years, the caveman, one of the dozen that inhabits the whole world, driven by hunger, goes hunting for a boar or saber-toothed tiger. But you, my friend, crushing one mouse, thereby crushing all the tigers in these places. And the caveman is starving. And this person, mind you, is not just one person, no! This is a whole future people. Ten sons would come out of his loins. One hundred would have come from them - and so on, and a whole civilization would have arisen. Destroy one person - and you destroy the whole tribe, people, historical era. It’s like killing one of Adam’s grandchildren. Crush the mouse with your foot - this will be tantamount to an earthquake, which will distort the appearance of the whole earth, will fundamentally change our destinies. The death of one caveman is the death of a billion of his descendants strangled in the womb. Maybe Rome will not appear on its seven hills. Europe will forever remain a dense forest, only in Asia a magnificent life will flourish. Step on the mouse and you will crush the pyramids. Step on the mouse - and you will leave an eternity a dent the size of the Grand Canyon. There will be no Queen Elizabeth, Washington will not cross Delaware. The United States will not appear at all. So be careful. Stay on the trail. Never leave her! which will distort the face of the whole earth will fundamentally change our destinies. The death of one caveman is the death of a billion of his descendants strangled in the womb. Maybe Rome will not appear on its seven hills. Europe will forever remain a dense forest, only in Asia a magnificent life will flourish. Step on the mouse and you will crush the pyramids. Step on the mouse - and you will leave an eternity a dent the size of the Grand Canyon. There will be no Queen Elizabeth, Washington will not cross Delaware. The United States will not appear at all. So be careful. Stay on the trail. Never leave her! which will distort the face of the whole earth will fundamentally change our destinies. The death of one caveman is the death of a billion of his descendants strangled in the womb. Maybe Rome will not appear on its seven hills. Europe will forever remain a dense forest, only in Asia a magnificent life will flourish. Step on the mouse and you will crush the pyramids. Step on the mouse - and you will leave an eternity a dent the size of the Grand Canyon. There will be no Queen Elizabeth, Washington will not cross Delaware. The United States will not appear at all. So be careful. Stay on the trail. Never leave her! Step on the mouse and you will crush the pyramids. Step on the mouse - and you will leave an eternity a dent the size of the Grand Canyon. There will be no Queen Elizabeth, Washington will not cross Delaware. The United States will not appear at all. So be careful. Stay on the trail. Never leave her! Step on the mouse and you will crush the pyramids. Step on the mouse - and you will leave an eternity a dent the size of the Grand Canyon. There will be no Queen Elizabeth, Washington will not cross Delaware. The United States will not appear at all. So be careful. Stay on the trail. Never leave her!

    Now consider a small example. You are going to work in the morning, leave the house, and get to it by metro. Somehow, a correction is made to the story: you learned that the metro is not working today. Taking a bike, you get on it. We make one more correction: the tire is punctured. But you will walk!

    Fig. 5 - the desire for realities to unite

    On the chrono map you can see:
    1. The infusion of branches into the trunk occurs at different points in time, because achievement of the target state (getting to work) occurs in different ways.
    2. The deformation does not completely decay, ie despite the fact that in all three cases you are at work, there are some minor variations (a parked bike, dirty shoes, etc.).

    What happens if we ignore the actors? If the system has a goal, it tends to it in any scenario, thus possessing a certain margin of stability (to deflecting influences). Now I would not like to go into the jungle of philosophy and talk about the goal of material objects, people, society, etc. The fact that events in the world around us obey the laws of physics and in a sense are ordered - I think, is obvious. History cannot be considered a set of coincidences; it has its own conditionality. After the primitive communal system, capitalism could not have come, bypassing the slave and feudal system. If you prevented the outbreak of war in 1939, it is certain that it still started later, because the world would have preserved the prerequisites for this. If one scientist did not make a scientific discovery, someone else would have made it later, and so on. Events of history have a tendency, a tendency, which means that any deviation of the course of history has the property to fade.
    This hypothesis takes us to the next level of understanding of the mechanics of time, because it actually combines the two models considered earlier. In one we talked about the resistance of history to change, in the other - about parallel streams of time. Assuming that parallel streams of time tend to flow back into the main stream, we single out a single essence from these two models: the elasticity of the stream of time .

    How is the merging of realities?

    In a previous article, this raised a lot of questions. The question is extremely difficult, therefore, on the basis of assumptions, I clarify: not objects, but events, merge. Consider the well-known light cone, only instead of the spatial axis we will have an axis of options.

    Fig. 6 - present, as a projection of alternatives of the past and the root of future options. The
    upper cone is the future, these are possible outcomes from the current state, the lower cone is the past, this is some spectrum of possible previous states. The walls of the cones outline the boundaries of reachability, i.e. going beyond the cone means moving to a state (delta along the b axis) that cannot be reached from the current state for a given period of time (delta along the t axis).
    Merging the events of the cone of the past at the point of the present means a common result for them. But how does this happen at the level of changing the structure of objects, how are they superimposed? Perhaps something similar to what is shown in "Back to the Future" is happening, where the headline of the newspaper smoothly changes right in front of your eyes - this is "brunch merry in a trunk."

    Quantum coin

    Two people are sitting in the room: Alice and Bob. Five minutes ago, Alice threw a coin and the tails fell, they both saw it. We have a time machine, and we are correcting the story: five minutes ago, an eagle falls. As a result, we get two realities:

    Fig. 7 - the experiment with two observers
    Alice and the coin cannot be separated, since the result of the coin toss does not exist in isolation from his observation . But we still have Bob, who, with some delay, also finds out the result of the coin toss, and they and Alice exchange a couple of remarks. Two outcomes, and two realities - we see this in the diagram.
    Change the experimental conditions: Bob does not see the result. From Bob's point of view, these two realities are identical, in both of them he sees a coin toss, but does not know the outcome. Important detail (thanksAgent_J for amendment): Alice does not tell Bob the result, then for him the course of events is really the same in both cases. Bob can also go into two brunches as soon as Alice tells him the result of the experiment. Let's try to draw it in 5D: image
    Fig . 8 - experiment with one observer.
    Think about it, it is really curious! It is as if two Alice are talking with one Bob, and just pronouncing one phrase initiates the division of the listener's time flow.

    Here we come to understand the role of the observer in the model of parallel realities. A line on a chrono-map is not a reality, it is a state of a group of objects , observation of any of which includes an observer in this line. Nature does not make a complete copy of the Universe; it simply stores dif of their differences.

    So still, how is the merger?

    First: merging should not be taken literally, as if the worlds were becoming identical. The two worlds are somewhat different, somewhat similar - and this similarity is something like their junction in the space of options. As in the example where, in three ways, a person still got to work - at this moment the three realities had this junction, their partial merger took place. Of course, it is incorrect to talk about the complete merging of realities, because reality itself, as was already shown in the quantum coin paradox, is just a cut of the state space. How different objects can be in different joints, pockets and streams of the space of options - this is a good training for the imagination!

    A frequent question: why do brunches merge, where does the idea of ​​elasticity of history come from? I will answer in other words and briefly: the stability of systems. This is a universal property of almost any more or less complex system, be it a person, the country's economy, world politics, etc. The system has a goal (in one form or another), and the system’s operation is similar to an automatic regulator that corrects movement toward a goal. Therefore, perturbations introduced in the past will encounter resistance to the stability of the world's systems. Bifurcation points are a completely different matter; their impact can radically change the course of events. But the diff attenuation will still be, just on a larger scale. MrSeventh proposed an interesting hypothesis

    during discussions .: what if the physical bearer of the brunch differences log is dark matter and / or energy?
    I can assume the following
    Dark energy is responsible for the accelerated expansion of the universe. For a number of reasons, the theory of a pulsating Universe is close to me, i.e. after the big bang and expansion, compression follows (cyclic pulsation, like a heartbeat). This means that the parameters of dark energy will have to change.
    As an option, the thing is this: now the Universe is young, and most of the brunches are going to diverge, it will take them trillions of years to begin to get closer (in accordance with the decay curve). The synthesis of various versions of the Universe into one will begin, the connection of different brunches, the dif log will be reduced, the parameters of dark energy (if this is the physical carrier of these logs) will change, the Universe will shrink to a state of singularity, where not only all matter, space, and time, but also all options (streams of time).

    Single model

    And now we will combine all the above. Two models of time (the predetermination of history and branches) were actually merged into one: “branches with merg”. Any changes in history (even the very fact of being in the past) draw alternative routes in the space of options, but the flow of time has the property of elasticity, which manifests itself as a gradual desire for alternative routes to merge into the main one. At the same time, the observed world is a slice of a complex quantum interweaving of time flows, when objects located in the same space can belong to different time flows (as long as there is no fact of observation between them).

    Mathematical model

    So, we need to model the attenuation of the deviation of history that occurs when interfering with the past.

    The first option: the most trivial, we believe that the brunch attenuation occurs with some constant acceleration. It is described by the formula of uniformly accelerated motion.
    The second option: more believable, where the flow of time is compared with a spring, and then the force (and hence the acceleration) is proportional to the current deviation. That is, the farther the stream of history has gone aside, the more strongly it tends to go back. It is described by the formula of a damped sinusoid.
    Third option: here is an interesting story. The first version of the article contained
    derivation of the formula according to the 2nd embodiment

    Thanks to Strepetarh , Sayonji , mayorovp , a mistake was noticed: the calculation is based on the formula of uniformly accelerated motion, which is not suitable here. But this formula, as it turned out, is well suited to describe the observed picture (see below).

    1. Equally accelerated attenuation.
    2. Attenuation according to the correct "spring" formula.
    3. Third, old formula.

    And now it's time to move from theory to practice.


    But what if historical data can be modeled? We need some simplified model of the world, consisting of many interacting elements. We will record the course of events, then rewind it, make changes to the “world”, run a simulation, and observe a new scenario. It remains only to quantify the difference between the two realities, and give it in the form of a graph. Then we get an experimental, rather than theoretical, attenuation curve for historical deviations.

    It remains to come up with an algorithm that would fit the role of a "model of the world." After going through several options, I settled on the Conway's “Life” algorithm. Earlier, I had heard almost nothing about him, so I sat down for a search - and was surprised to find many articles on this topic on Habré. It remains to understand how to evaluate the difference between worlds. I wanted to build a solution on a certain evolutionary principle, since the history of the real world is still progress and improvement, and not an established regime of "boiling cells". Maybe something like a genetic selection mechanism, or something similar that would introduce some measurable characteristics into the world, allowing you to compare different versions of the story (for example, “the number of cells of level 42”). On top of the Conway algorithm, it turned out to be quite difficult to screw something. He chose the optimal parameters for Life, and my attempts to add my own rules to the algorithm made the world unstable. After some time, I chose the simplest solution: use the classic version of the algorithm without any frills, and simply subtract one world from another pixel by pixel (the distance along Hamming) - this will be the degree of discrepancy between the stories.

    I implemented the above into the project: https://github.com/TimeCoder/LifeTime

    There you can also download the collection for Windows: https://github.com/TimeCoder/LifeTime/raw/master/bin/lifetime. .win32.zip
    And also under Linux (thanks vershov ):


    Before starting our time machine, we will get acquainted with the UI and program code.

    Fig. 10 - controls
    the program interface consists of 4 areas:
    1. World - here the process of life development is displayed, after accidental filling, cells form and decay according to the Conway's “Life” algorithm. The edges of the world are “sewn” together.
    2. Chronocard - in fact, here we see the chrono-tree, Multiversum, the space of options - call it what you want. Initially, we have one straight line - the primary stream of time, zero reality (green). When we move to the past, a tunnel (blue) forms over the main stream, and a new scenario for the development of events will be represented by a curve (yellow).
    3. The control unit, where the time machine starts and the movement starts.
    4. The output area of ​​various data about the world, traveler and travel.

    Now consider the procedure for working with a time machine:
    1. Immediately after starting the program, you will see a boiling ocean of life and a running time counter. Wait a bit, and click the Begin button.
    2. The time machine is activated, the world stands still. What logically should happen next? A traveler should get into a time machine. Click in the area of ​​the world on the cells, thereby choosing an object to move. The choice can be changed, or canceled altogether by clicking on an empty area.
    3. When an object is selected, the slider located above the chronocard will automatically unlock. Pull it to the left, rewinding the story to the right point in time. This is not a move: we only select a destination.
    4. Press “Leap” - forward to the past! The object will be transferred to the moment of your choice, will become part of the world, and the simulation will continue from this point. According to the schedule, the deviation of the new scenario of history will be visible, and in the place where the object was, it will be lightly highlighted. When time reaches the top of the loop (the point from which the transition to the past was made) - the program pauses, a series of data is displayed on the monitor.

    This version has some features:
    • Only one flight to the past in one session of the program. The possibility of multiple brunches is included in the program, but has been disabled so far, including due to the unsolved task “about three branches” , see below.
    • There are no trips to the future (I did not see the point in them).
    • Switching between streams is possible only after the loop.
    • After you started moving the time slider, you cannot select another object for moving (you need to add some code).
    • On a large world, the program slows down (you need to optimize).
    • Rendering is done using OpenGL (sort of like a normal solution).

    There are other candidates for the role of the basic algorithm, instead of "Life", for example Tierra or Avida. Project development continues.

    Three branches problem

    The problem is that we quantify qualitative quantities. So, imagine 3 worlds: the main stream of time, and two alternative ones. What to take as a frame of reference when depicting a deviation of a story? In the case of 2 branches, everything is simple: the first was drawn as a straight line, the second is depicted as a curve showing the degree of deviation from basic reality. But now we need to depict the third curve. Suppose this reality has budged from the trunk, and differs from it as much (quantitatively) as the second - it turns out that the trajectories of the second and third flows coincide - but qualitatively different events occur in them! Another option: the third reality has budged from the second, and in it the course of history quickly comes to the version of the trunk (for example, the past was changed at first, reality 2 arose, then they flew into the past to return everything as it was - reality 3 formed, almost identical to the first one). The deviation of the third reality from the second is the same as the second from the first. The task is to come up with an optimal method for drawing chrono-cards taking into account such nuances.

    The code

    We will briefly consider the architecture of the project, and the key points of individual fragments. Below is a diagram of the main project classes:

    Fig. 11 - simplified class diagram.
    It all starts with the life calculation algorithm implemented in LifeModel . This thing contains the current state of the world (there is a World class for working with it ), it can fill the world with random cells (this is necessary for the first start) or continue the "frame-by-frame" simulation from a given world (this is necessary when making changes to the past). The LifeView class is responsible for the visual display of the life model, they communicate through signals / slots.
    Life is simulated, but this is only a fleeting “present”, we need to know all the past states of the world, that is we need to move from three dimensions to four: the TimeFlow class appears (time stream, reality branch). It aggregates LifeModel , contains a collection of World (history of the past), as well as points for building a curve deviation of history. It also has a pointer to the parent thread from which it has budged.

    Of course, there can be many time streams, and all of them are stored in the TimeModel , which is actually a time tree. It is TimeModelprovides an interface for viewing the past and moving at a given moment. It stores not only a collection of threads and the number of the current one, but a time traveler (a collection of cells). The TimeView class renders the chrono tree with dynamic scaling.

    At the highest level, we have the MainWindow class . It contains all the view and TimeModel, is responsible for the logic of the UI and associates models with views through signals / slots. The work cycle is organized by a timer, on ticks of which next next to TimeModel is called, and it already runs through all the time streams that currently require calling next (after all, we can be in the past, and our native thread has already been calculated for a number of steps forward) .

    All other details are easier to see directly by code. Yes, since this is my first development experience on the Qt framework, constructive comments on the code are welcome)


    Let's make a trial run, the size of the world is 300x300:

    Fig. 12 - an example of time travel
    History did not immediately go into intense rejection, having reached a maximum, a certain decline began. The ratio of the deviation at the start point of the journey ("loop top") to the maximum deviation can be seen on the monitor, parameter Dif coef. Here it is equal to 0.82, that is, the deformation of history managed to decrease by almost 20%.

    Dif and the nature of the brunch curve

    Having set the size of the world to 100x100, I made a leap into the past, and the following graph turned out:

    Fig. 13 is one of the variants of the time flow curve. The
    yellow curve is an alternative history flow calculated by the program, and on top of it I overlaid the graphs discussed in the section of the mathematical model. Of course, he had to scale them along both axes, because in them the real dimensions were not met. They simply are not known to us: we do not know the coefficient of elasticity of time, and we do not know the coefficient of scaling of the graph along the time axis.

    The graph shows that the first option (uniformly accelerated attenuation) is clearly past, the second ("spring" formula) is more like the truth, but the curve begins to fade too early. The third option (the formula obtained as a result of an error) for some reason more than others reflects the nature of the real curve.

    In fact, I was just lucky on the first attempt to get such a curve. Dif does not always fade, sometimes the deviation is constantly growing, including after the top of the loop. In order to accurately identify what it depends on, we need program improvements and thorough experiments. So far, I have not noticed that the size of the world, the object, or the range of transport affects the nature of the curve. Most likely, as in the real world, the whole thing is in the specific circumstances of the trip, i.e. those "events" among which an alien from the future appears.

    In any case, the obtained curves are closer to the truth than the usually accepted conditional image of reality in the form of a straight line. Firstly, reality deviation is hardly linear. One event takes place, in itself insignificant, which after some time causes (or does not cause) another, already much more powerful. It’s like in the first part of “Back to the Future”: first Marty pushed his father away from the car - the curve of reality deviation slightly went away. And only then events begin to develop rapidly. Secondly, fluctuations constantly occur, the worlds become closer, then further (in terms of similarity).

    Is the size of the world important?

    I conducted all tests on square worlds with dimensions of 100-1000. Of course, the larger the world, the more fully it simulates the real world, while there is only one problem: the program slows down on large worlds. Need optimization. But now some quite logical patterns are clear. On a small world, the spatial focus of historical change is spreading faster. Take the world 100x100:

    Fig. 14 - comparison of trunk and branch.
    An object of 4 cells was sent to the past, and for some 200 generations the world has changed almost completely (the figure shows two realities).

    Let's see the world 1000x1000:

    Fig. 15 - spread of the area of ​​change
    If you superimpose two versions of the world after 500 generations, you can see a very clear spot of difference (everything else is identical). The spot radius grows with time, i.e. changing history spans a growing space. But then again, not always. Sometimes a strange series of events occurs, and all changes are smoothed, sometimes even to zero, and the worlds become identical .
    By the way, after reaching the top of the loop, you can click “Play” and continue the simulation to see the further behavior of the branch. As a rule, if dif monotonously grows inside the loop, it continues to grow after (the radius of the spot increases). However, growth is quite slow, and with a large world, the relative radius of spatial changes is extremely small .

    Three types of time loop

    In the course of the article, we have already several times faced with the question: what is considered “serious” interference in history, and what is not? Perhaps in the foreseeable future we will learn how to calculate the trajectories of reality as Calculators in A. Azimov's “End of Eternity”, but for now, you need to start at least with something.
    Let's start with the concept of a frame of reference. There are two of them, although they are inextricably interconnected: the world and the traveler. You can go back in time and make colossal changes to a neighboring galaxy, but this will not affect the traveler’s past here on Earth. Another example: a traveler can go a day ago and add a trifle to the stream of events of his double, as a result of which he will not fly in a day
    t into the past. The deviation of history in the first example is enormous in the frame of reference of the world, but imperceptibly from the point of view of the traveler. In the second example, the opposite is true: for the world this is a vanishingly small fluctuation, and from the point of view of the traveler, a completely different scenario of events has been launched.

    The measurement of history deviations in the world reporting system is an extremely interesting and important topic, but so far there are more questions in it. Streams of history affect too many people until the necessary models are developed to quantify the significance of world events. Let's say which change in history is more significant: the salvation of President Kennedy or the prevention of the Chernobyl accident?

    The simplest thing we can do now is to evaluate the degree of change in history from the effect of these changes on the top of the time loop. And then it is logical to distinguish 3 degrees of historical change:

    Fig. 16 - three types of time loop
    1. The change decays almost completely to the top of the loop. For example, they had a picnic in the Jurassic period, even plastic will not survive to this day.
    2. To the top of the loop, the change fades, but not completely, some trace remains. For example, they flew off yesterday and drew a picture in their notebook. Having returned, we will open the notebook, and we will see it (the main thing is not to look into the notebook before the experiment).
    3. The deviation of history is so powerful that it can cancel the flight itself.

    It is important to understand the relativity of these degrees, i.e. any change in history fades, the only question is how much it will fade by the time of departure to the past. However, the attenuation continues after this point.

    In the program, for some reason, I did not succeed in catching a loop of the second type on the fly:

    Fig. 17 - examples of the program

    type is displayed on the monitor loop parameter Leap the Type . Almost always there is number 3. What is happening? When the simulation reaches the moment from which the descent into the past was made, the object (which flew away) onto the current world (brunch) is superimposed.If the location of the cells is the same, i.e. in the new version of history, at the same point in space-time there is this object - it means the "invariance coefficient" is 1. If no cell matches, then it is 0. So far, conditional thresholds of this coefficient are set in the code, delimiting 3 loop types (absolutely "from the ceiling").

    Does this mean that any movement into the past leads to paradoxes? I think not, just the Life algorithm is extremely sensitive to the changes that are being made. He gives a model of the world in a very rough approximation, without goal-oriented processes, while human activity in one way or another has its own vector. Due to this, as I suppose, the dif fading effect in the simulation is less than in the real world .

    Readers had a lot of questions like “does history fade away, didn’t this refute the modeling in the program?” I think that it has not refuted, but partially confirmed. There are no more cases when the deviation monotonously increases than when the deviation decays, at least by 5-10%. Even the fact that these cases are recorded indicates that the story is able to "straighten out" in principle, has elastic properties. Some have noticed specific conditions under which a branch flows into a trunk especially quickly - and these conditions can be interpreted in two ways. Yes, the history of the world in the program, like that of the real world, is heterogeneous, consists of several “eras”:
    • high density of life and its homogeneity
    • life thins and more complex structures, separate groups of cells form
    • era of equilibrium

    But doesn't this look like the evolution of our cosmos and planet? And yes, movements within one era, movements between eras - give different results. This can be interpreted as a feature of the algorithm that prevents us from setting up correct experiments. And it can be considered a reflection of the real processes of the Universe.


    Is it possible to say that in general, history most often seeks to return to its course? At a minimum, such an effect has been recorded, and to speak about its frequency, more experiments are needed. Of course, experiments must be carried out in an automated mode, i.e. instead of the UI, implement API programs + scripts, where to set various test scenarios with many repetitions. What will it give?

    At a minimum, we will be able to evaluate the dynamic characteristics of the flow of time. How does the decay curve of the deformation of history depend on the size of the object, the size of the world, what is the most general form of this curve?

    By making the time machine “reusable”, we can model complex paradoxes, and see what really happens. Cancel cancel change history? Groundhog Day? The paradox of the statue? All this can be seen live, in the form of real (or rather, virtual) 5D tracks.
    Maybe you have ideas and suggestions, in what other direction can the project be developed?

    In addition to conceptual tasks, there are a number of purely technical improvements, in particular:
    • Optimization is urgently needed, it is necessary to finish the algorithm (for example, implement HashLife) - I hope that someday hands will reach this point.
    • Can anyone build binaries for Linux?
    • A system of automated experiments.
    • Transition to Qt5, C ++ 11
    • And many small improvements in the interface, the ability to save the world, choose an object from the past, teleport it when flying into the past, etc.

    The main thing is an understanding of the fundamental principles of the issue! Now there are a lot of “myths”, alas, forming the idea of ​​time for many people. Once I read about "if you move a second back, you will find yourself in space, because the Earth moves." Or the state of “chronostasis”, when the world around it “freezes”, is called “time dilation”, while this is the opposite, acceleration of the observer’s time. But such questions are easily resolved even without any experimentation, at the level of elementary logic! I mean that a huge layer of work on the study of time can (and should) be carried out even without working chronotechnologies, armed with common sense. Plus, this is not the first time that programming has come to the rescue.

    Today we touched the tip of the iceberg, briefly examining one of the paradoxes of the time. The theme of time is unlimited, in a variety of questions and its fascination. If anyone is interested in participating in this work, please open several projects. Without a drop of irony, I’ll say that in the question of studying time, not the last hope of mankind for habra-people, whose ability to think logically and burn creatively will help to make new discoveries!

    Yes, the article does not disclose the topic of event laws (eventology), does not list various ways of observing the past (because the article is about travels), and of course many have questions: are travel to the past possible at all, is there time? In order not to go into philosophy alone (and, as a result, holivar), one has to make assumptions. First of all, we admit the possibility of flying into the past. Further, we have the opportunity to not only discuss this topic and express the most “crazy” ideas, but also bring a stream of thoughts into the system, and even try to confirm our theories experimentally. So, step by step, we are approaching the solution to the greatest mystery - time!

    Also popular now: