Rate of Penetration (ROP) prediction is a crucial for optimizing drilling processes and enhancing drilling efficiency. However, most existing ROP prediction models are static, relying on fixed neighboring well datasets and incapable of adapting to real-time changes in formation conditions during drilling. The dynamic and uncertain nature of geological conditions and formation heterogeneity further limits the extension and application of current ROP prediction models to target wells. To address these challenges, this study introduces an Adaptive Random Forest (ARF) algorithm to establish an ROP adaptive prediction model under dynamic formation conditions during real-time drilling operations. The performance of the ARF model is compared with the Moving-Window Random Forest (MW-RF) ROP dynamic prediction model, using data from the W1 well in the Sichuan basin as an example. Experimental results demonstrate that the ARF model outperforms the MW-RF model, exhibiting smaller overall error and reduced error fluctuation during formation condition changes. The ARF model's dynamic adaptability allows it to respond to the evolving trends of the ROP prediction model, rapidly adjusting to changes in formation conditions based on real-time drilling data flow. In contrast, the MW-RF model exhibits slower adaptability and delays in updating, reacting passively to window movements. The proposed ARF model overcomes limitations associated with static ROP prediction models, making it applicable to practical drilling scenarios and providing a theoretical foundation for real-time drilling parameter optimization and intelligent drilling strategies.