Engineering Self-organizing Urban Superorganisms

Progresses in ubiquitous, embedded, and social networking and computing make possible for people in urban areas to dynamically interact with each other and with ICT devices around. This can result in a system with a very large number of agents working together in an orchestrated and self-organizing way to achieve speciﬁc urban-level goals, i.e., as if they were a “superorganism”. In this article, we sketch the future vision of urban super-organisms and overview some emerging application areas heading towards the vision. Following, we identify the key challenges in engineering self-organizing multi agent systems that can work as a superorganism, i.e., seamlessly involving ICT agents and human agents so to to achieve some required urban level goals. Finally, we introduce the reference architecture for an infrastructure to support our future vision of self-organizing urban superorganisms.


Introduction
Progresses in mobile and ubiquitous computing are paving the way for innovative services to perceive detailed information about the surrounding world and interact with it [14].In addition, social networks are promoting innovative models and tools to engage people in situated collaboration activities [50].
In urban scenarios, these factors let us envision the possibility of integrating the complementary sensing, computing, and actuating capabilities of ICT agents and of humans agents, so as to realize a number of innovative services to increase both quality of life and urban sustainability [60].The ultimate vision is that of an heterogeneous urban-scale multiagent system [29], whose individual agents can self-organize their collective activities to achieve specific urban-level goals, as if they were part of a single organism, i.e., what in biology is usually called a "superorganism" [26].
In this article, starting from the assessed biological perspective on superorganisms, we sketch the future vision of urban superorganisms, showing how ICT capabilities and human capabilities well complement each other.In particular, we discuss how, the urban superorganism as a whole will be able to: (i) combine a wide range of information sources (e.g., environmental data from sensor networks, mobility data and social network posts) to sense the current state of the city [52] and of its individuals [18]; (ii) perform advanced reasoning on the data to identify patterns and situations, and plan actions [4,1,47]; (iii) engage in large-scale coordinated tasks to achieve specific goals (e.g., optimize traffic flow in the city, make it more environmentally sustainable, etc.) [24].Accordingly, we overview how such capabilities can be exploited to realize many innovative applications and services, pushing current smart cities visions much forward [32].
Clearly, the road towards the full realization of the urban superorganism vision and of its associated applications is plenty of challenging open research questions.These range from scientific questions (e.g., how can we enforce "by design" a specific self-organizing behavior?) to engineering (what coordination models and technologies better suit a large system of heterogeneous agents?) and social ones (how can we made people willing to act as part of the superorganism?).This paper will analyze some of these research challenges and eventually proposes a reference architecture for a middleware infrastructure aimed at tackling the above challenges and at supporting the deployment and execution of advanced superorganisms services.
The remainder of this paper is organized as follows.Section 2 details our vision on self-organizing urban superorganisms.Section 3 overview innovative application areas for future urban superorganisms.Section 4 discusses key research challenges to be solved towards the realization of the vision.Section 5 proposes a general-purpose architecture addressing some of those challenges.Section 6 concludes.

The Urban Superorganism Vision
In the near future, a very large number of inter-connected agents, whether human or ICT ones, can be potentially exploited to create what -in biology -has been usually defined a superorganism [26].That is, a large ensemble of individual organisms capable of behaving in a collectively orchestrated way to serve the good of the ensemble itself.In particular, closing the sensing, computing, and actuating capabilities in a loop, and making such activities collaborative ones, it is possible to realize coherent collective behaviours, as it is observed in many natural situations, e.g., in ant colonies [6].

