# Urban substrates as computation

Machine Learning methods based on localised morphological metrics doubtlessly hold potential. However, a broader question remains: what is the role of machine learning as a theoretical tool? And, how compatible is it really with a complex systems perspective of cities? As is particularly evident for supervised deep neural networks, machine learning methods are capable of internalising complex dynamics but, for the same reasons, do not necessarily tell us much about what these dynamics are or how they might operate. In this sense, ML methods may ‘short-cut’ theoretical principles even if they still capture the complexities; at the same time, it could be argued that this is not necessarily a bad thing because neural networks don’t, by nature, ‘shoehorn’ or ‘dumb-down’ patterns and relationships as may be required for more conventional mathematical and computational models.

To briefly explore the potential ramifications of these questions, two dynamic toy-models are here proposed for the purpose of contrasting how a first-principles approach might differ from a machine learning approach, and how these might play-out in the case of simulating landuse dynamics at a granular scale. Both models are applied to road networks that have been parcelled into 20m segments and each of the intervening nodes is then assigned a population value and a landuse state. For the sake of simplicity, the populations are held steady throughout the experiments; however, landuse states are allowed to fluctuate between either no landuse or one of three landuses. Distances are calculated over the network and the models subsequently update landuse locations in response to surrounding population densities and landuse accessibilities.

While not strictly cellular automata (CA), the models follow several principles that strike at the underlying nature of CA. CA are generally attributed to John von Neumann, who, in considering the theoretical implications of ‘self-replicating robots’ crafted *The General and Logical Theory of Automata*^{1}; however, it would be an enigmatic figure, Nils Aall Baricelli, who would create amongst the most interesting early examples of CA. A somewhat eccentric figure (known for forfeiting his PhD out of a refusal to reduce the page count!), Baricelli was motivated to simulate the evolution of biological systems and was able to pursue this line of inquiry with few restraints due to being independently wealthy. With the blessing of Von Neumann, Baricelli was given access to one of the earliest computers at the Institute for Advanced Study in Princeton and proceeded to simulate evolution using ‘molecule shaped numbers’: in effect, casting the natural world and the conception of life itself as a chain of local computational events. The evolution of these theoretical life forms was represented as binary numbers that jostled and evolved over subsequent time-steps and which were then visualised by plotting — quite literally — the sequence of timesteps in binary numbers. The patterns revealed how local computational rules gave rise to emergent regimes that expressed homogenous or chaotic states and, under certain conditions, a dance between these^{2}^{|}^{3}^{|}^{4}. Over time, CA has provided fertile ground for theoretical experiments leading, for example, to Conway’s Game of Life and, ultimately, to Wolfram’s ‘A New Kind of Science’^{5} in which computation is proposed as the basis for scientific inquiry and the universe is fundamentally recast as simple distributed computational processes out of which all complexity arises.

Cellular Automata are useful because they embody a fundamentally ‘spatial’ form of computation with the important implication that the unfolding of simple local rules from multiple locales — in parallel — leads to complex emergent behaviour: CA thus allow potentially complex information processing to take root at an emergent level, thus superceding the apparent simplicity of the underlying local rules. It is this characteristic that makes CA well suited for exploring the nature of cities as computational substrates, leading to conceptual explorations^{6} that were, as computational advances permitted, increasingly followed by application to real world urban systems^{7}^{|}^{8} and wider scale adoption^{9}^{|}^{10}.

The two models here presented are CA in the sense that the landuse states update in successive steps in response to ongoing changes in the location’s ‘neighbourhood’, but the concept of a neighbourhood is otherwise more diffuse than ordinarily implied. In the case of the first toy model (see Appendix for links to code) representing dynamics from first principles: each landuse is assigned a distance threshold representing the distance pedestrians are prepared to walk in order to reach the landuse; a ‘capacitance’ representing the the momentum or rate of reaction for the landuse to respond to positive or negative changes; and a population threshold representing the minimum number of patrons for a location to be successful. This allows different types of landuses to be simulated where, for example, a more volatile landuse such as a coffee shop or eatery may command a relatively small distance threshold combined with a small momentum, meaning that they are relatively quick to appear or dissapear in response to opportunities or challenges. More stable landuses, on the other hand, such as a bank or a post-office may command a greater distance threshold and a greater momentum, meaning that they take longer to appear but are also more resistant to smaller perturbations. The model initialises by selecting a random starting location for each landuse and a singly-constrained model is then applied at each timestep to apportion flows from all dwelling units to each of the landuses. Existent landuse locations exceeding the required population threshold will have their capacitance boosted whereas those that don’t meet this level will have their capacitance decreased. The potential for new landuse locations to emerge is based on the available population divided into the required population threshold for a selected landuse and is then multiplied by a competition factor. This represents latent demand for new locations and is apportioned to currently vacant landuse sites by boosting capacitances on the basis of the greatest existing footfall. Landuse states are non-linear in that they ‘turn-on’ once the capacitance reaches an activation threshold and ‘turn-off’ once a location’s capacitance has been exhausted. The model includes a ‘spillover’ effect whereby a percentage of footfall reaching a location will ricochet into a subsequent time step, thus simulating pedestrians combining visits to multiple landuses and allowing for synergistic clustering of landuses to occur. Stochasticity is added to the calculated flows and capacitances to represent natural variability affecting trips and locations, and a small ‘death-rate’ randomly culls locations.

