This research explores the potential of Machine Learning (ML) to enhance wireless communication networks, specifically in the context of Wireless Smart Grid Networks (WSGNs). We integrated ML into the well-established Routing Protocol for Low-Power and Lossy Networks (RPL), resulting in an advanced version called ML-RPL. This novel protocol utilizes CatBoost, a Gradient Boosted Decision Trees (GBDT) algorithm, to optimize routing decisions. The ML model, trained on a dataset of routing metrics, predicts the probability of successfully reaching a destination node. Each node in the network uses the model to choose the route with the highest probability of effectively delivering packets. Our performance evaluation, carried out in a realistic scenario and under various traffic loads, reveals that ML-RPL significantly improves the packet delivery ratio and minimizes end-to-end delay, making it a promising solution for more efficient and responsive WSGNs.INDEX TERMS Machine learning, wireless smart grid networks, neighbourhood area networks (NAN), routing protocol for low-power and lossy networks (RPL).