The aim of this study was to implement and compare obstacle avoidance for an autonomous wheeled mobile robot (WMR) via the grey wolf optimisation (GWO) algorithm and the artificial bee colony (ABC) algorithm. The study was conducted via three scenarios, each designed to test the performance of the algorithm under different conditions, considering fixed and moving circular obstacles in the surrounding environment. GWO was used to determine the most efficient, shortest and safest path for the WMR from the starting point to the target point. The results showed that the GWO outperformed the ABC. The GWO also enabled the WMR to avoid obstacles faster by 11.8%, 2.8% and 4.6% and with distances shorter by 1.42%, 2.2% and 1.97% for the three scenarios, respectively.