At present, modern society is experiencing a significant transformation. Thanks to the digitization of society and manufacturing, mainly because of a combination of technologies, such as the Internet of Things, cloud computing, machine learning, smart cyber-physical systems, etc., which are making the smart factory and Industry 4.0 a reality. Currently, most of the intelligence of smart cyber-physical systems is implemented in software. For this reason, in this work, we focused on the artificial intelligence software design of this technology, one of the most complex and critical. This research aimed to study and compare the performance of a multilayer perceptron artificial neural network designed for solving the problem of character recognition in three implementation technologies: personal computers, cloud computing environments, and smart cyber-physical systems. After training and testing the multilayer perceptron, training time and accuracy tests showed each technology has particular characteristics and performance. Nevertheless, the three technologies have a similar performance of 97% accuracy, despite a difference in the training time. The results show that the artificial intelligence embedded in fog technology is a promising alternative for developing smart cyber-physical systems.