The Dark Forest Theory

If aliens exist, why haven’t we seen them yet? After all, the universe is vast, and Earth-like planets are abundant. This is the Fermi Paradox, which says that it is a contradiction that while alien life should be plentiful, we have yet to make contact with any of them.

If the universe is so vast, then where are the aliens?

One possible explanation for the Fermi Paradox is the “Dark Forest” theory, which models the vast universe as a “dark forest” and civilizations as “hunters.”

To understand this, the theory requires three axioms to be assumed as true:

  1. Every civilization wants to survive.
  2. Every civilization wants to expand and grow.
  3. Every civilization is either friendly or hostile.

From axiom 1, every civilization would do anything to ensure the survival of their species.

From axiom 2, every civilization advances their technology over time. This also means that civilizations advances their weaponry over time. (A famous example of this is shown in the amazing match cut in the film 2001: A Space Odyssey, shown below.) However, not all species would advance at the same rate, and so some civilizations may be more advanced (and thus powerful) than others.

In the film “2001: A Space Odyssey”, after an ape discovers the use of bones as a weapon, he throws it in the air, which match cuts to a similar scene thousands of years after, to a satellite orbiting Earth, which is holding an atomic bomb.

From axiom 3, every civilization can be categorized as either hostile or friendly. Friendly civilizations would try to form an alliance with other civilizations and join forces in the spirit of collaboration. Hostile civilizations would destroy any civilization it comes across, deeming them as dangers to their own survival.

Suppose civilization A discovers civilization B. Civilization A cannot be sure if Civiliation B is friendly or hostile, but it knows that civilization B has a probability P of being both hostile and more technologically advanced then A. Similarly, if civilization B discovers civilization A, it knows that civilization A has probability Q of being both hostile and more technologically advanced than A.

We can model this situation in a payoff matrix, where either civilization can either destroy or ignore the other.

The payoff matrix for destroying or ignoring other space-faring civilizations.

Since the values of P and Q are unknown for each civilization, the only clear Nash equilibrium here is to (Destroy, Destroy), which means it is better to preemptively destroy rather than risk being destroyed. In essence, the universe is a “dark forest” where every civilization is a hunter trying to keep quiet. If discovered, hunters have only one thing they can do, which is eliminate the others, in order to ensure survival.

Git & Graph Theory

Version control systems are a staple of modern software development. With popular applications like Git and SVN, almost all production-level software written today is managed with version control systems. However, what is not as well-known is that at the heart of these systems is a beautiful and practical application of graph theory.

The commit history of any version control repository can be represented as a directed acyclic graph, where each node is a revision of some source code, and the edges are links in time pointing to the previous commit made. The main branch of this repository, often named master, is essentially a straight chain of commit nodes, with each edge linking commits to its previous commit dependency.

The tree-like structure of this particular repository comes from the ability to “branch” off certain nodes in the master branch, which allows parallel lines of development. The interesting part is when we consider the actions of “merging” and “rebasing”, which turns the graph from a tree to a directed acyclic graph. 

A typical graph of a repository’s commit history.

Merging is the act of taking two branches and combining them together, constructing a new node in the commit history containing the combination of changes made on both branches.  Note this still forms a directed acyclic graph, since every edge is only ever directed backwards in time- there is no way to form a cycle in this case.

Merging seen in action.

Rebasing, on the other hand, constructs a new edge, rather than a new node. When branch A is rebased onto branch B, the head of branch A modifies its edge to point to the tail of B, essentially replaying changes made to the source code in a new order.  Note this also still forms a directed acyclic graph!

Rebasing seen in action.

While Git is infamous for its terse and confusing commands, the model behind it is quite interesting!

https://medium.com/girl-writes-code/git-is-a-directed-acyclic-graph-and-what-the-heck-does-that-mean-b6c8dec65059