From Biological to Urban Superorganisms
A single ant has very limited, local sensing and actuating capabilities, and little or no cognitive abilities.Yet, ants can indirectly coordinate their movements and activities, via spreading and sensing of pheromones in the environment, so as to exhibit, as a colony, very powerful collective behaviors.
This can occur because the pheromones mechanism induces coordinated activities that -by closing into a feedback loop -turns the limited individual capabilities of sensing, understanding and acting into collective ones.In fact [44,6]: • Acting: When an ant finds some food source, it starts spreading pheromones in the environment, thus creating a path that leads to food.The overall activities of the ants of the colony in spreading pheromones eventually shape a distributed field of pheromones that can be used to find food.
• Sensing: To find food, an ant senses existing pheromone field gradients (if any, or wanders randomly otherwise).Such field gradients, if followed uphill, eventually lead the ant to food.This makes the ant start spreading pheromones in its turn and producing further paths that increase the chances for all the ants of the colony to find food.
• Understanding: All that an individual ant has to do in terms of cognitive activities is computing the direction of the uphill gradient.However, the colony as a whole exhibits an incredible efficiency in finding food sources, in computing the shortest paths to food, and in adaptively reshaping the pheromone fields to account for contingencies.
In a similar way that individual ants behave as if they were a single superorganism, we envision that citizens, along with ICT agents and devices, can be engaged in large-scale coordinated activities.This would allow the city as a whole to become a sort of superorganism, via which to realize complex coordinated tasks for the good of everyone.

From Individual to Collective Behaviors
Figure 1 illustrates the sensing-understanding-acting feedback loop that -as in ant colonies -can contribute leveraging individual capabilities into collective ones, and eventually make collective behaviours possible.There, advanced finalized and coordinated activities are the result of: • Sensing activities in which users, supported by ICT devices and services, get information about the current state of the environment (e.g., people location data) and can share such information (e.g., as already happens for mobile phone sport trackers) .
• Understanding activities in which advanced forms of contextual information are derived from the sensed data (e.g., individual citizens mobility patterns), and possibly aggregated to evaluate the global properties of a city (e.g., the global mobility rhythms).
• Acting activities, in the form of seemingly goal-directed global coordinated tasks, supported by the extracted information, and put in actions by groups of agents (e.g., traffic steering on the basis of the identified mobility patterns, car sharing on the basis of people mobility routines, etc.).
To close the feedback loop, the results of these activities clearly affect the overall state of the city and the individual state of citizens.Citizens can perceive such changes at both the individual and collective level, and can recognize the effects of their actions [41].This makes it possible to compute new actions in real time and induce a positive effect in those who recognize the effect of their actions.

The Complementary Role of Humans and ICT Agents
In this section we provide more details on the sensing, computing and actuating activities that can be put at work to enable the above described collective behaviour cycle.
People are increasingly equipped with smart phones that are very powerful in terms of battery life, sensing, computational power and connectivity.At the same time, autonomous ICT infrastructures (sensor networks, security cameras, robots, etc.) are likely to pervade cities in the near future.Accordingly, the future urban environment is becoming a sort of dense digital ecosystem, whose components are characterized by heterogeneous and complementary sensing, computing (i.e., understanding), and actuating capabilities.
As for sensing, capabilities in sensing from the ICT side can be provided by: (i) mobile phones equipped with GPS, accelerometers and cameras; (ii) sensors networks and smart objects that follow the Internet of Things paradigm [19,20]; (iii) tags that exploit the near field communication technologies (NFC, RFID and Bluetooth).From the human side, the five senses of humans can, in many situations, supply and be more accurate than ICT sensors (think about the possibility of sensing opinions and "moods", which ICT sensors can hardly provide).Also, they can be easily put at work for the community, due to the possibility of continuous accessing to online social networks, where to express and make public the sensed information [52].
As for computing, capabilities from the ICT side makes it possible to collect and digest very large amounts of urban data in a short time, and to perform some limited pattern analysis on such data.However, from the human side, one can effectively exploit the capability of recognizing complex situations and patterns (so called human computation [59]), which machines can hardly tackle.Think, for example, at recognizing a situation in which two friends pretend to fight just for joking and are not really hurting each other.
As for actuating, the actuating capabilities from the ICT side can be provided by: (i) traffic controllers supporting control of vehicles movement (e.g., traffic lights); (ii) public displays that can be exploited to suggest (steer) specific behaviors to citizens); (iii) all kinds of actuators related to critical infrastructures (e.g., energy grid); (iv) robots.From the human side the key actuating element involved are users themselves, which can perform a variety of actions related to moving or moving items around or changing the properties of some physical entities.In addition, citizens could accomplish actions -such as social persuasion -based on peculiar abilities of humans and that will never be such effective when performed by machines.
The goal-directed integration of the above capabilities and activities will allow to close the collective-awareness feedback loop, thus enabling largescale coordinated behavior among humans and ICT devices and services.

