Adaptive Systems for Smart Buildings Utilizing Wireless Sensor Networks and Artificial Intelligence