The Smart Factory: The Role of Artificial Intelligence in Manufacturing and Distribution