# Central Heating Cost Optimization for Smart-Homes with Fuzzy Logic and a Multi-Agent Architecture
## 2 Background
### Multi-Agent Systems  
The sensorization of cities, homes and factories, among other infrastructures, allows the deployment of distributed systems. A computer system is needed to manage these complex systems. Due to the nature of these systems, the natural choice is to develop a distributed computer system capable of administering the system. Therefore, MAS offers a valid solution for this new trend. A distributed system is the main characteristic of a MAS. Every agent is independent of the others, making their own decisions and performing their goals. However, this is not the only characteristic of a MAS; other features are listed below [44]:  
* Flexibility allows the system to change against agents' and the environment's modifications. * Adaptability enables it to change the behavior or actions of the agents easily. * Scalability is the ability of MASs to add new devices to their structure. * Leanness is the feature that establishes a difference between agents but without incrementing the categories of agents. * Resilience allows obtaining the community goal, even if an agent fails or is corrupted. Thanks to these characteristics, the MAS has become an excellent solution to control and manage IoT infrastructures. Other researchers have taken this into account; hence, they have developed multi-agent architectures in the IoT field. Recently, Spanish researchers [PERSON] et al. [45] have created a distributed model predictive control based on a multi-agent system. They see MAS properties as the perfect solution for the distributed model predictive control that uses fuzzy logic to resolve their case of study. However, this multi-agent architecture is not useful in other IoT infrastructures since its implementation is mainly focused on the case study addressed in the paper. Therefore, this MAS cannot be applied without changes in their structure to another case study or IoT environment. The same problem occurs in a framework designed by [PERSON] et al. [46]. This solution proposes a multi-agent system with deep learning techniques to allow face tracking. The solution is focused on resolving the IoT problem, but the proposed MAS does not record the video sequence by itself, another subsystem is responsible for that task. [PERSON] et al. [47] propose a solution for maintenance scheduling in industry 4.0 using a MAS. The MAS enables decision-making and promotes competition between the different agents to obtain the global good. The MAS implements a different kind of agent; however, none of them are connected to a smart device or sensor in the industry. On the other hand, [PERSON] et al. [48] have also developed a MAS for Industry 4.0. This solution provides a full solution for this kind of IoT area. The proposed framework is divided into four layers, every one of them with different kinds of agents. Nonetheless, the framework does not include a layer or module to obtain data from the Internet. Researchers from the United Kingdom and the United States of America, [PERSON] et al. [44], have developed another MAS for Industry 4.0. Same as above, the MAS is well-designed for the Industry infrastructure, but it does not provide a global alternative. Similarly, [PERSON] et al. [49] have carried out a study in the context of a MAS carried out in JADE (Java Agent Development framework) to obtain information from a network of sensors inside a smart home and to monitor the home and its users. Another area in which the agent's theory has a lot of influence is in smart-grids and micro-grids. Proof of this is the study elaborated by [PERSON] et al. [50], who developed a MAS for the design and control of autonomous poly-generation microgrids. According to the authors, a decentralized system is a right solution for this kind of system. Hence, the agents help to perform a perfect distributed system, although the presented MAS has a simple architecture with only five agents and it does not have modules to distinguish between different kinds of agents.