Modern software systems are increasingly deployed in dynamic, distributed, and unpredictable environments where dependability, autonomy, and resilience are essential. Traditional static and rule-based architectures are no longer sufficient, as fluctuating network conditions, inter-service dependencies, and cyber threats require continuous and intelligent adaptation. This paper presents a flexible, explainable, and network-aware self-adaptive software architecture powered by policy-based reinforcement learning (RL). The architecture incorporates proximal policy optimization (PPO) to support autonomous decision-making and integrates XRL-DINE to provide transparent and interpretable explanations of adaptation behavior. A key contribution of this work is the explicit introduction of network-awareness, enabling the system to respond effectively to varying latency, packet loss, throughput fluctuations, and service availability across distributed modules. The architecture is evaluated through both simulated environments and real network traffic from the CICIDS2017 dataset. Experimental results show that the analysis layer implemented using a random forest classifier achieving 96% accuracy and a 0.994 ROC–AUC provides reliable threat-probability estimates for the planning layer. Compared to rule-based strategies, the RL-driven planning layer demonstrates superior adaptive behavior, achieving higher average rewards, more effective latency reduction, and greater overall stability under adverse conditions. Furthermore, the RL agent minimizes unnecessary mitigation actions by performing selective throttling, thereby improving system continuity and resource efficiency. Overall, the findings indicate that reinforcement learning-driven, network-adaptive architectures significantly enhance the resilience, responsiveness, and interpretability of distributed software systems. These results suggest strong potential for deploying autonomous, explainable, and cyber-aware adaptation mechanisms in next-generation cloud, edge, and microservice environments.
Zita et al. (Thu,) studied this question.