# The flatmate conjecture

In the summer of 2015, I had the wonderful opportunity to do research on algorithms that could automatically analyse C. Elegans locomotion. I found a short-term lease for a flat in the Marchmont area of Edinburgh and the whole experience promised to be amazing except for the fact that I didn’t know who I was going to be living with in Marchmont.

Previous flats I’d lived in started fine but flat duties weren’t clearly defined so common goods like the Hallway or Kitchen were eventually neglected. From my conversations with other students, zero flat management is the default option and this inevitably leads to frictions among flat members. For this reason, I wanted to make sure that this time would be different.

Within a couple days I got to meet the three other tenants. Unlike me, they were all PhD students doing research in the areas of Geophysics, Sociology and Philosophy respectively. At first, their relative seniority made the proposals I had in mind seem less likely to succeed. Nevertheless, I offered to make dinner on Thursday night so we could get to know each other better. At this they all agreed.

Everything went well on Thursday evening. I learned that two of the PhD students were trained at ENS and had a French background like myself. The other was a Briton doing research in Philosophy and that evening we had a great time talking about a variety of topics ranging from Mergers and Acquisitions to melting glaciers in the Himalayas.

Now, when dinner was over I explained that we should probably work together to make sure that the flat stayed in good condition. I brought up the subject of a cleaning rota, a flat treasury and the importance of maintaining regular communication in order to avoid frictions which could be achieved by a dinner rota. It wasn’t rocket science but the important part was to make it clear that this system was designed with our common interests in mind. This was followed by a brief discussion of dietary requirements but on the whole everybody agreed that my proposal was a good idea.

Over the weekend I shared my plan with other friends who were in Edinburgh that summer and received interesting responses. Some said it was a bit radical to impose something so rigid on other people and that I shouldn’t expect society to conform to my mathematical frame of mind. Others said that it was a good idea but they doubted it would last more than one week. However, when I pressed them to tell me whether they have actually tried to implement such a simple system none gave me a positive response. I believe this is a very important point. Many people who tell you that X will fail actually have zero experience implementing X.

On the whole, this flat system actually worked out very well. Barring two occasions, every Thursday a different flat member would cook dinner. There was never a problem with deciding who had to buy a basic necessity because our simple treasury system meant that there was always 20 pounds at the beginning of each month to buy light bulbs, sponges…etc. and we never had any problems coordinating what had to be cleaned. This flat experience was without precedent and it meant that each flat member could focus on doing research without dealing with unnecessary frictions.

Now, it’s my final year of university and I can say that I haven’t had a negative flat experience since then. More importantly this experience taught me that social problems can have precise solutions if we are willing to think about them precisely.

# The probability that democracy works

We are told that a large number of people opting for a certain choice(ex. a candidate in an election) represents near-certainty that this choice meets necessary and sufficient criteria. No particular person needs to understand how a country works if a lot of people who understand different functions of a country cast a vote on the matter…the aggregate decision represents the closest thing to a complete picture.

Let’s make the following assumptions:
1. The ideal candidate must satisfy $n$ equally important criteria and we assume that this candidate is present among the existing candidates.

2. There are $N$ voters where $N \gg n$ and each voter has partial knowledge of the $n$ necessary criteria. In particular, we assume that each voter is aware of at least one criterion and their knowledge of these criteria is given by a uniform distribution.

From the above assumptions it follows that the probability that the correct candidate is chosen is approximately $1-\sum_{k=1}^{n-1} {n \choose k} (\frac{k}{n})^N$.  In theory this is good. However, there are some problems with our theory.

The first problem is that ‘choice’ of criteria is highly correlated within social groups. Second, the definition of equally-important criteria is problematic. Some criteria like the role of government in tech innovation are more complex than others which means that knowledge of criteria is probably given by a gamma distribution rather than a uniform distribution. Finally, the appropriate candidate might not exist among the set of available candidates.

Now, I think the only way for society to move closer to a system where voting works is to change the current education system. Using uniform grading requirements, students are taught to attain knowledge by consensus which merely encourages groupthink. The necessary alternative is to encourage inquiry-driven learning.

This could come in the form of open-ended competitions, like the Harvard Soft Robotics competition that I’m participating in, or working on projects within Fab Labs/Hacker Spaces. In any case, society will have to shift from skill-based employment to innovation-driven employment due to the growing number of tasks that can be automated. People will be paid for their imagination rather than their time and I believe that in 15 years time sheets will all but disappear.

If we want a democracy that works and not merely the theatrical nonsense that passes for democracy today, radical changes to the education system will be required at all levels.

Note 1: The probability calculation can be much more complicated depending upon your assumptions.

Note 2: For the reader that’s interested in my opinion on Hacker Spaces, you may read more here

