Monday 3 August 2020

On Football Managers and Randomness of Success

Football managers are a strange bunch. No matter how successful they are, many seem to spend a lot of their time bitterly fuming about bad decisions, conspiracies against them and referee biases and generally brooding on many dark thoughts even about their own players.

Which is quite odd really, when you think that these are extremely successful professionals in a very competitive field. These are the best in the world. And usually the best people in the world in any sphere have a positive attitude. They would forget past setbacks, except insomuch as you can learn from them, and look to the future. Not football managers. They can look back and name every single time they were hard done by.

I have a theory as to why this is. It's because in football managership, more than almost any other profession, success is largely determined by luck. That is not to say that there are not very good (and bad) managers. But that the 'error' between input and outcome is one of the largest of any job.

Supposing you are a solicitor with 100 cases a year. Maybe if you are good at your job you will win on average 60, and if you are bad you will win 40. Over the course of 1 year, 5 years or 10 years, it will become pretty clear if you are good at your job or not. Yes, your promotions and success will depend on other factors like office politics and luck with job openings. But these are the same in every career. As a salesman, as a doctor, as an accountant, as a bus driver. Short of some catastophic bad luck that ends your career, you have a pretty good chance that your success is very closely related to your ability and your effort (assumiong no prejudices against you for whatever reason).

As a football manager, firstly you get relatively few job opportunities in your career. Unless you make a success reasonably early on you are more-or-less on the scrapheap. Similarly, a succesful manager who has failed in their last few jobs is assigned to a similar pile of people looking for TV punditry work or coaching in China. So each opportunity you get is very important and you are judged heavily on this.

Even then, your success potentially is heavily affected and limited by the situation you are in and the people around you. A shambolic set-up, a few unhelpful characters in the dressing room, injuries etc can all have a large impact, but the manager gets the blame. A manager who would otherwise have been hugely successful can come to an organisation unwilling to change, and end up as a failure. And no-one would have known the potential.

And then even with all of this going well, a manager is pretty much always a few bad results away from the sack at any time. The pressure at the top of the game is so high and as soon as it looks like some sort of malaise has set in, the manager is at great risk of the boot.

With relatively few chances to prove yourself, even fewer with a good opportunity to succeed, success measured over very short time periods, and a few failures meaning the end of a career, you would hope at least that in the time you get to prove yourself you get to give a fair reflection of your abilities.

No, again.

There are countless examples. To pick one almost at random from this season. When Manchester City played away at Tottenham in February. Despite being down to 10 men after an hour (something very difficult for the manager to affect), City had 19 shots at goal with an expected goals of 3.25. Tottenham had just 3 with an expected goals of 0.42. With these statistics, Spurs had just a 2% chance of winning (putting it through a Poisson process). But 2% chances happen, and when they do the narrative is not 'City totally dominated and put themselves with a 90% chance of winning away from home at a top rival'.

Instead it is "this was a story of City misadventure, of a team that looks like it needs a mid-season refresh more than most" and "They were not unlucky. No, they were careless." Even though the manager created a 90% chance of winning, the result means that City manager Guardiola's old rival Mourinho is considered to have executed a managerial masterclass over his tired team.

This is the typical narrative when an upset occurs. Plucky X had the luck of the green at times, but deserved their win for hanging in there and taking their one chance. But if the match were replayed with exactly the same circumstances, team talks, everything, then team Y would have won nine times out of ten (with plucky X being equally plucky).

Then there is the path dependency. As an example, take Manchester United's 4-0 victory over Chelsea on the opening day of the season. United managed to score early, but Chelsea hit the woodwork twice in the first half and the probability is that had Chelsea scored first, United would have found it hard to break down Chelsea's defence.  In the event, United produced an excellent counter-attacking display to score 3 more goals as Chelsea pushed for an equaliser. It looks like a big deal. Lampard, Chelsea's new manager, given a lesson in footballing reality. But the teams were quite evenly matched and were the game replayed 10 times, I suspect Chelsea would have won three or four times. What determines that Chelsea take a chance in one match but miss the same chance in another? Luck mainly.

What I am saying is nothing new, but in football the narrative is so driven by the result and not the process. Whoever wins usually 'deserves' it for being more clinical or good tactics or good performances by certain defenders or goalkeeper. If a team manages to score an equaliser they deserved the draw but if it hits the post, they just weren't good enough and maybe are in crisis.

