# A Comprehensive Survey on the Societal Aspects of Smart Cities
## 3 Smart Cities' Technologies
### Machine Learning and Artificial Intelligence  
Smart cities are by their very nature immense projects, with many parts working in concert. This would be an unsurmountable challenge without automation. Most components of a smart city are automatic, performing their tasks without human intervention. In this respect, ML and AI allow for automation of tasks with a level of adaptability that was previously impractical. ML uses data to recognize patterns and simulate human learning to improve themselves and be able to perform their tasks more accurately [248; 249; 250; 251], while AI enables computing systems to simulate human intelligence and problem-solving capabilities. In this section, we will discuss how ML and AI are used to improve the operations of smart cities, but also the new challenges that using them presents. ML and AI can be used in smart cities in various types of tasks, from optimizing the sensors energy harvesting capabilities [252] or predicting equipment failure [253], to analyzing data to help in decision-making in (i) urban planning [254], (ii) energy or water usage [255; 256], or (iii) traffic management [257]. For example, Google is making use of DeepMind machine learning to reduce the amount of energy used for cooling by up to forty percent [258]. ML and AI might improve the safety of the cities' inhabitants by reducing response times. They can be used to continuously monitor of health conditions [259; 260; 261], recognize and provide assistance when needed [262], and approaches that use neural networks are able to quickly and accurately detect instances of fire [263] or to detect traffic accidents [264]. ML and AI can also be applied to predict emergencies instead of just reacting to them, such as a system for predicting fires [265] or traffic risks [266] across cities, or to handle all phases of natural disasters [267]. Shotspotter is a gunfire detection system used by the city of San Francisco, which has helped to reduce the homicide rate to an all-time low. Another system is Avista, a smart video surveillance system that has helped to reduce the crime rate in Minnesota by almost seventy-five percent [268]. Better transportation systems improve citizens' quality of life and access to services. Prediction models can be used to analyze traffic conditions and predict areas where congestion will occur [269], and then used to change traffic lights to adjust traffic and prevent congestion [270]. Additionally, it is of great importance in autonomous vehicles, where it is required intelligent algorithms to correctly act upon the multitude of data provided by a vehicle's sensors to guarantee the safety of passengers and pedestrians [271; 272]. For example, the city of Phoenix is making use of AI for traffic management, which has reduced delay times by forty percent [273]. ML and AI techniques might also be used to create digital twins, which are digital simulacrums of a real-world objects (e.g., persons, devices, or systems) connected in real time to their physical counterparts to enable data analysis, remote monitoring, behavior modeling, and the testing of possible upgrades. Therefore, digital twins enable an easier and more cost-effective engineering process and facilitate modelling and testing of very complex systems, such as cities, which otherwise would be infeasible or even impossible. One example is Virtual Singapore, which is the first digital twin of a country. Due to Singapore's limited land space, the government decided that a highly detailed simulation would be of help for land development and to identify flood risks. It can also be used by other stakeholders to make plans in a low-risk environment [274]. However, it should be noted that even with the most accurate modeling of the physical twin and the best data sources, a digital twin is still only a simulation with inherent limitations [275; 276]. Environmental protection is one of the most important challenges currently facing humanity; thus, it makes sense to use all available tools at ones disposal to tackle it.