# perturbations that preserve constants of motion

Within the context of the gravitational n-body problem I’m interested in perturbations of the initial conditions $\{p_i(0),\dot{p}_i(0)\}_{i=1}^n$   which leave all the constants of motion unchanged.

It’s clear to me that the linear momentum(P) is preserved under any transformation of the initial position vectors and energy(H) is preserved under any isometry applied to initial position vectors. However, when I add the constraint of conserving angular momentum(L), the general nature of these transformations which would leave (H,L, P) unchanged is not clear.

Granted, time translations would preserve the constants of motion but in a trivial manner. Now, I’m not sure whether the approach I’ve taken can be considerably improved but within the context of the three body problem in the plane, I transformed this problem into an optimisation problem as follows:

1. We first calculate the constants of motion which are the linear momentum, energy and the angular momentum prior to perturbing the position of one of the $n$ bodies. Let’s suppose that these constants are given by $C_1, C_2, C_3$.
2. Assuming our bodies are restricted to move in the plane, there are a total of $4n$ scalars that determine the initial conditions for this n-body system. It follows that the perturbation of one body($q$) generally requires searching for a $4n-2$ dimensional vector $x$ for positions and velocities. This can be done using Nelder-Mead, a derivative-free method, provided that we define a cost function.
3. The functions to be minimised are obtained directly from the linear momentum (P), angular momentum (L) and Hamiltonian (H) equations to obtain a single smooth cost function:\begin{aligned} C(x,q) =(P(x,q)-C_1)^2+(H(x,q)-C_2)^2+(L(x,q)-C_3)^2 \end{aligned}
4. In order to increase the probability of convergence, the Nelder-Mead algorithm was randomly seeded for each perturbed position $q$.

I think this method can be easily extended to n-bodies.

# The economic value of hacker spaces

This Tuesday I had the chance to visit the Edinburgh Hacklab and I had a great time checking out the great equipment(laser cutters, 3D printers & more) as well as talking to different people about their various projects. I also caught up with Konstantinos, who used to work for Adam Stokes’ robotics lab at the university. A few people warmed up to my idea of building a galloping hexapod but what impressed me most was the vibrant activity. Unlike the University of Edinburgh, where I study, everybody was building something with a sense of purpose.

Hacker Spaces, Fab Labs, Maker Spaces…whatever you call them, they have the potential to unleash great products in the areas of virtual reality, robotics and even biotech. This statement isn’t baseless. For reasons that universities conveniently ignore, a disproportionate number of Kickstarter projects and startups come from what I shall call Hacker Spaces, from hereon. In spite of this, most Hacker Spaces don’t get regular funding while the price of university education keeps going up.

Following my observations, I decided to check EU innovation schemes. Whichever resource you check there is no mention of Hacker Spaces, Fab Labs…etc.
This confirms my belief that very often governments place their money into whatever sounds impressive. You have to look no further than the Human Brain Project. I don’t have a lot more respect for tech investors in the field of AI either. Nobody wants to admit that we are very far from cockroach-level AI because a startup working on cockroach-level AI is a very hard sell. So here we are in the developed world spending tons of money on headline-grabbing research/innovation instead of focusing on good technology.

Next, I decided to contact several leading silicon valley innovators that started with Hacker Space projects. However, the consistent reply was that they weren’t aware of any detailed economic research. One of them mentioned that terminology might be useful as there are at least three variants, hence my decision to coin an umbrella term. Another asked me whether I was making an assumption that they did indeed contribute to significant economic growth as there’s a difference between a good product and a sustainable company. That’s a good point which I’d like to address.

It’s true that there’s a significant difference between being able to bring a good product to market and being able to run a company well. I’d say that Steve Jobs and the Macintosh is the prototype example. The product was good but it failed for many reasons that wouldn’t be clear to a product designer. However, it’s not clear to me that Palmer Lucky would have managed Oculus Rift well if Facebook hadn’t purchased it and brought its disciplined engineering culture and management structure to such an ambitious project. My thesis is that a good product eventually leads to economic growth as it shows that a market exists for that product and that it’s possible to build such a product. Basically, others will quickly fill the gaps.

Another thing I find pretty cool about Pauli Spaces is that they have the potential to decentralise economic growth. In the future you wouldn’t necessarily need to move your robotics company from Pennsylvania to Boston. Some people object to this by saying that skilled labour is scarce. This argument would be valid if not for the fact that a large number of PhDs from science and engineering can’t find good jobs after obtaining their doctorate. There’s plenty of brilliance out there that’s unappreciated.

Meanwhile, the rate of change of industry continues to outpace the rate of change of the higher education system which charges obscene rates for an increasingly irrelevant education. It’s clear to me and many others that this can’t continue for much longer but I’m not dismal about the future. Hacker Spaces give me hope and in a few months I shall even make this point precise with quantitative studies on the subject.

