The Rise of Cyber-Physical Systems: Integrating AI with Physical Devices