Posts tagged “complexity”.

Provocation and adaptation

My last post, on the topic of resisting the circumstances in life, ended with a question. What choices should I make to resist maximally, given that choices make me stronger, i.e. choices have long term side effects on me?

So I would like to, probabilistically, maximise my set of skills in order to best be able to achieve some kind of ambition I have set for myself. Cutting off my hand will probably not help me, but learning arabic might. Being in a car crash is unlikely to be helpful, but being a marathon runner could conceivably be useful. Both involve pain, but one causes irreversible damage, the other causes an increase of strength if done properly. What is the ideal form of schooling for children (If we take the unlikely view that the purpose of schools is teaching things)? That which increases their ability the fastest, which is to say, the most difficult knowledge, the fastest speed of teaching that they can possibly cope with. The maximum trajectory that they can sustain without losing the grip or their interest in the subject.

Should I do the same in life, then? Probably, but it gets tricky, because life experiences that promise to teach me a lot are often unfamiliar, or dangerous, or otherwise involve pain. As we have seen, it is not the case that pain equals learning, but pain can be strongly correlated with learning. To be more precise: if I become crippled in a car crash, or by cutting off my hand, it is because I received stimuli from directions and with intensities that I could not withstand. Provoke me at a slowly building rate, and I will learn to deal with the provocations and perhaps bite back. Provoke me really hard and really fast from the start, and I will die. And then there are provocation vectors to which individuals cannot adapt in a single generation, for instance, drowning. Species might adapt to this kind of threat over several generations. Is not life precisely that which adapts to changing circumstances, potentials and provocations, in particular potential threats or benefits? But intelligent animals, like humans, are a special form of life. We can select what experiences to undergo, and thus what training to receive. This is how we can consciously adapt in advance when we expect a difficult situation. (Young animals play in order to train themselves for adult behaviour, but this kind of training has been conditioned by evolution over many generations. Are there any animals that train selectively to face threats that they have identified during the same generation, like humans do?)

If I identify the maximum “provocation rate” that I am able to withstand concerning a particular skill, another problem I would want to solve is: do skills compete? If I learn Arabic very well, will it downgrade my Russian? If I become a marathon runner, will it disrupt my ballet dancing ability? When a skill involves a particular conditioning of the body and the muscles, it is probably easy to see that some skills conflict. When they involve a conditioning of the mind, it is less obvious. Is the mind flexible enough to support radically opposed skills and viewpoints at the same time? Is this property the same or different for different people?
Questions that lead to more questions.

Resisting circumstances

Friedrich Nietzsche famously said that “what does not kill me, makes me stronger.” While true in some ways, this statement appears to be a generalisation masking a more complex truth. For instance, cutting off one’s hand does not kill one, but hardly makes one stronger, unless one specifically desired greatly improved dexterity of the other hand, even at a very high cost.

It is a fact that we cannot predict all the circumstances that we will find ourselves in throughout our lives. So we cannot predict what skills or strengths we will need either. Any one who has some kind of ambition in life has no way of establishing completely beyond doubt that their ambition will come true. They can only work towards reducing uncertainty.

At this point a number of different attitudes emerge. One could take the view that “Life is nothing but suffering. We must learn to cope with it.” Subsequently one could teach that suffering is a thing in the mind, and that training the mind to absorb suffering without feeling pain or becoming upset is our best hope. Either that, or reduce the ambitions so as to be frustrated less often. The goal of this ambition reduction is zero ambition, zero desires and zero expectations. With this mindset, you can never be let down. Nullified resistance, maximum fluidity.

Another view: life presents us with challenges, some of which we may overcome, some of which it is pointless to even try overcoming. A “pragmatist” view that tries to establish a middle ground. Some suffering is worth resisting, some is too much. People taking this view have some degree of resistance, but also a breaking point at which they would accept that “life is hard” and bend according to the circumstances of fate. Maybe they would also be opportunist and take their chances for easy gains when they can, to get revenge on life.

And finally, let’s look at the other extreme view. Nietzsche also said, perhaps slightly less famously, that “only to the extent that man has resisted, has he lived.” If I take this view, that I should resist adverse circumstances maximally and have my way in life, I must handle the problem mentioned at the beginning of this post — I cannot predict the circumstances that will befall me. No matter how strong I am, it is likely that there will be some set of circumstances that might destroy my aims completely, and me in the process. But let’s say that I take the view that some outcomes are less likely than others. I buy into some form of probability, for instance I think that five dice are less likely to all have the number four facing up than they are to not end up in this configuration. What choices should I make to maximise my ability to resist, given that some choices actually do make me stronger?