# Pseudo-anonymous forums

After using the stack-exchange(SE) forums for several years, it’s clear that pseudo-anonymous user profiles are synonymous with lousy user experience. Depending on the stack exchange this manifests itself in different ways but I believe the underlying reasons are the same.

Consider these two questions:

In the first case you have a pseudo-anonymous user on the Physics SE with a lot of reputation who tries to reformat the question. He basically says that the question has nothing to do with physics. Eventually, I demonstrate that his claim is baseless and other users on the physics stack exchange support my arguments. A different user with less confidence might have responded differently however.

In the second case, we have a clear question on the Math Overflow that gets a clear answer from an identifiable person. Now, if you check the top users on the MathOverflow you’ll realise that almost every user is identifiable. In fact, among the top 20 users the number of identifiable users among these forums stands at 95% and 75% for the MathOverflow and Physics Stack Exchanges respectively. I believe that the fraction of pseudo-anonymous users is an important indicator of the overall forum experience.

Pseudo-anonymity is not merely a different type of user setting. It leads to fundamentally different forum interactions for systemic reasons:

1. Users are less inhibited because they won’t be identified.
2. Users feel less pressure to share good content because any social benefits won’t affect their actual person.

Due to this reward system, pseudo-anonymous users tend to behave like idiots if they can get away with it and they won’t try as hard to share great content. If you’re Terrence Tao on the MathOverflow the situation is very different. In general, I suspect that the reason for the greater fraction of identifiable MathOverflow users is that they are actually proud of what they share.

While it’s not clear how the Physics Stack Exchange can incentivise users to use their real names I think they can simply require it. I have no doubt that this would improve the user experience.

# A brief history of AI

The majority of today’s intellectuals and visionaries including Nick Bostrom and Demis Hassabis have a very curious belief that the quest for strong artificial intelligence is a recent phenomenon. In fact, if one thinks carefully this goal has actually been seriously pursued in the last 200 years. It is very far from a recent phenomenon but perhaps it might help if I clearly state what I mean by artificial intelligence.

In 2007, Shane Legg, the Chief Scientist at DeepMind, came up with a good list of definitions of artificial intelligence due to different AI researchers and eventually he distills this into a single definition:

“Intelligence measures an agent’s ability to achieve goals in a wide range of environments.” -S. Legg and M. Hutter

Using this definition, I will use concrete examples to show that there have been at least three important attempts to develop strong artificial intelligence at varying degrees of abstraction in the last two hundred years and these systems have actually been applied to important problems even large numbers of people.

1. Laplace’s Demon:

The goal of any grand unified theory in physics is to develop practical principles and algorithms that are capable of predicting the behaviour of any physical system. Now, in the early 1800s many scientists including Laplace believed that the joint development of classical mechanics and perturbation theory were sufficiently powerful to predict the behaviour of any observable system. This belief is summed up by Laplace as follows:

We may regard the present state of the universe as the effect of its past and the cause of its future. An intellect which at a certain moment would know all forces that set nature in motion, and all positions of all items of which nature is composed, if this intellect were also vast enough to submit these data to analysis, it would embrace in a single formula the movements of the greatest bodies of the universe and those of the tiniest atom; for such an intellect nothing would be uncertain and the future just like the past would be present before its eyes.

This entity which future scientists and philosophers called Laplace’s demon hasn’t quite lived up to expectations. Granted, Hamiltonian and Lagrangian methods are used for simulating a large number of physical systems today ranging from molecules to celestial bodies. However, the big obstacle facing this approach is not only the amount of data required but the fact that we have very few closed systems and almost all closed systems eventually behave in a chaotic(i.e. unpredictable) manner. To be precise, they have a finite Lyapunov time.

2. Communist Central Planning:

The most advanced versions of Communism involve a large number of enlightened and benevolent technocrats that make decisions for the rest of the population in order to guarantee economic equality. The basic idea is that if you get a lot of clever and well-intentioned people together the aggregate decisions will be much better than the accumulated economic decisions of the entire populace. This is not how Communism is usually introduced but this is how it’s always carried out in practice.

In the early 20th century this seemed like a brilliant idea but empirically it turned out to be a catastrophic failure. There are also very sound theoretical reasons for its failure. First, it leads to a monolithic structure that doesn’t adapt to market signals because they are non-existent. Second, the average person is not an idiot and “good technocrats” are simply conceited people that are too stubborn to change their minds. Third, while it theoretically guarantees that everybody does “equally well” it doesn’t guarantee that people do well at all. In fact, if you take into account the first two points the fact that a Central Planning system fails to adapt means that eventually everybody does “equally badly”.

