Use of AI Algorithms in Different Building Typologies for Energy Efficiency towards Smart Buildings