Using artificial intelligence in reducing carbon emissions