The failure of Central Planning leads me to the next AI system.

3. Free markets:

The Free market is essentially a black box boosting algorithm unlike a Central Planning system. Instead of a well-defined group of elite decision makers you have a large number of agents of variable information processing ability which constitute what Adam Smith would call the Invisible Hand.

Proponents of free market economics argue that the “Free Market” has a number of very important theoretical properties. First, it takes into account market signals which means that it’s adaptable and in theory everybody is commensurately rewarded. Second, it’s regulated by a democratically-elected government to prevent non-competitive behaviour.

However, this system faces many theoretical and practical difficulties:

a) unpriced externalities: unpriced damage done to the environment among other things
b) wealth distribution: There’s no guarantee that the gini index is close to zero.
c) information asymmetry: No guarantee that every agent has access to reliable information. In fact, with the issue of big data today and who owns it this problem is becoming increasingly important.
d) black box: No economist can predict anything with any precision about the future behaviour of a free market economy. There have been unpredictable market crashes in the past and there’s nothing to prevent such catastrophic events in the future.

The four points given above would cause alarm if I associated them with an AI system which would replace the “Free market”. AI theorists would quickly throw up their hands and say “What about goal alignment!?” However humans in Free Market economies and most economists are surprisingly comfortable with the current situation.

More importantly, the main point I’m trying to drive home is semantic in nature. There is no hard and fast rule that AI has to be digital or that it must be programmed via a laptop. The key thing is that there are universal design principles for building substrate-independent AI systems.

Meanwhile, there are many warning signs that the free market system is in danger of imminent collapse. In fact, AI risks lie in the present and not the future as many suggest. The omnipresent AI risk is that we fail to build a more robust AI system to handle the economy while the Invisible Hand falls apart.

Note: Surprisingly economists haven’t made a formal connection between boosting algorithms and free market systems but I promise to write a blog post on this subject in the near future.

# The world we understand

A regular problem I encounter is that people create false dichotomies and use this to guide their reasoning as well as influence the reasoning of others. The problem is that we live in an increasingly complex world with lots of tuneable parameters. Some of them are known, most of them are unknown and almost all of them behave in a highly non-linear manner.

If a project is ineffective that doesn’t mean that the original idea was inherently bad nor does it mean that the particular implementation of that idea wasn’t carefully thought out. It could have failed for any number of reasons. My guess is that many of us reason in a simplistic manner in order to maintain the belief that we live in a world we understand.

Let me give some examples of nonsense I often hear:

1. “curiosity-driven education doesn’t work
2. “foreign aid is a terrible idea”
3. “renewables are the future and always will be”
4. “Mars-bound rockets can’t be built by a company”

In every case the educated person in question will point me to a list of experimental or empirical studies and then try to convince me that the particular idea is lousy. However, what many don’t seem to realise is that in many cases it’s difficult to separate the conclusion of a study and its design. Moreover, what is particularly pernicious about this sloppy method of reasoning is that it often targets unconventional ideas.

In many cases enterprising ideas aren’t inherently more risky than conventional methods. Very often the unusual idea is more carefully thought out whereas the conventional approach merely relies on tradition for justification. If you should take an unusual path there’s less social support in the event of failure and that’s an important reason why many people judge that it’s safer to fit in. There might be a greater chance of succeeding with approach X but if people are guaranteed to say “I told you so” in the event of failure you wouldn’t be irrational to choose conventional methods.

This might seem like a fuzzy cultural problem but I think that this is one of the most important problems facing our society today. We may not be one technology away from utopia but if our society doesn’t become more adaptive I don’t see how we’ll collectively overcome the biggest problems facing us in the 21st century. Tradition should not be the default answer.

However, modern society’s collective desire to be accepted means that even the truth surrounding historically important innovators gets distorted. Paul Graham touches this topic very succinctly in his essay, The Risk of Discovery:

Biographies of Newton, for example, understandably focus more on physics than alchemy or theology. The impression we get is that his unerring judgment led him straight to truths no one else had noticed. How to explain all the time he spent on alchemy and theology?

In Newton’s day the three problems seemed roughly equally promising. No one knew yet what the payoff would be for inventing what we now call physics; if they had, more people would have been working on it.

Now, among those people who are aware that Newton spent a considerable amount of time on things other than physics almost all tend to interpret it by saying that he was a bit crazy like all geniuses. This is simply a careful attempt to recast an important innovator to someone more conventional so we can maintain an illusion that comforts us rather than rationalise unusual and possibly risky projects.

In reality we aren’t safer by collectively walking off the side of a cliff. We need important innovation in the areas of energy, education and government. For this to happen we need to encourage people that take calculated risks and if they should fail instead of saying “I told you so” we should say “It was worth a try”.