Swarm is a technique to identify the collective behavior of an object. In this modern world web usage gets increases day by day. Difficult task to identify the users interest in a web and provide a related data to the user in a quick mode. Based on their attention a developer has to upgrade their websites and improve the performance of the web pages and provide related information to the user with these data identify the user need in future. This paper present a comparative analysis of PSO and BBA algorithm which improves the predictable form by detecting the frequent path based on this find the future path.