The steps of firefly algorithm are as mentioned below: