## 1 Introduction  
Underwater acoustic sensor networks (UASNs) find extensive applications in marine environmental monitoring, marine resource exploration and utilization, geological disaster prediction, as well as marine national defense and security [1; 2; 3]. UASNs consist of tens or hundreds of battery-powered underwater sensor nodes, which are typically distributed in unsupervised, or even hostile, environments and are highly vulnerable to malicious attacks and threats [4]. The unique attributes of underwater acoustic channels, including substantial transmission delays, constrained bandwidth, Doppler frequency shifts, node mobility, and pronounced multipath effects, present a formidable challenge to the security of underwater acoustic sensor networks. Ensuring the dependability and security of underwater data transmission stands as a pressing issue demanding attention [5; 6]. Traditional techniques for maintaining network security, such as identity authentication and key management, are effective in resisting attacks from external malicious nodes, but they cannot effectively eliminate internal attacks and require significant computational overhead [7], these challenges render them ill-suited for resource-constrained underwater environments. Trust models have emerged as a potent solution to tackle these issues and have increasingly become a primary approach for detecting abnormal nodes and bolstering security in underwater acoustic sensor networks (UASNs) in recent years. It is worth noting that the propagation of underwater acoustic channels is influenced by factors like ocean depth, temperature, and salinity, among others [8]. Traditional wireless sensor network security mechanisms and mature research results based on land cannot be directly applied to UASN special environments. The environment and conditions of an underwater acoustic sensor network can change over time and with external changes, which can lead to communication disruptions between sensor nodes, data corruption, or node failures, which in turn affect the reliability and accuracy of the entire network [9]. The network must promptly detect and distinguish abnormal behaviors while also dynamically adapting its trust evaluation. Domestic and international research on trust models for UASNs has achieved certain results, and some trust update mechanisms have also been proposed. Nonetheless, a unified trust model for evaluating trust in underwater acoustic sensor networks is notably absent. Many research efforts have focused on enhancing traditional network trust models, but these adaptations often fall short of fully addressing the unique environment and requirements of underwater acoustic sensor networks. In addition, in terms of trust updating, few studies have been devoted to the problem of adaptive trust updating. Existing studies consider trust updating with a time decay factor, which only considers the time factor and ignores the dynamics of events. The results of trust updating depend heavily on the choice of the time decay factor. In proposals that involve weighting and amalgamating historical and current trust evidence, the challenge lies in determining the optimal size of the time window. This factor can significantly impact the calculation and refreshment of trust values. As a result, real-time trust updates within underwater acoustic sensor networks are imperative to adapt to environmental fluctuations, node failures, and security risks. Such real-time updates play a pivotal role in enhancing the network's reliability, precision, and security. To address the aforementioned challenges, this paper presents a novel dynamic trust model for underwater acoustic sensor networks (DRFTM) that leverages the power of random forest and reinforcement learning. The DRFTM operates on the principles of communication trust, data trust, energy trust, and environment trust to assess trustworthiness.