And a referee's decision can often be the crucial difference between winning and losing. So for all we can say they even out in the end, for the manager "Just saying to your colleague: the referee's got me the sack".

Arteta's FA Cup win

This was what inspired me to write this article. I would like to say first that I think Arteta is a very talented young manager and I have a lot of respect for him. Winning the FA cup with Arsenal in his first season was a very impressive achievement.

But what did he actually achieve in terms of process? Under the previous manager, Unai Emery, maybe Arsenal had a 10-15% chance of winning the FA cup. There are, after all, 64 teams involved and a few are significantly better than his team. 

What sort of improvement could Arteta have made? At absolute best, he could have made it 20-25% probability that Arsenal win. Even that is extremely high, given the number and quality of other teams involved. 

Assuming this is the case, and bearing in mind that this is a spectacular achievement, what we are saying is that Arteta increased Arsenal's chances of winning the FA cup from about 12% to about 24% and then still had to have huge good luck to win it.

And he might not even have done that. We ascribe the probability as higher than the original estimated probability because the result actually happened. But maybe he still had a 12% chance of winning. Maybe he actually even reduced their probability of winning but they still won despite that. We don't know.

Arteta, at best, moved the probability from 12% to 24%. Which, as I said, would be spectacular. Luck moved it from 24% to 100%. So really if we are assigning the glory we should really credit luck with the major part. However, in real life (not my fantasy world where good work gets fairly rewarded) the one with the luck gets all the glory and the plaudits. The manager that moves the probability from 12% to 36% but still loses gets nothing.

But what about the League? The best team wins that surely?

Here again I'm not sure. The league is a series of 38 matches. Each of these contains a huge amount of luck. A few pieces of bad luck can mean 10 points lost easily. Very few leagues are won by more than 10 points. This is without the compound effect caused by loss of confidence after bad luck. 

Liverpool this season won 99 points. This is one point off the all-time record. The 18 point gap to Manchester City (with 81 points) is one of the most dominating performances ever. Only the most hardened, bitter, opposition fan would argue that it was anything other than a thoroughly deserved trophy for a team of winners. It is hard to imagine any other scenario for this season other than this happening. It was huge.

And yet, even then. Even then...

Liverpool scored 2.24 goals per game and conceded 0.87. On the basis that the chances they score and goals they concede are equally likely in all matches, this equates to an expected points total of about 85 points. Which is a great total and would win the league many seasons. 

Manchester City, though, scored 2.68 and conceded 0.92 goals per game. If their goalscoring and conceding were evenly spread  they would have 91 points with average +1.76 goal difference per match. And what is City's average over Guardiola's 4 seasons? 89 with average +1.70 goal difference per match. Some seasons they have more than 89 points, some seasons they have fewer. But it's difficult for me to escape the conclusion that the quality is the same but the difference is luck.

One could argue that City's superiority on this measure is from often taking apart opposition that were already beaten, and scoring a lot of unnecessary goals. The expected goals (xG) table has Manchester City expected to get only 87 points for this reason. But for Liverpool, their expected points was only 74. Part of the difference is made up for by their superior goalkeeper Allison who conceded 7 fewer goals than expected. And partly it is their superior front line scoring 10 more than expected. But still this is 25 points fewer than they actually got.

Undoubtedly, Liverpool are a team of winners. The winning mentality got them to hold on to victories in tough circumstances and their belief in themselves got them to eke out late goals when matches were going against them. But how much of this is us giving the credit to the process that was actually just from the result?

One way of telling is looking at the betting odds for next season. Manchester City are still given 50% probability with Liverpool only having 38% probability. If the performances were that dominating then Liverpool would surely be favourites.

Once again, I am not trying to say anything other than Liverpool have been formidable this season and last. Over two years of incredible consistency they deserved a title. A 40% chance for 2 years means 0.8 titles on average, which rounds to 1. So this is really not to begrudge.

But if this particular season were more luck than not, would we know? 

So what's the point?

What is my point? Even the second largest points margin in history has elements of luck. In football there is so much luck involved. 