Related Sources of Inspiration
Our idea of self-organizing urban superorganisms borrows from a number of recent works in participatory sensing and smart cities, as well as form the area of self-organization.Nevertheless, it also leverages such works in many directions.
Most existing works in opportunistic and participatory sensing -which have inspired our idea of global-scale collaboration -have tried to involve users by making use of their devices as sensors [51,31,35].On the opposite side, other works try to detect events or situations by observing users activities on online social networks [53,52] or via their mobile phones [45].However, these works lack of a general and unified vision and do not completely deal with the complexity of the global scenario.That is, they don't explore all the possible convergences of humans and ICT devices.Moreover, they do not fully make use of the large number of inter-connected individuals and of their complementary capabilities.This prevents realizing collective behaviors behind sensing and behind performing some limited sensing-related actions.
The general idea of "smart cities" fascinates and inspires an increasing number of researchers [13], us included.However, most current approaches to smart cities (e.g., as those that are carried on by IBM [32]) are related to the "sensing and understanding" facets of the urban superorganism scenario (see Figure 1).That is, collecting (typically on a centralized way) data about various aspects of a city life and get a meaning out of it, for the sake of driving policy makers in planning future infrastructural actions.The "actuating" aspect, i.e., the possibility of dynamically involving citizens and ICT actuators to influence the city dynamics is mostly disregarded.Only a few studies in this direction have been performed, and mostly oriented to steer crowd via mobile phones (e.g., the "tag my lagoon" project in Venice www.tagmylagoon.com),or at directing traffic towards zones with available parking space (e.g., the Santander Smart City Project, http://www.smartsantander.eu).
Several research works in the area of distributed systems, there included some of our previous works [61], recognize the need to adopt bio-inspired self-organizing schemes to effectively coordinate activities in large-scale multi agent systems.More recently, a great deal of research have focussed at defining and cataloguing bio-inspired mechanisms [3,17], with the intent to identify the limit of applicability of the different phenomena, and to provide guidelines for their systemic reuse.Thus, the basic idea is that of providing bio-inspired self-organizing pattern modules as a set of reusable patterns that could be used to ease engineering of collective behaviors in large-scale multiagent systems.By our side, we are indeed firmly convinced that the only way to bring together the complementary capabilities of humans and ICT devices and to reach the ability to coordinate and organize them is to rely on bio-inspired self-organizing approach.However, in line with [58,17,61], we also think that models and infrastructures should be created to make it possible to engineer large-scale systems.Such models and infrastructures should enable a variety of related self-organizing patterns to be put in place and working at the same time, and to concurrently express various forms of collective behaviors serving different purposes.

Emerging Application Scenarios
Let us now introduce some exemplary application scenarios that could be enabled by the vision of self-organizing urban superorganisms, and by the defined collective feedback cycle.

Smart Mobility
Among many capabilities that future urban superorganisms will exhibit, the first that we expect to be in place, and for which we already observe embryonic examples around, will relate to urban mobility [57,22,27,24].Specifically, it will relate to the capability of sensing, predicting, and affecting (i.e., steering) the movements of vehicles or pedestrians, thus improving overall efficiency of urban mobility, but also making it possible for every citizen to dynamically satisfy at the best its mobility needs.
A variety of sensors already exist to detect the conditions of traffic or crowd in urban environments.In addition, users are increasingly given the possibility to contribute to such sensing activities by posting information on social networks or by opening access to their navigators and smart phone sensors.All this information can be used to understand how to improve traffic flow or how to avoid congestions.To this end: actuators such as traffic lights and digital traffic signs can be put at work for vehicles; public (wall mounted) displays [15] and private (smart phone) displays can be exploited to suggest directions to pedestrians.
However, one could push the capabilities of superorganisms much beyond [54].For instance, one can think at dynamically matching the similarity of the planned routes of vehicles, pedestrians, and merchandises to be delivered, in order to dynamically self-organize very flexible ride sharing and shipment services.In general, urban superorganisms induce a change in the dominant paradigm for the provisioning of mobility services: from sensing mobility patterns and adapt existing services to them, to dynamically collect mobility needs and self-organize the role and mobility patterns of vehicles accordingly.

Improved Sustainability
As an additional example of how the capabilities of future urban superorganisms can impact urban life relates to energy consumption [8].Just imagine sensing in real-time information related to energy consumption, to compute sorts of instantaneous urban carbon footprints for specific areas of the city or for specific groups of citizens, other than for the city as a whole.
Public displays can then be exploited to share this information and possibly some summaries of the factors contributing to it, and personal displays can be possibly exploited to let individual and groups become aware of their own contributions to the urban carbon footprint.On these basis, one could think at steering the behaviour of individual citizens towards more energy efficient behaviours.Also, one could engage groups of citizens in self-organized collaborative actions, with the aim of solving/improving specific energy problems in specific urban areas and thus supply the lack of actuators suitable to the purpose (e.g., detecting open windows and closing them).

Taking Care
Via similar means, it could be possible to dynamically involve citizens in proactively helping to take care of the city, e.g., to help keeping it cleaner or making it a safer place for everyone.For instance, one can think at dynamically engaging people to temporarily take care of children on their way to school, whenever the current activity and known habits of some persons suggests.
Ideally, in the presence of enough matching persons willing to be involved, and possibly of the necessary complementing sensors (e.g., cameras) and actuators (e.g., robots) already in place for that purpose, one could make sure that the whole path from home to school of every children in a city is properly covered and taken care of.Such a scenario is possibly a bit scary as of today, but a day will come when the idea of connected citizens and devices will become very common, and all related urban services will be perceived as highly trusted.

Feeling Part of It
Beside thinking at measurably useful objectives and services for which urban superorganisms can be put at work, their advantages could also be in the (not easily measurable) way by which they will improve our experience of living in urban environments.In particular, acting and moving around in a city by being given feedbacks on the effect of our own existence in it (and observing ourselves in relation with our environment and with the other citizens), can make most of our everyday actions inherently more pleasant and rewarding, and can promote a renewed and stronger sense of citizenship.
Indeed, there are already a variety of examples in which the adoption of social networks to exchange information and discuss problems within neighborhood of a city has helped promoting a renewed sense of citizenship.The so called "social streets" phenomena, in particular, help people understanding the fact that living in a specific part of the city implies belonging to a community and serving the community.We expect urban superorganisms will bring such understanding to a much wider scale.

Challenges for Superorganism Architectures
The vision of the urban superorganism raises a number of challenges that can hardly be dealt by present networking and middleware architectures.In this section, and without having the ambition of being exhaustive, we present a number of such challenges, and analyze how an infrastructure to support the activities of urban superorganisms should address them.

Bringing Human and ICT Agents Together
The activities of urban superorganisms will involve a variety of heterogeneous agents: humans equipped with a mobile phone, ICT sensors and actuators, cameras, public displays, self-driving cars, different classes of robots [21,55].The characteristics and capabilities of such heterogeneous classes of entities are very different from each other: just think at how differently humans and artificial vision systems see and classify images [49], or at how differently robots and humans can assist people [55].
An infrastructure for future urban superorganisms should be able to support a general model for representing such different classes of services and their specific features, as well as a general model to invoke them and properly collect their results.Also, the infrastructure should integrate a proper coordination model to support the orchestration -typically based on selforganizing and self-adaptive coordination schemes [38] -of myriads of heterogeneous agents physically spread over an urban area.

Collective Situation Awareness
A key assumption of the superorganism vision is the capability of acquiring high-levels of both individual and collective awareness about situations around.As technologies evolve, new types of sensors become available to sense information about environment, weather, presence or movements of different entities.Furthermore humans too increasingly act as a kind of social sensor through social networks or their mobile phones signals [52].So, the availability of sensorial data is not an issue.The problems arise when trying to turn such large amounts of data into knowledge about situations [4].
In the past few years, there have been a notable progress in the identification of algorithms and data classification techniques for individual or homogeneous sensorial streams.The new challenge is to find ways of properly aggregate multiple streams from multiple and heterogeneous sources, so as to classify more complex and multifaceted situations.Early proposals towards advanced classification techniques exploiting multiple sensors can indeed be found [37,5,25].Yet, a general approach to sensor fusion and complex situation recognition, also accounting for global situations at urban scale are still missing, and so it is missing the identification of a proper infrastructure to support such a general approach.

Reconfiguration and Self-Adaptivity
Reaching high-levels of awareness is necessary to understand what actions to undertake to achieve specific global level objectives.However, it is also necessary to continuously monitor -in a close feedback loop -the effect of the actions and to dynamically plan corrective actions in need [12].Such corrective actions may: (i) be caused by local effects and involve simply a change in how some individuals act; or (ii) be of a more global nature and involve a large number of individuals and their interaction schemes.
For instance, with regard to the former case, consider the case in which a camera does not longer "see" satisfactorily because of fog.Then, the help of some citizens may be required to identify what is happening there.With regard to the second case, one can consider that the global monitoring of some urban area can involve mostly humans during daytime, whereas it should involve robots and ICT sensors during night.
Accordingly, the general model for urban superorganisms and the supporting infrastructure should support dynamic discovery of individuals and dynamic reconfiguration (that is, the dynamic composition of agents and their involvement in different types of coordination patterns over time).And, clearly, this should take place in a self-adaptive way, without requiring human intervention.

Bottom Up Self-Organization vs Top-Down Design
Due to their inherent decentralized nature and the lack of central control, the behaviors of urban superorganisms will have to be mostly based on selforganization.This means that the local activities and interactions of its component will have to make global patterns of behavior -serving specific urban-scale purposes -emerge despite the fact that such global behaviors will not be explicitly coded into any of the individual components [38,3].
Self-organization is inherently self-adaptive.In fact, the emerging patterns of behaviors tend to dynamically reconfigure in response to the local environmental situations sensed by individuals (which can also be an aggregated representation of some global situations, as it happens for pheromones fields in ant colonies, thus leading to global reconfigurations).
However, engineering individual behaviors so as to achieve specific global goals is quite a challenge, and is mostly possible only by reverse engineering of known natural self-organizing phenomena [3].Thus, a relevant thrust of research on adaptive and evolvable software systems -rather that looking for inspiration from the area of natural self-organizing systems -is focussing on integrating adaptation in software systems according to the most assessed approaches of software engineering.This implies explicitly encoding global goals in a system that is designed and coordinated in a top-down way [12], and promoting adaptivity by having the system explicitly account for its awareness of the global situation to change its configuration.
The key question that arises in this context is how it is possible to define methodologies to smooth the tension between the two approaches, i.e., identifying how the two approaches can co-exist (and they will indeed have to) and possibly conflict in future urban superorganisms.The ultimate goal would be to tolerate development methodologies in which the bottom-up and self-adaptive endeavor of nature-inspired self-organizing systems can become part of a more traditional top-down approach to software engineering.

Predicting and Controlling Emergent Behaviors
Emergent bottom-up self-organization in natural systems, leading to selfadaptive properties, is by definition a non-deterministic and irreducible process.Although it is possible to design a self-organizing system that will probabilistically behave as desired, it is impossible to exactly predict its final configuration but by executing the system itself.
Probabilistic non-determinism may be satisfactory in some non-critical cases, e.g., in the diffusion of non-critical traffic information in a network of vehicles [28], where the existence of some vehicles not reached by the information is not critical.However, in other cases it may not be acceptable, e.g., in the exploration of an urban environment by a swarm of robots during a rescue operation [7], where one cannot tolerate the swarm to ignore some portion of the environment.Accordingly, a key issue is to compensate such unpredictability by defining control tools to dynamically tune on-the-fly the overall behaviour of a self-organized urban superorganism, whenever heading toward undesirable states [16].
Some research in software engineering and distributed systems explicitly address this issue, and mostly at the level of simple simulations for multiagent systems or cellular automata [39].Yet, a general understanding of how to control emergent behaviors in complex software systems is still to be reached.In our opinion, the work on regulated norm-based multiagent systems and electronic institutions [48,30] can be an effective starting point towards achieving predictable and controllable behaviors in urban superorganisms.In addition, those works proposing special classes of control agents to be injected in order to act as leader and affect the global behaviors of the multiagent system [10,9,56], can be promising as well.

Persuasion and Incentives
The key assumption under the urban superorganism vision is that citizens will be willing to participate in its activities and devote resources (i.e., time, knowledge, and physical actions) to it.So, from a social perspective, the effectiveness of urban superorganisms depends strongly on how deep individuals are involved and can be steered in their collaborative behaviors.
Recent work on persuasive technologies analyses how to induce specific behavioral changes and persuade people to establish a desired behaviour.The key points include the identification and classification of existing behavioral patterns, their evaluation also in respect of individual motivations, and the adoption of specific human-computer interaction techniques (such as reminders and feedbacks on user's activity) [63,33,35].We expect persuasive technologies will be an integral part of a future infrastructure to support superorganism behaviors, but we also expects that citizens themselves will play a primary role in persuading each other and self-sustain global changes of behaviors.
In any case, there could always be specific classes of services and behaviors for which persuasive technologies can hardly apply (e.g., convincing people to park farther than they would to support future situations).Therefore, urban superorganisms should also account for more explicit means to incentivize participation in the superorganism activities, such as monetary rewards or social rewards (such as a higher reputation) [36,34].However, the applicability of such mechanisms and their general effectiveness is far from having been assessed, as it is their economic sustainability.

Towards a General Infrastructure for Urban Superorganisms
In this section we introduce the reference architecture for a generalpurpose middleware infrastructure in support of urban superorganisms.The architecture builds upon the one developed in the context of the EU-funded SAPERE project (http://www.sapere-project.eu/),and extend it via a configurable set of nature-inspired coordination laws [62,43,61].
The reference architecture and its configurable coordination laws can support coordination among heterogeneous agents based on policies determined at the urban level, can express situation-awareness by integrating advanced classification techniques, and -due to its nature-inspired approach -can support and control a variety of self-organizing coordination patterns.

Reference Architecture
The architecture (see Figure 3) supports the coordination of agents in an urban area by abstracting the urban environment itself in terms of a computational spatial substrate, in which the coordinated activities of urban agents take place.From the implementation viewpoint, such spatial substrate could be realized as a service in the cloud, or it also could be distributed across the actual pervasive ICT infrastructure, i.e., the dense connected system of heterogeneous ICT devices that populate our urban environments (from smart phones to embedded sensors and actuators).
The spatial substrate acts as a sort shared coordination media embedding the basic laws of coordination that rule the interactions between the urban agents.The agents include all those autonomous components -whether of a human or ICT nature -that can provide (or can in turn request) resources and services to the overall urban environment.
In the spatial substrate, agents can interact and combine with each other (in respect of the coordination laws and typically based on their spatial relationships), serving their own individual needs as well as those of the overall urban environment.Human agents, in particular, can access the urban environment in a decentralized way via their mobile phones (or any other portable devices that will be made available in the coming years) to use and consume data and services.They can also act as servers, to make available own human services.
For the heterogeneous urban agents living in the superorganisms, the architecture should adopt a common modeling and a common treatment.In particular, we propose this to be a semantic representation (which we call Live Semantic Annotations, or LSAs) associated to each and every service and functionality that the agents of the superorganism can provide.An LSA is tightly associated to the agent it describes, and -unlike static service descriptions -must be capable of dynamically reflecting in their values the current situation and context of the services.In particular, the current situation should also account for the diverse means by which a service can be provided by different types of agents (e.g., whenever connected in the case of ICT devices, when available and willing to participate in the case of human agents), and should reflect to current availability and quality of response of the service.
More in general, LSAs can act as observable interfaces of resources, as well as the basis for enforcing semantic forms of dynamic interactions (both for service aggregation/composition and for data/knowledge management).From a nature-inspired viewpoint, and getting back to the paradigmatic example of ant colonies (Section 2) the LSAs of an agent can be assimilated to sorts of "pheromone" signals that express the existence of an agent in an environment, and that make available to all other agents information about some of its current and/or past activities and knowledge.

Nature-Inspired Coordination Laws
The coordination laws define the basic laws driving virtual bio-chemical interactions among the LSAs of the various agents of the superorganism.In particular, the idea is to enforce on a spatial basis, and possibly relying on diffusive mechanisms, dynamic networking and composition of data and services, so as to eventually lead to the emergence of self-organized coordination patterns leading to some global scale urban superorganism behaviors.
The basic set of coordination laws that we propose to integrate in the architecture, as derived from the SAPERE middleware [61], synthesize from existing self-organized systems that can be found in nature and make it possible to reproduce a variety of different coordination patterns.Based on the extensive analysis and experimentations performed within the SAPERE project, such set of coordination laws should include mechanisms for: (i) Bonding, to act the basic mechanism for local interactions and exchange of information between agents.Bonding enforces as a sort of virtual chemical bond (based on semantic pattern-matching) between two LSAs and, thus, results in a spontaneous compositions of the associated services.(ii) Spreading, to diffuse LSAs on a spatial basis, which is necessary to support propaga-tion of information and interactions among remote agents, and that can be used to realize coordination structures such as pheromone fields and chemical gradients [40].(iii) Aggregating, to enforce a sort of catalysis among LSAs, which is useful to support distributed data aggregation.(iv) Decaying, to mimic chemical evaporation, which is necessary to garbage collect obsolete information and to support self-adaptation upon changing conditions.
However, to flexibly support the enactment of urban-level policies (e.g., the need to constrain interactions to a limited spatial extent, the need to support spatial concepts somehow tuned to the social or political geography or a town, or the need to limit activities to institutional ones), the reference architecture should support flexible re-configuration of each of the presented coordination laws.Such reconfiguration, without impacting on the way agents are programmed and deployed, can nevertheless impact on their overall self-organizing activities.
From the viewpoint of individual agents, the middleware should provide (via a simple API) the possibility of advertising themselves via an LSA, and supporting the continuous updating of their LSAs.As LSAs are injected in the spatial substrate, this has the effect of triggering coordination laws, depending on the actual values and structures of LSAs.Specifically: bonding and aggregation of an LSA take place in the presence of other LSAs that match with it; spreading and decaying of an LSA takes place if specific diffusion and aggregation fields within the LSA are set.
Finally, the API should enable agents to detect local events, such as the modifications of some LSAs or the enactment of some eco-laws on available LSAs, and access the information contained in LSAs.In this way, agents can reach awareness of local and global situations, and can access the results of distributed self-organized computations in the forms of the shape of LSAs structure and their stored information.

Addressing the Challenges
The proposed architecture has the potential to be able to effectively address the challenges identified in Section 4. In fact: • The LSA approach can be effective in uniformly representing both human and ICT agents and their associated services.Also, being all LSAs residing in the same spatial substrate and being subject to the same coordination laws, this makes it possible to seamlessly involve in coordinated activities both human and ICT agents.In addition, the deployment of special classes of agents devoted to access LSAs containing raw sensorial information and of injecting back the results of pattern analysis and classification techniques, can be used to integrate advanced forms of situation-awareness in the overall activities of the urban superorganism.
• According to its natural inspiration, self-adaptivity and reconfiguration can be promoted not by the capability of individual components, but rather by the overall self-organizing dynamics of the superorganism.
In particular, adaptivity is ensured by the fact that any change in the system (as well as any change in its components or in the context of the components, as reflected by dynamic changes in their LSAs) will reflect in the firing of different coordination laws, thus possibly leading to the establishment of new bonds or aggregations, and/or in the breaking of some existing bonds between agents.
• As we have extensively discussed elsewhere [42,17], the four proposed coordination laws makes it possible to realize a wide variety of natureinspired self-organized coordination patterns, from physically-inspired to chemically-and biologically-inspired ones, within the same infrastructure and with the same basic programming approach.
• To control emergent behaviors, one can think at deploying in the infrastructure special classes of agents that, by spreading "fake" LSAs that have the only goal of triggering some coordination-laws, eventually affecting the way coordination laws apply to other LSAs of other agents [9,56,23].The result could be in an overall adaptation of the behavior of the superorganism, yet obtained in a fully decentralized way.Of course, whether it will be possible to engineer such fake LSAs so as to always obtain the desired control is still to be experimentally evaluated.In addition, the possibility of configuring the coordination laws can be enforced to control the interaction patterns among agents and, consequently, the overall dynamics of the urban superorganism.
• In a similar way, special classes of agents capable of enforcing control could be used to properly mix the self-organized bottom-up behavior of the urban superorganism with some forms of top-down behavior, where such special classes of agent can explicitly encode the high-level goals to be achieved and act in a goal-oriented way.
• Concerning incentives to participate, and although the architecture does not explicitly address such challenges, one can think at exploiting the flexibility and dynamics of LSAs to encode in it reputation information or monetary information.
In the context of the SAPERE project, and although it was not directly related to urban applications, we have indeed realized some applications that can be considered sorts of primitive instances of some of the application scenarios discussed in Section 3.These include: • Applications to help coordinate the mobility of pedestrians [46], by suggesting them path across the city to avoid crowdy places, and thus balancing the overall distribution of people in regions of the town.
• Applications to help people socialize via the mediation of interactive displays, i.e., by sharing via them information and comments about events around [2,11].In this way, we can help people reach some forms of collective awareness and increase the feeling of being part of a community.
By testing these applications in small testbeds, we have shown that some of the identified challenges can be indeed be met with the SAPERE approach.Nevertheless, we are aware that we still have to assess the extent to which the above promises can be effectively fulfilled in large-scale real urban scenarios.

Conclusions and Future Works
In this article, we have analyzed how it will be possible -in the near future -to exploit ICT technologies and human capabilities to coordinate urban-level multiagent systems (aka urban superorganisms) via which to deliver innovative collective urban-level services.In our opinion, the rise of innovative collaborative urban services, expressing various forms of urban awareness and intelligence will definitely take place, and will dramatically change the way we move, live, and work, in our urban environments.However, to reach this goal, many research challenges still need to be addressed, and suitable middleware infrastructures have to be developed, possibly along the lines we are currently investigating.
At the time of writing, we are in the process of completing the first fullyfledged prototype implementation of the proposed infrastructure, by extending upon the infrastructure realized within the SAPERE project [61].The plan is to put it at work in the realization of a number of innovative university services within the campuses of our university.Nevertheless, we are aware that a number of additional scientific and social challenges -beside those we have identified -will emerge as the first instances of urban superorganisms will hit the ground.

Figure 1 :
Figure 1: Collaborative sensing, understanding and acting among humans and ICT agents can be put at work to realize advances urban-level behaviors.

Figure 3 :
Figure 3: A reference architecture for urban superorganisms infrastructures.

•
Concerning situation-awareness, at the local level LSAs can express local contextual information, and the bonding of LSAs can provide for fusing information coming form heterogeneous sensors.At the global level, spreading and aggregating LSAs each expressing local information can provide for the self-organized formation of global distributed data structures, to encode information about global situation and facts.