The integration of artificial intelligence (AI) and swarm robotics has brought about significant advancements. Swarm robotics is based on decentralized control and self-organization, taking inspiration from natural swarms. It involves employing a large number of uncomplicated robots to collaboratively complete intricate tasks. The algorithms underpinning swarm robotics, which is artificial intelligence, vary depending on the specific role of AI - such as error detection, navigation, coordination, and optimization - and according to the tasks that these robots aim to undertake. In this systematic review, we aim to explore algorithms based on artificial intelligence in swarm robots and the advantages of applying them in the real world. In this systematic review, 74 scientific papers published between the years 2020 to 2024 were examined, but 53 of them were included after applying our methodology to them. The review investigated the common role of AI in swarm robotics, the most commonly used AI algorithms, and the percentage of the research that was conducted and tested in the real world. In conclusion, we discovered that there is a need for research that develops fault detection and coordination strategies, as well as a need for real-world testing.