This first toy-model contains several key ingredients that would commonly be associated with the simulation of a complex system: competition for limited resources, parallel exploration, feedback processes, randomness, etc,^{11} which allow for complex behaviour to emerge; for example, locations are at once competing with other landuses of the same type but may simultaneously benefit from adjacency due to spillovers. The principles and the rules remain relatively simple and clear-cut, even if the dynamics are potentially complex. This is in contrast to the second toy-model which now discards the majority of the above mentioned rules and dynamics in favour of a set of deep neural networks representing three landuses. Three landuses have been selected from data for Greater London: commercial establishments based on a 400m walking tolerance; manufacturing locations based on an 800m tolerance; and eating establishments based on a 200m tolerance. Three deep neural networks are then trained: one for each of the selected landuse scenarios based on closeness centralities; betweenness centralities; the two ‘other’ non-selected landuses; and dwelling densities, with each of these provided to the respective models at a multi-scalar range of pedestrian distances from 100m to 1600m. The models are trained using neural networks with three hidden layers and 10% dropout. For the given information, the models respectively attain $r^2$ values of 92%, 76%, and 71% based on a 10% test set split. Model training uses a further 25% validation set split, with all splits performed using a spatial splitting method to prevent information bleedover between training / validation / and test sets. The three machine learning models are now supplied to the toy-model which proceeds by calculating network centralities, landuse accessibilities, and dwelling densities at each time step and then providing this information to the respective machine learning landuse models. The iterative update rules are now simpler: predictions for landuse accessibilities are compared to actual measurements: landuse capacitances are boosted if predicted accessibilities exceed measured accessibilities and vice-versa. Landuse state changes retain the non-linearity of the capacitance mechanism and some stochasticity is applied to capacitances at each time step.

The two models are compared across three scenarios: a ‘historic’ street network based on the town of York’s historic core; a ‘mesh-like’ grid; and a ‘tree-like’ network.

The first toy-model (first-principles) shows patterns in keeping with expectations: landuses compete for locations with high levels of centrality and density. Dynamics related both to clustering and distancing become evident and play-out over time, particularly in the free-form context of the mesh-like substrate. Higher capacitance landuses (purple) lay claim to the more prominent locations near the centres, with medium (orange) and low (cyan) capacitance locations adopting less prominent locations in keeping with demand. The second toy-model (neural networks) shows similar patterns for the historic location, but reveals interesting differences for the mesh-like substrate, which is now strongly geometric, and the tree-like substrate, which is now unable to gain traction.

The first-principles approach offers dynamics that are debatably more realistic while being more adaptable to the comparison of different scenarios. This opens the door to wide-ranging experimentation: How do different urban substrates affect the expression of landuse dynamics? What happens if the population increases or decreases? What if we increase or decrease the number of available landuse locations or place constraints on where landuses are permitted? The first-principles approach allows these questions to be resolved naturally and the expression of the dynamics is logically consistent when parameters are modified. A drawback to this approach is that application to real-world landuses requires either experimental approximations or some form of calibration to dynamics for observed cities.

The opposite tends to be true for the deep-learning approach: It is advantageous in the sense that the landuses are now modelled on observed real-world landuses and the embodied patterns are potentially complex, for example, the way manufacturing locations (purple) adopt remote locations around the periphery while food retail and commercial adopt central locations with the greatest access to population and footfall. It is disadvantageous in the sense that the embodied dynamics are now more fickle: the models can struggle to handle unrecognised morphologies and can’t decipher broader patterns and how these patterns might generalise to unknown situations that they have not been able to learn from the data, thus making it harder to ask explorative questions.

More broadly, these forms of model hold tremendous potential for application to scenario planning and could be particularly interesting for the methodical theoretical exploration of different urban substrates. They potentially lay-bare the correspondence between flows of information and the network and landuse structures that embody, harness, and amplify this information over successive iterations to reveal higher-order properties such as resilience and self-organisation. How exactly do these processes unfold and what morphological forms might enable them to proceed unimpeded? This question is left to subsequent research.

- 1. Neumann JV, Taub AW, Taub AH. The Collected Works of John von Neumann: 6-Volume Set. Reader’s Digest Young Families; 1963. ↩
- 2. Alexander R. Galloway. Creative Evolution [Internet]. Cabinet. [cited 2020 Oct 5]. Available from: http://cultureandcommunication.org/galloway/pdf/Galloway-Creative%7B%5C_%7DEvolution-Cabinet%7B%5C_%7DMagazine.pdf↩
- 3. Robert Hackett. Meet the Father of Digital Life [Internet]. Nautilus. [cited 2020 Oct 5]. Available from: http://nautil.us/issue/14/mutation/meet-the-father-of-digital-life↩
- 4. Dyson G. Turing’s cathedral : the origins of the digital universe. New York: Pantheon Books; 2012. ↩
- 5. Wolfram Stephen. A New Kind of Science. Champaign, IL: Wolfram Media; 2002. ↩
- 6. Couclelis H. Cellular worlds: a framework for modeling micro-macro dynamics. Vol. 17, Environment and Planning A. 1985 p. 585–96. ↩
- 7. White R, Engelen G. Cellular Automata and Fractal Urban Form: A Cellular Modelling Approach to the Evolution of Urban Land-Use Patterns. Environment and Planning A: Economy and Space [Internet]. 1993 Aug;25(8):1175–99. Available from: https://doi.org/10.1068/a251175↩
- 8. Batty M, Xie Y. From Cells to Cities. Environment and Planning B: Planning and Design [Internet]. 1994 Dec;21(7):S31–48. Available from: https://doi.org/10.1068/b21S031↩
- 9. Pinto N, Pais Antunes A. Cellular automata and urban studies: A literature survey. ACE: architecture, city and environment; null. 2007 Jan;1. ↩
- 10. Santé I, García AM, Miranda D, Crecente R. Cellular automata models for the simulation of real-world urban processes: A review and analysis. Landscape and Urban Planning. 2010 May;96(2):108–22. ↩
- 11. Mitchell M. Complexity: A Guided Tour. Oxford: Oxford University Press; 2009. ↩