Tuesday, January 26, 2021

Book review: The Dark Forest

The Dark Forest is the 2nd book in the trilogy of books Remembrance of Earth's Past written by Cixin Liu. 

Having recently read the first part of it, I couldn't resist moving forward with the sequel, and so, finished reading this one recently. This one continues from the earlier ending, where humans learn of the incoming TriSolaris fleet. Mostly written from PoV of Luo Ji, it contains some very interesting themes which have been well explored. Some of the themes I feel are very well explored in the book include:

  • Escapism - the human response of fight or flight has been dealt in very good detail, and how it can demoralise the society at large
  • The notion of wallbreakers - what to do when the enemy erects a wall restricting future progress is one way of dealing with such problems
  • Cosmological Sociology - I think it has very sound basic principles. Though many of them can be countered, but let me reiterate the ones mentioned here:
    1. Survival is primary need of civilization - this is the survival principle of modern day thinkers adapted to civilization - all life exists to protect itself
    2. Civilization continuously grows and expands, but the total matter in the universe remains constant - This is akin to a Cosmological Malthusian trap - where population growth is geometric but resource availability is linear, which puts pressure on overall social stability
    3. Chain of Suspicion - reflects the problem of trust that organisms, organizations, and society have faced since inception. While human civilization has existed for only few thousand years, the underlying trust relations have actually been building up over 100s of thousands of years since the very process of evolution began.
    4. Technological Explosion can be understood with importance of surplus in capitalism - technological surplus generated though one advancement serves as capital for further technological advancements and helps fuel them, thus it is hard to predict what kind of surplus and products a galactic civilization may generate within a given timeperiod 
  • The Dark Forest explanation - a response to Fermi's paradox using the cosmological sociology is itself well explained by the conversation between Luo and Da Shi
  • The battle of darkness is similar to Hobbesian state of anarchy, except that it is motivated by absolute belief in defeat - it clearly shows how the material progress is premised on abundance of resources
  • Finally, it is interesting how 2 wallfacers chose the method of cosmological ransom of mutually assured destruction to deter the TriSolaris from annihilating humanity, the first using threat of human technology, while the second successfully getting deployed the technology of other aliens.

However, key themes that I did not find sufficiently answered are (which may get explained in later works):
  • why are there only 4 wallfacers, and how are they chosen?
  • what made the wallfacers derive their phobias? was it another one of the sophon effects, where the trisolaris already had knowledge of neural modification and used it to induce fear?
  • why couldn't the wallfacers innovate out of their wallbreakers attempted explanation by considering that a wallbreaker could be part of the plan as well? Any successful military plan would entail accounting for scenarios where the enemy gets knowledge of the plans, and with sophons, that was very much to be expected

Thus, while the book makes for a compelling read, it does leave a few things to be desired. Yet, I find it a must read book, because of the way the various themes are explored. Overall rating: 5/5.

Saturday, January 23, 2021

Book Review: The 3 body problem

I recently finished reading the book: The 3 body problem by Liu Cixin, translated into English by Ken Liu. 

Its been one of the most intellectually challenging books I've read in recent times, and definitely the best science fiction I've read since I finished the Dune series. 

The fundamental plot revolves around 2 themes: An alien civilization looking to resettle given its unique cosmological disadvantages, and the human civilization on earth being looked down upon by fellow humans for its violence and disdain. What I found most interesting in the book were 

  • The initial storyline around Cultural Revolution and the excesses that it entailed, which is something unique as given Liu's inclinations, these can only be read as very general descriptions.
  • Weaponization of so many futuristic technologies, such as broadcasting of signals through stars, nanowires, satellite bursts through EMP etc.
  • The storyline around proton unfolding and Sophons is again very imaginatively told, and it helps even laymen like me understand what would the concept look like in practise
  • The 3body game and the V-suit are definitely something that will serve as inspiration to future generations of game designers as well as inter-galactic explorers
  • The idea of aliens as gods, the analogy of bugs, and how human-alien interaction may change existing societal structure is thought provoking.
That said, I found some premises of the narrative not upto the mark - such as the excessive environmental vigilantism, silence on the excesses of previous eras and human efforts to compensate for them, and further feel the scenes around violence are not well written. 

Nevertheless, the book is a must read for any space enthusiast. Overall rating: 5/5 

When black boxes seem like voodoo magic

I've been practicing on Leetcode for some time. As some of you may be aware, it is a platform that helps one solves problems online, comes with an online compiler, built in test cases etc, and validates submissions on the basis of given time limits and memory requirements.

While solving one problems on graphs, I hit a roadblock - the test cases just wouldn't pass - test case 3 failed.

Now this was interesting, so I inputted the test case manually to check

Guess what, it worked. Now this is surprising, how can a test work individually when its otherwise failing? So I thought maybe some conditions in my code were not accounting for all execution states, and made minor alterations (no logical change), and resubmitted the code.

But this time, another test failed. And interestingly enough, this was failure at test case 2 (which had passed earlier), which meant that something even more fundamental broke.

Unable to understand what it means, I tried the input again, manually, and it worked:

But, but, but. How is this possible? I finally realised there must be something here which was common in multiple runs, but different in individual runs. Looking carefully at the second error message, it is clear, that some variable was being shared across the runs of the different test cases, when it clearly shouldn't be as per the platform. 

Because, How can an empty list test case find a node for 2?

It seemed, the culprit was here:

Rather than recreating the instance of Solution class, the platform is simply re-sharing the older instance, which contains results as per the previous run, as I've declared the variable visited as a class variable. So the solution was simple, re-instantiate this variable at every run

And we have success:

Thus, what essentially seemed like a bug or Voodoo magic to the lay user, who doesn't have much idea into how the input is being evaluated internally, is simply a reflection of larger phenomenon. End users, and consumers of any black box - be it a an app, a system, a service or a platform, are always at a disadvantage when facing an issue that is unique because of the manner of operations. 

While in this instance, it might have been a feature (or a bug), it is always better to have well intentioned error messages that help the user understand what s/he is doing wrong.

Thus, while the first error message above was not helpful, it was the 2nd one which allowed for some degree of insight into what went wrong here.