Artificial Intelligence inspired methods for the allocation of common goods and services
Artificial Intelligence inspired methods for the allocation of common goods and services
Samothrakis, Spyridon
2021-09-29 00:00:00
The debate over the optimal way of allocating societal surplus (i.e. products and services) has been raging, in one form or another, practically forever; following the collapse of the a1111111111 Soviet Union in 1991, the market has taken the lead vs the public sector to do this. Working a1111111111 within the tradition of Marx, Leontief, Beer and Cockshott, we propose what we deem an a1111111111 automated planning system that aims to operate on unit level (e.g., factories and citizens), a1111111111 rather than on aggregate demand and sectors. We explain why it is both a viable and desir- a1111111111 able alternative to current market conditions and position our solution within current societal structures. Our experiments show that it would be trivial to plan for up to 50K industrial goods and 5K final goods in commodity hardware. Our approach bridges the gap between traditional planning methods and modern AI planning, opening up venues for further OPENACCESS research. Citation: Samothrakis S (2021) Artificial Intelligence inspired methods for the allocation of common goods and services. PLoS ONE 16(9): e0257399. https://doi.org/10.1371/journal. pone.0257399 Editor: J E. Trinidad Segovia, University of Almeria, 1 Introduction SPAIN The historical experience of the late 20th century brought the market to the forefront of socie- Received: March 16, 2021 tal organisation. A sequence of events, which includes the collapse of the Soviet Union, the lib- Accepted: August 31, 2021 eral turns in the UK and US and China’s turn to the market under Deng Xioping, made it clear that all policy (if any) was to be enacted through markets. The “calculation debate” [1, 2], Published: September 29, 2021 an open discussion about central (economic) planning vs markets, was resolved; if humanity Copyright:© 2021 Spyridon Samothrakis. This is was to prosper, the state would have to exercise (at best) a very limited control over market an open access article distributed under the terms mechanisms. The demise of economic planning took with it the utopia imperative; grand, state of the Creative Commons Attribution License, which permits unrestricted use, distribution, and sponsored, schemes to improve the human condition were judged as inherently flawed [3], reproduction in any medium, provided the original resulting in more pain than anything, so they were better avoided. This backlash was not author and source are credited. completely unjustified; planning, as a technical term, refers to a process where a machine/ Data Availability Statement: All code and group of people spends time “thinking” really hard about the feature and identifies a sequence instructions on how to run it are here: https:// of actions that would lead to long term “happyness”. Once this sequence of actions is discov- github.com/ssamot/socialist_planning. ered, it is executed in the real world. In terms of economics, the actions can be conceptualised Funding: The author(s) received no specific as what, when, how etc. to produce goods and services. Without the use of computers and funding for this work. smart algorithms, the shortcuts one would need to take are simply too crude, and along with certain political imperatives, resulted in serious economic problems [4]. At the very same time Competing interests: The authors have declared that no competing interests exist. that in economic sciences planning was ostracised, in Artificial Intelligence (AI) planning PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 1 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services (using a similar framework as economic planning, but different substrates) saw a tremendous renaissance, following the wider upheaval of the whole field. We can now create super-human game (e.g. chess, go) players in artificial environments using a variety of planning methods [5]. With the collapse of state volition for economic planning, it is no surprise that research in alternatives (or partial alternatives) to the market remained very limited in scope. In this paper, we revisit one such alternative paradigm of societal distribution, whose invention (or inspiration) goes back quite some time [6–8]. We will provide a base for removing certain products from market circulation and provision them directly to citizens. The calculation of using products and services directly is generally called “planning in natura”[9], and has direct links to Universal Basic Services. The goal of planning methods is to remove the anarchy (and uncertainty) of production and provide citizens with consumption guarantees. Contrary to most of the authors we cite, our ambitions are somewhat social-democratic. We do not aim to replace the market, but instead focus on removing human reproduction from strictly ideologi- cal mechanisms. In fact, a conservative government not “tied” to market ideology could easily start implementing such a programme. The goal of our specific programme is to match citi- zens and production units directly while monitoring the plan as closely as possible—in order to take corrective action—on a daily basis. Plan goals are to be formed using data collected from production units and citizens. We are not aware of any methods that attempt to plan pro- duction on the individual level, nor has there ever been an automated way to monitor the plan or amend it using data—though other efforts point to similar direction [10, 11]. Conceptually, our major contribution is a direct link between AI planning (i.e. MDPs) and traditional input- output tables, thus allowing to bring forth the power of modern AI methods to traditional eco- nomic planning problems. The closest a quasi-automated system of planning that reached an (partial) operational level was Project Cybersyn [12], but this was dismantled in a hurry follow- ing Pinochet’s coup. Within the Soviet Union there is evidence that planning from final demand was seen as a “bourgeois” [13] and was never allowed, leaving production planning to the level of industrial goods (e.g., steel). The insistence to create plans and the focus of soviet economy to “build machines that build machines” might have contributed to the grim life of the soviet citizens in terms of consumer products. Prior to the late 1970s, when the demise of USSR became evident, some form of planning was always accepted within capitalist societies [14]. Japanese economists were effectively trained in planning by explicitly going through the works of Marx [15] until the late 80s. The rest of the paper is organised as follows; in Section 2 we provide a generic discussion on the background and debate between economic planning and market economics, but also nudge at the link between economic planning, reinforcement learning and AI planning. Sec- tion 3 introduces a new model, which we term Open Loop In Natura Economic Planning. In Section 4 we discuss data collection issues—and generally re-think the problem from the point of view of individual production units and citizens, while in Section 5 we perform a series of simulations. We discuss limitations in Section 6; we conclude with a short discussion in Sec- tion 7. 2 Background 2.1 The state and social democracy Following the second world war, a large effort to direct the output of national economies was set in motion. Social democratic and labour parties, reinvigorated in popularity by the horrors of war, set ambitious programmes of state provision, commonly referred to as “democratic economic planning”. To quote Sir Stafford Cripps, in his position as the UK’s Chancellor of Exchequer, who, when discussing democratic planning claimed that [16] “. . .we are out after PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 2 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services something a great deal more important than a good piece of planning machinery or even than a particular way of organising our industries and services. Our aim is to create a Happy Country in which there is equality of opportunity. . .”. A set of industries was nationalised (including the banks, coal, telecommunications, gas, electricity, public health etc)—for the case of the UK see [17]. This was roughly the consensus, respected by conservative governments worldwide, that most of the world has followed until almost the 1980s. From that point onward we see a rever- sal of the state intervention trend and widespread privatisation. Though there is still a debate as to why this happened, from the electoral perspective one can observe the collapse of social democratic parties owing to the breaking down of the electoral coalitions between liberal ele- ments and the working class (see [18] for a thorough discussion). The reversal of the trend brought widespread privatisation and the re-introduction of the market. This process of “re- marketisation” went by different speeds in different countries and different economic sectors, but arguably the process is still ongoing. Even when certain services are still nominally free at the point of use (mostly in healthcare), the vast majority of utilities (including education) is slowly moving to fee-paying models and internal markets. The victory of the market is so abso- lute that certain authors complain in the popular imagination: “it is easier to envision the end of the world than the end of capitalism” [19]. 2.2 Socialist planning in actually existing socialism While capitalist counties were moving away from the social-democratic model, the end of his- torically existing socialism lead to the introduction of “shock therapies”[20] and widespread, fast, privatisation, with at the very least questionable results. When privatisation did take a more structured form, as in the case of China, state planning was replaced due to associations with poverty. Quoting [21]“. . .one of our shortcomings after the founding of the People’s Repub- lic was that we didn’t pay enough attention to developing the productive forces. Socialism means eliminating poverty. Pauperism is not socialism, still less communism.” The state took a back sit into acting as planner and started using financial means to measure (and drive) success. Fiver- year plans no longer meant exact outputs, but rather strategic visions [22], with specific GDP per capita’s aims, akin to industrial strategies elsewhere. This failure of planning, can, at least partially, be attributed to practical factors. Computers and algorithms of the scale required to plan effectively did not exist a the time, and when the first thoughts of such projects where entertained (e.g. see [23]) they were not supported adequately. Indeed, if there is anything to be said is that it is almost a miracle that any form of state planning was attempted given the means available. 2.3 Why planning? Von Mises and Hayek [1], writing in the height of socialist revolutions, started putting together a critique of socialism, and more specifically (economic) planning. Parts of their critique (and this of their successors) sound still valid—for example same of their points on Marx’s treat- ment of skilled vs unskilled labour. Here we will concentrate on the arguments of planning using products and services (i.e. 10 kilos of rice, 20 pounds of flesh, 10 hours of electric supply) vs a market price allocation mechanism. Whether an optimal (automated or not) planner of such type could even exist is termed the calculation debate. Arguments against the existence of an optimal planning mechanism fall into different camps, with some being aligned to moral questions (“it is unfair to just allocate goods” or “it is undemocratic”), computational (“you can’t compute the intermediate goods to produce”) or epistemic (“there is no way for the plan- ner to know what to produce”). We will not discuss the democratic issue in this paper, though we strongly feel that the market is exceptionally undemocratic. It is now accepted by even the PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 3 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services opponents of planning that computation should not be an issue [24]. The epistemic argument, which is still very valid, entails that an optimal planner would not know what to compute. A price mechanism would allow whoever is engaged with the market to express their preferences of goods in terms of how much they would be willing to pay, i.e. a very subjective preference function. Prices that (for producers) might, for example, depend on the availability of goods [25]. In its extreme this holds true for consumers, as we have seen examples of iPad-for-kidney selling [26], though we think it is safe to class such behaviours as pathological. If one makes the assumption of truly subjective values that vary continuously and are also widely different from person to person, then indeed a market might be able to allocate surpluses somewhat better than a plan. However, if you do accept that the majority of the population shares some similar preference function, at least in their top priorities (e.g. food, shelter, basic communication devices, electricity, health), the argument is nonsensical and applies only to incorporeal beings. Insofar as there are relatively slow changing patterns in consumption, standard machine learn- ing models, combined with one’s own predictions can be used to forecast demand. 2.4 Why not alternative forms of market organisation? A popular counterargument against planning is one of efficiency, quite often expressed in macro-economic aggregates (e.g. GDP growth, the gini coefficient). These tend to hide vast complexities of the underlying tendencies of the system. In the game-theoretic literature (which is closely aligned to economic models), different notions of where a system should equilibrate in terms of specific agent rewards have been explored and unpacked. In effect, these try to predict where a large population of agents would end up, if left to explore and learn freely, given imposed game rules. For example, [27] provide four types of correlated equ- libria: utilitarian (which maximise the sum of rewards for all agents), plutocratic (which maxi- mise the maximum reward for all agents), dictatorial (which maximise the maximum reward of a specific agent) and egalitarian (which maximise the minimum reward for all agents). Instead of planning, the state could play the role of “traffic lights”, and try to stabilise the whole system by favouring certain equilbria. Arguably, and almost by definition, once a system stabilises to one set of equilibria it is hard for it to move another, as unilateral movement by any agent would is strongly disincentivised. Historically, examples like anti-monopoly laws, taxation, demurrage and the welfare state point to a countermovement towards plutocratic and dictatorial equilibria, as it looks like markets tend to generate pareto distributions [28], i.e. very few individuals tend to accumulate overwhelmingly. Monopolies, as explained by their proponents [29] allow for both innovation and “concentrated application of force”, something that would not be feasible if one a business is surviving day-to-day due to heavy taxation and competition. A modern version of planning should not be seen as a fully centralised top- down-controlled structure, but rather as a game that has egalitarianism baked in and not as an afterthought; alternatively one can see the whole edifice as a decentralised democratic monopoly. 2.5 Input-output economics and planning The problem of planning has been formally defined in [30]. Per unit of time t, a set of demands d for certain goods (e.g, products, services) are to be satisfied for c citizens. The planner’s goal is to satisfy the demand of each citizen. In AI terms, we have something akin to a Markov Deci- sion Process (MDP), with an agent (the planner) receiving information (the state) on the plan and a set of rewards related as to how closely the demand is met. The parent of modern mechanisms for planning (in this context) is what is termed the input-output model, which is thoroughly reviewed by [31]. The model comprises of an nxn PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 4 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services Matrix A of technical coefficients, a vector x of production level (i.e. how much we should pro- duce for each product) and a demand vector d. The columns of the coefficient matrix concep- tually ask the question “how many units of each good to produce a single good of the type portrayed in this column do we need?”. The dot product of each row with the technical coeffi- cients represents the consumption of a specific good. The demand vector d represents how much external demand there is, i.e. that Eq 1 holds: x ¼ a x þ a x þ . . .þ a x þ d ð1Þ i i1 1 i2 2 in n i In matrix notation, we have Eq 2: x ¼ Axþ d ) ðI AÞx ¼ d ð2Þ Something to note here is that traditional input-output models have no notion of time— all production is taking place within the same temporal unit. This is somewhat counterintui- tive (and problematic for actual planning), but it allows a first easy approximation. It is the model proposed by [32], covered by [33] and, with further additions (based on linear opti- misation) discussed in [9]. Very similar concepts, without a specific target but with the goal of directly maximising output are also discussion by in [23]. With no time element, the model remains suitable for very high level strategic planning—and indeed such models are widely used currently (e.g. most states publish input-output tables using monetary prices). There is also very widespread literature on input-output models, but not with state planning in mind. 3 Open Loop In Natura Economic Planning Our method (Open Loop In Natura Economic Planning—OLIN-EP) builds upon the basic input-output framework. It creates a fundamentally different planning landscape than IO tables and is heavily inspired by current game playing / RL agents. The planning “tick” is no longer a year, but a day, and we expect the plan to be re-calculated based on observations and predictions every night. We no longer operate on abstract notions of aggregate demand, but instead we expect every individual to communicate their demands and projected demands daily. We also expect the productive units to recalculate their input-output coefficients (which we will callIO-coeffs—the values of the matrix A) and provide them for plan updates on a daily basis in the form of a function—more on this later. Closing, we maintain a notion of state that is missing from all original formulations. More formally, we operate on an MDP [34] that has the following characteristics: • Actions x 2 A capture what the production methods, investment profiles and generally actions that a planner can take to help maximise reward. • States s2 S capture sufficient statistics of what we want to operate on, as transmitted every morning by production units and citizens. In our case, s is simply a goods inventory. • The transition function T(s |s, a) is formally unknown to us, but it is captured partially by the input-output matrix, partially by the semantics we give to the behaviour of different out- puts of the matrix, and it operates on the inventory and externalities. • The reward function denotes how happy the planner is in a state and is generally encoded as R(s, a). We define later a specific reward function that captures how well the plan targets are met and what damage the plan causes to the world. • There is a discount factorγ, which attenuates closer vs further rewards. PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 5 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services Classic input-output tables are more akin to a Markov Reward Process (MRP), an MDP with no actions. There are no decisions to make; one finds out where the process converges (i.e. how much to produce for each type of good) and tells the industry to produce it. In con- trast, we aspire to optimise for production methods, investment etc. The link between MRPs and input-output tables might be not immediately apparent; it stems from a certain method of monte carlo matrix inversions [35] for solving systems of linear equations. Eq 2 can be directly mapped to an MRP, while the addition of production decision (how much to invest, when to invest, what production methods to use) links to MDPs. The extra semantics above add to this framework. We will follow a much simpler (and arguably more inefficient route) in this paper, without converting to an MDP explicitly; for a discussion of the limitations this causes see Sec- tion 6. One can obviously claim that economic planning is more akin to a partially observable MDP (i.e. a POMDP), and this might be true, but unless one is to have the functions that describe the uncertainty over states, there is no reason to do the modelling this way. We could also start acting on histories of states and include externalities and rewards [36], but this might prove computationally infeasible. Claims could also be made that there is strong multi-agent element for the planner—here we assume that everyone involved in the plan has it in their best interest to cooperate. 3.1 The model We adapt a number of innovations to the standard input-output models, by changing the way we position the plan within the economy. As discussed before, the goal of an input-output matrix is to plan for demand at the end of a time period. Since our goal is to provide necessities to sustain humans, we set all “external” demand to zero, and introduce a set of profiles com- bined with the number of citizens attached to each profile. You can see an example in Table 1. Our input-output matrix describes the interactions between consumption profiles, a set of industrial goods, and a set of final goods. Profiles are columns that describe the allocation of final goods to each citizen that has been assigned this specific profile. 3.2 Nonlinearities and learning The plan formulation we described above inherits a number of limitations from the standard input-output model; the first one we will build upon is model linearity. The default model lin- earity is tremendously problematic—for example there is the implicit assumption which is that labour needs will scale linearly with production demands. To address these issues, a Table 1. Our example input-output matrix, for a society of 1300 citizens. Two of theIO-coeffs vary with production levels—as there are three production units (see Fig 1)—the rest are constant. Labour columns are omitted, as all values are zero. There is one industrial goodButter churn and two final goods (Milk andButter). Demand now just signifies the number of individuals in each profile. Lb is short form for Labour and Prof for profile. Type Milk Butter churn Butter Prof 0 Prof 1 Prof Population Milk 0.001 f (x ) 2.000 3.0 2.0 0 01 0 Butter churn 0.000 0.000 f (x ) 0.0 0.0 0 12 1 Butter 0.000 0.000 0.000 0.1 0.2 0 Lb(Milk) 0.001 0.000 0.000 0.0 0.0 0 Lb(Butter churn) 0.000 0.012 0.000 0.0 0.0 0 Lb(Butter) 0.000 0.000 0.001 0.0 0.0 0 Profile 0 0.000 0.000 0.000 0.0 0.0 800 Profile 1 0.000 0.000 0.000 0.0 0.0 500 https://doi.org/10.1371/journal.pone.0257399.t001 PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 6 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services Fig 1. f (x ) and f (x ) derivation from production outputs. There are three fictional production units that follow very 01 0 12 1 different curves in their models. (a) An example of how many units of Milk and Butter churn are needed to create units Butter and Butter churn units as portrayed in the y axis, i.e. f (x )x . (b) The derivation of quantities from the left to forms ij i i that we can put in the matrix, i.e. f (x ). ij i https://doi.org/10.1371/journal.pone.0257399.g001 PLOS ONE | https://doi.org/10.1371/journal.pone.0257399 September 29, 2021 7 / 16 PLOS ONE Artificial Intelligence inspired methods for the allocation of common goods and services generalisation of the input-output model [30, 37] looks as in Eq 3: ðI FðxÞÞx ¼ d ð3Þ This is profoundly liberating as a proposition, as we can stack production units and have differentIO-coeffs values as production scales. We can also extract from individual citi- zens how important hitting certain targets in their profile is. Solving for x now becomes a bit harder, as F(x) could potentially be any function, but in our case, we constrain it to a specific matrix. Remember that individual columns in the IO matrix represent how much it takes to produce a single unit of output—it makes sense to define the matrix as in Eq 4 2 3 f ðx Þ f ðx Þ ��� f ðx Þ 00 0 01 0 0n 0 6 7 6 f ðx Þ f ðx Þ ��� f ðx Þ7 10 1 11 1 1n 1 6 7 FðxÞ ¼ ð4Þ 6 7 . . . . 6 7 . . . . . . . . 4 5 f ðx Þ f ðx Þ ��� f ðx Þ n0 n n1 n nn n Constraining our function to this form has one important benefit; we can ask production units directly how many other goods they need in order to produce certain output units, and data scientists in these facilities can use any machine learning method to “fit” a curve and pro- vide back a function. When it comes to the actual solution, one can attempt to use the gradient directly. The mean squared error MSE((I − F(x))x, d) has a gradient that isrMSE((I − F(x))x, d) = 1/n((I − F(x))x − d)(I − F(x) − F (x)x), which means that we can solve using any non-linear least squares algorithm—or in fact any other non-linear optimisation algorithm. Another method (that comes from [30]) is to go through the power series expansion 1 1 i 2 ðI AÞ ¼ A ¼ I þ Aþ A þ . . .. We can then define x = F(x )x + d, x = d—a (i+1) (i) (i) (0) i¼0 recursive form of calculating x. This is what we are going to use in this paper, as it is based purely on linear solvers, and will find the global maximum as long as convexity is maintained. We could also attempt an end-to-end neural network solution (it is very easy to envision), but there are no (clear) advantages, unless a need arises to model exceptionally complexIO- coeffs while optimising production at the same time, something we are not doing in this paper. 3.3 Time and the transition function When it comes to producing goods and services, a model without a time element is severely limited; real production and consumption obviously have a time dimension. In the case of pro- duction, this is expressed in various forms like gestation times, production times, business inventories and depletion of resources. Multiple input-output models that include a time ele- ment have been developed [38–40]—for an overview, see [41]. An example of such a model, P P n n from [38] is xðtÞ ¼ ½A ð