Gregorian misery

The Gregorian calendar has been in use since 1582. Among its features is a moderately complicated rule for leap years: if n mod 4 is 0, then n is a leap year. However, if n mod 100 is 0, then n is not a leap year, unless n is a multiple of 400.

In addition, we live in a world with timezones and regional differences in when countries go on and off daylight savings time, if they have such a system. As yet another example of Japanese rationality, Japan does not have a DST system.

Implementing date and time computations correctly can be very hard for computer programmers and is invariably a source of many hidden bugs that may take a long time to discover. Yesterday, a large amount of Sony’s Playstation 3 game consoles stopped working normally.  This was later fixed. There was speculation the error was due to incorrect leap year handling. It wouldn’t be the first time this occurred if this was indeed the reason.

In a software company where I used to work, there would usually be massive troubles every time some country went on or off daylight savings time, or any other time calculation hit a sensitive spot. I’m fairly sure that the world’s software systems, including government, finance, insurance, health care, suffer untold billions of damage every year due to the complexity of the system. Maybe we should simplify it.

I suggest having “years” with 365 x 4 + 1 = 1461 days instead of the usual year for starters. This would move the leap year problem ahead until year 2100, when the next special rule comes in. By that time, software engineering technology should have improved enough that this should no longer be an issue, I hope. If not, we can invent another system by then. Let’s also scrap all daylight savings time everywhere. It’s easy to do and the savings would be huge.

Making playtime useful with color filling games

Flood-it, a color filling game. This version was made by Lab Pixies for the iPhone, but many others exist.

Flood-it, a color filling game. This version was made by Lab Pixies for the iPhone, but many others exist.

There’s a veritable torrent of little games constantly being released for the iPhone. One of the more likable ones is Flood-It, which I’ve been playing recently. The premise is extremely simple: you start off with a grid divided into squares of different, randomized colors. You are given a tool that works a bit like the bucket fill in a picture editor. At each turn, the player chooses a color to fill the grid with, starting from the upper left corner. The monochromatic area slowly grows, and the aim is to fill the entire grid with a single color within a limited number of turns.

A recent analysis showed that finding an optimal solution to games like Flood-It is a NP-hard problem. In addition, deciding whether the game can be solved in n steps for some n is NP-complete. The analysis relies on a reduction of Flood-It to an instance of the SCS problem (shortest common superstring). (It’s important to note that what is NP-complete is deciding whether a particular board can be solved in a certain number of steps, not solving the game with a bounded number of steps. This can be done in polynomial time.) For those who need a summary, ACM Communications had an excellent review of the state of the P/NP problem in September last year.

For a NP-hard problem H, there exists a polynomial time reduction of any problem in NP to H, meaning that if we can solve H in P-time, we can solve any problem in NP in P-time. Many optimization problems in society rely on approximate solutions to difficult problems: routing traffic, assembling DNA sequences from partial subsequences, mathematical theorem proving… On the hypothesis that evolution has turned people into efficient solvers of hard problems (i.e. we have good heuristics in our brains from birth and from experience), we ought to pay people to play these games on their phones, but map real problems into game instances, so that people effectively work while they’re playing. We ought to design games that act as front-ends for real combinatorial problems.

A computer game, as we understand it, can be defined as a very smooth learning curve, and if we only “play” very tricky instances of combinatorial problems, the game would probably present too much of a barrier to new players. So maybe the best way of executing this kind of scheme would be that a majority of all game instances do not represent real problems, but mere training or verification of already solved problems — but every once in a while, a real problem pops up. The player should still get paid though.

A double benefit would be blurring the line between work time and  play time, what is useful and what is useless — I think this line is often artificially constructed. Has technology ever before given us the possibility to literally turn work into play?

Acknowledgements. I am indebted to Christian Sommer for showing me the complexity analysis of Flood-it.

The Flood-It game, easy difficulty setting, with the player having made some progress.

The Flood-It game, easy difficulty setting, with the player having made some progress.