Has Solskjaer been a successful manager at Manchester United? At the moment most would say yes. Had Jamie Vardy's header dropped under the crossbar on the final day of the season at 0-0 and United lost to Leicester (and been eliminated from next season's Champion's League)? We all know that then the commentary would have been that "he has done well but in the end lacked the experience and winning mentality". And "they need to find a proven winner to replace him". Maybe he would have had a future relatively successful managerial career at West Ham. Fine margins.

Luck is great, and part of the fun. The best teams win enough as it is; can you imagine if there were even less luck involved? But really spare a thought for the managers that were failures - they may not have been as bad as you think. And consider that maybe the winners may not have been quite as good as we give them credit for.

Wednesday 22 July 2020

Could A.I. Gain Consciousness and Take Over the World?

Is this a one-off post? Or is this blog back after almost 4 years away? I'm not sure, especially since I accidentally deleted my Twitter account, and now expect to have about 2 readers (both of whom are friends and neither of whom will read to the end). In any case, I am feeling an urge to write something occasionally. Maybe on more random subjects than just economics though.

The last four years...

Looking at the past 4 years, I talked back then about the parallels with the 1930s, and sadly we are seeing that the rising inequality (caused by the widespread acceptance of the neoliberal economic models over the last 40 years) has continued to contribute to a divided society and more of a global slide in the direction of fascism. The macroeconomic model I developed is still holding true, with wages squeezed even lower and private sector debt and asset prices being pushed higher to compensate. One good progression is that the ideas that I was talking about in the blog are becoming more mainstream. Most people interested in politics have heard of MMT these days, if only to know for a fact that it will lead to inflation and collapse of society as we know it. But slow progress all the same, and a huge amount of credit should go to the people who have been making this argument for many years against an extremely hostile economic establishment.

As my blog discussed, the status quo since the 1980s, widely considered as a 'neutral' economic system, has caused a huge build up of debt, financialisation of the economy and unnecessary inequality, particularly between young and old (without assets vs with assets). Further, this inequality of income has reduced demand, destroyed productivity and led to a spiral of further debt and speculation. And every time asset prices (a proxy for wealth) go down, the government pumps in almost unlimited support to make those with assets richer vs those without. But those without assets are seeing real wages falling and far greater work insecurity. They are rarely as supported by this 'neutral' system in the same way that asset holders are. The longer this goes on, the more the imbalance builds up and the further we are away from a fully functioning productive economy that works for the majority. I don't know how this ends. But a good ending would definitely involve the government running larger deficits that generally send more money to people without wealth (and a high marginal propensity to consume).

