This document presents a comparative study of nature-inspired algorithms, including the Firefly Algorithm and Particle Swarm Optimization, for numerical optimization. It describes implementing these algorithms to solve benchmark problems like the Michalewicz function and the Travelling Salesman Problem. The document finds that Particle Swarm Optimization often outperforms genetic algorithms, while the Firefly Algorithm is superior to PSO in efficiency and success rate. It concludes that the Firefly Algorithm is a potentially powerful tool for solving NP-hard problems but could be improved through reducing randomness over time.