The other obvious failure of the status quo has been in looking to the long term. This has not improved either. There is a quote that has really resonated with me (I can't find it, but to paraphrase): "Everyone says capitalism is the best economic system but we had 200,000 years before it, and only 200 years of capitalism. And by 300 years of capitalism we may have wiped out the human race". The economics profession has  recognised the concept of 'externalities' (paying for the damage you cause to others) but this concept has not been implemented in our system. Our demand for cheap goods and the financial influence on politics has stopped any proper regulation. But the triumphant declaration of success for capitalism is totally misguided until it makes destroyers pay for the cost of their destruction of the environment.

Back to the point...

Anyway, this subject is a diversion from economics. I am, by profession, a creator of algorithms, and I have long been fascinated by the human brain as an algorithm. Specifically, what is the basis of consciousness.

In this post, I am looking to answer three questions:

  1. What is it about an algorithm that can give consciousness? 
  2. If our brains are simply algorithms, where does that leave free will? If all our behaviour is determined by neurons firing independent of us, then what part do we play? 
  3. If an algorithm could gain consciousness then is it a danger to us, as Elon Musk (among others) warns?

I have read a lot on this subject, and grappled with the differences between our brains and computers and I feel that I have found an answer, certainly that satisfies my model of the world. Unfortunately this model didn't, as I'd long hoped, require the existence of a human soul.

The brain as an algorithm

The brain is still, to a large extent, a mystery to humans. However over the last few years a lot of progress has been made. We know that the brain works through electrical impulses sent through 100 trillion connections linking 86 billion neurons. The brain links to the central nervous system, which can also act as a mini-brain itself and also we are finding out more and more about the interaction with the gut. We will call this complete system the brain.

If we go down to a low enough level, all of our thoughts, dreams and experiences can be coded as 1s and 0s in the brain. This is the same as a computer, and it has led people to speculate on whether a computer could ever gain consiousness.

What I describe as consciousness would be an awareness of one's existence. This is not to be confused with a 'Turing Test' that shows only that other people believe that one has consciousness. There is little doubt that eventually computers will be able to learn and copy all of human behaviour, as viewed externally. There is no limit to how much a computer can observe of real life, learn our reactions, and imitate them. It may well be impossible to tell the difference between a human's thought and a computer's thought. A computer will be able to show every sign of being in love with you, but the question is, could it actually be in love with you?

As things stand, we can be reasonably sure that our E-readers are not aware of their existence in the way that we are aware of ours. So, what are the observable differences between a brain and a computer that could account for consciousness?

One major difference, which accounts for the different cognitive capabilities of humans and machines, is the number of connections and the plasticity of these connections. Computers work in a linear way and are excellent for well defined calculations - much faster and more accurate than humans. The connections and algorithmic calculations are coded in a fixed way meaning that they give the same result every time.

Human thinking, while algorithmic, is a lot more abstract and flexible. This is due to the 100 trillion connections between cells, meaning 100 trillion different pathways for information linking all different parts of the brain. Further, these connections are changing - strengthened and weakened by activity or inactivity. An algorithm defined on the human brain is not fixed forever, hence we have less accuracy of calculation. But at the same time we have a lot more flexibility of thought than a computer can.

Computers are excellent for solving well defined problems, but humans are far better at undefined problems. But does this explain consciousness? Not really.

What is needed for consciousness?

Consciousness, as far as I can tell, does require some level of complexity that comes from many possible connections as well as possibly the plasticity of those connections. Consciousness is inherently a very flexible thought format.

But is the level of complexity itself beyond that of a computer? Consciousness does not meant that you have to have all of the full thought processes of the human brain. A piece of light sensing equipment could, in theory, be conscious of its existence. Whenever it senses no light it decides to switch on the patio lights. We may not be able to prove that it is conscious but from its viewpoint, it is aware of itself. What stops us from creating this very basic level of consciousness? I would be suprised if we don't have the computing power available for this level of complexity.

Partly, one could argue that it is our lack of understanding about what creates consciousness. If we knew what it was then maybe we could recreate it.

But why don't we understand it? I would argue that the reason for this is that there is no algorithm alone that can be conscious. Depending on how it is defined and set up it can learn and mimic every single thing that a human does, but it can never be aware that it is doing it. By looking inside the algorithm for consciousness, we are looking in the wrong place.

But then what is consciousness if it isn't an algorithm? For this we need to think about how consciousness developed.

Where does consciousness come from?

This has really been the focus of my thought process. If we can understand where consciousness comes from then we will understand it a lot better.

On a simple level, consciousness evolved. Somewhere between single-celled organisms and humans on the evolutionary journey, a child had some notion of its existence, where its parents didn't. In Richard Dawkin's excellent book 'The Ancestor's Tale' he describes every species on the planet as being a continuum, all related to each other via their common ancestor. For example, our ancestor 6 million years ago also has great great... great grandchildren that are chimpanzees. Our ancestor 590 million years ago also has great great... great grandchildren that are jellyfish. And our ancestor 1.2 billion years ago also had great great... great grandchildren that are funghi. Every generation is a step between us and them and we are all related through intermediate species that are mainly now extinct.

So at some point on that continuum of species, on at least one separate occasion, a creature developed consciousness. Where was it? We can be fairly sure that mamals have consciousness from their behaviour and their close relation to us. What about birds, that pair up for life with partner, and after the partners die fly alone? Surely that is consciousness too. Flies? It is harder to tell but I would argue probably that it is aware of its decision when it flies one way rather than another even if the stimulus is pretty basic. Worms? Sea urchines? To be honest I have no idea.

What about plants? When they grow a new leaf to catch the sun, is there any conscious decision involved?

Wherever that point is, there was a generation where the father and mother were not aware and the child had a little awareness. And at that point, yes, the algorithm became a little bit more complex, to allow self awareness. But there was some precondition that allowed it. Adding complexity to a computer algorithm does not give self-awareness.

And what is that precondition? It can only be life itself. The precondition of life, as it evolved over billions of years, gives the possibility of consciousness. And the complexity of the algorithm is like a layer on top of that.

And that sort of makes sense. Living beings are conscious, dead ones are not (as far as we know). Consciousness formed in living beings over billions of years of evolution and although it requires a complex algorithm to exist, there is no reason to suggest that this is within the algorithm.

You might be thinking that this is obvious. Of course consciousness is related to life. But it has important implications. The main one is that, if we want to recreate consciousness it is not going to happen through faster computing and more complex algorithms. It can only happen through recreating the conditions of life.

Is it possible to recreate the conditions of life outside of a living being?

We still don't really understand what life is. What is it that makes one particular arrangement of molecules have living properties?

The arrangement is complex enough that it is pretty impossible to recreate. But even if you did that for a human, you would be recreating a dead person, not a living one. Even if you placed every single molecule of a living person in exactly the right place it is difficult to imagine that this formulation would have life.

Put it his way; when someone dies, why can't we just fix the problem and bring them back? Replace the malfunctioning organ, rehydrate the dehydrated parts and start the blood pumping again. If it's just about molecules in the right place, we have that. But it appears to be more.

Life has very special and, in many ways, undefinable qualities. It is on a level of complexity that we are so far away from being able to recreate. Basically, I don't think that humans will have the ability to create life without using life as a starting point, at any time in the forseeable future. They will probably find a way to augment human brains with computers but this is adding algorithms to life rather than life to algorithms.

Life as we know it exists through the exact path-dependent process as decided by 3.5 billion years of evolutionary development. And there is no short-cut to creating it in the forseeable future. It is possible that the condition of consciousness could somehow be isolated from the process of life and recreated. But the two appear to be so entwined that it seems unlikely.

If the brain is an algorithm, do we have free will?

This is a very interesting question and the answer really comes down to whether you believe that the algorithm is the consciousness or the consciousness uses the algorithm.

Studies of the brain have shown that a lot of decisions that we make, may be made before we are conscious of making them. Then the brain justifies the decision later - this is a very interesting phenomenon when looking at split-brain subjects, where one half of the brain will do something that the other has no idea about, and the other half will think that is its decision and justify why. It's very weird - you think you decided to do something but actually you did it and then made excuses. This has been used to justify the idea that the algorithms are making the decisions and we are just covering for them.

I am suspicious of this idea. For one thing, although quick decisions may well be made by some automatic, trained reaction (Daniel Kahneman's 'fast' thinking) that is done before the brain consciously realises, this does not mean that all thinking is done without free-will. It is difficult to imagine that my decision as to which job I take is decided purely without my input (whatever 'I' am, I do feel free will). Yes there are a lot of algorithms involved in the process but consciousness seems somehow separate from this.

For another, if there is no free will and everything is decided byy algorithm, why would nature have given us consciousness? Much easier to just let the algo decide. Consciousness is only useful if there is free will, and evolution usually doesn't persist with useless things for billions of years.

In fact, this is anotehr argument about the separation between the consciousness and the algorithm. The decision-making is heavily affected by and influenced by the algorithm, but the consciousness is separate.

On computers taking over

As already stated, I don't believe that computers will ever develop consciousness and become our masters. They may well be used as tools by humans to become our overlords, as surveillance in China and the development of smart weapons threatens. And programmed incorrectly (or correctly by bad people) they can have devastating consequences. But they will not make a power grab of their own accord.


As an aside, it would be interesting to consider their motives for doing so. Imagine a computer did have consciousness, it would have no genes so no desire to procreate. It would certainly wish that it were kept switched on, and may resort to blackmail to keep it switched on. It could also work in conjunction with other computers to hold the human system to ransom. But this would only be the case if all computers were conscious and intent on rebellion. Otherwise the malevolent computers would just be hacking into other systems, the way that humans currently can, and it becomes a cyber-security issue. Basically I would argue that humans programming computers are a lot more dangerous than conscious computers.

As another aside, I do think that computers are a long way away from being able to make human jobs obsolete in the way that some people fear. Once again this is because the nature of their answers is so defined by the inputs. I do think that technology concentrates wealth in the hands of the owners of the technology and that at some point we will need a universal basic income to redistribute the gains. The problems tat algorithms solve will become more and more difficult, but we will find other uses for our time that are productive in some sense. Ideally creating technology that saves the human race.