Optimizing Multi-Vessel Collision Avoidance Decision Making for Autonomous Surface Vessels: A COLREGs-Compliant Deep Reinforcement Learning Approach

تحسين اتخاذ قرار تفادي التصادم متعدد السفن للسفن السطحية الذاتية: نهج تعلم معزز عميق ملتزم بقواعد COLREGs

👤 Weidong Xie, Longhui Gang, Mingheng Zhang, Tong Liu, Zhixun Lan 📄 J. Mar. Sci. Eng. (JMSE), 2024 · Vol. 12(3), 372 · 29 pp 🔗 10.3390/jmse12030372 ✓ CC BY 4.0

الملخص

يُعد اتخاذ قرار تفادي التصادم الآلي للسفن تحديًا حرجًا في تطوير السفن الذاتية ومحورًا رئيسيًا للبحث في مجال السلامة البحرية، إذ تقلل استراتيجيات تفادي التصادم الفعالة والمنهجية بشكل كبير من مخاطر التصادم وتضمن الملاحة الآمنة. تطور هذه الدراسة أسلوبًا آليًا لاتخاذ قرار تفادي التصادم متعدد السفن قائمًا على التعلم المعزز العميق (DRL)، وتنشئ نموذجًا لسلوك السفن في اتخاذ القرار. وعند تصميم دالة المكافأة لفضاء الفعل المستمر، التُزمت معايير «اتفاقية الأنظمة الدولية لمنع التصادم في البحر» (COLREGs)، مع مراعاة مخاطر التصادم في مختلف حالات المواجهة، وممارسات الملاحة الواقعية، والتعقيدات الملاحية. ولتمكين الخوارزمية من التمييز الدقيق بين مرحلة تفادي التصادم ومرحلة استئناف الملاحة في حالات المواجهة المتنوعة، أُدرج «اتخاذ قرار تفادي التصادم» و«اتخاذ قرار استعادة المسار» كمتغيرات حالة في تصميم مجموعة الحالات، وعُرّفت دوال الهدف الخاصة بكل منهما. ولتعزيز أداء الخوارزمية، دُمجت تقنيات مثل استنساخ السلوك والشبكات المتبقية (residual networks) ووحدات المعالجة المتوازية ثنائية النواة (CPU-GPU). ومن خلال تجارب محاكاة في بيئة Imazu التدريبية المحسّنة، تأكدت عملية الأسلوب مع مراعاة تأثيرات الرياح والتيارات المحيطية، وأظهرت النتائج أن الخوارزمية المقترحة تحقق اتخاذ قرار فعال لتفادي التصادم في طيف من حالات مواجهة السفن، مما يدل على كفاءتها وقدرات تعميم متينة.

الكلمات المفتاحية: اتخاذ قرار تفادي التصادم الآلي؛ حالات مواجهة متعددة السفن؛ التعلم المعزز العميق؛ COLREGs.

1. المقدمة

مع عولمة الاقتصاد العالمي، ازداد عدد السفن المستخدمة في النقل البحري بشكل كبير، مما جعل الممرات المائية أكثر ازدحامًا ورفع احتمالات التصادم. ورغم أن اتفاقية COLREGs [1] وضعت قواعد ملزمة لتفادي التصادم، فإن تطبيقها الآلي على السفن الذاتية يبقى صعبًا في المواجهات متعددة السفن، حيث تتفاعل عدة سفن هدف مع السفينة المعنية (OS) في آن واحد وتتداخل التزامات الإفساح والثبات.

قدمت الأساليب التقليدية (الحقول الكامنة الاصطناعية، والتحسين، والأنظمة الخبيرة) حلولًا جزئية، لكنها تعاني ضعف التكيف مع البيئات الديناميكية والحاجة إلى نمذجة دقيقة مسبقة. في المقابل، يتعلم التعلم المعزز العميق سياسات القرار بالتجربة المباشرة، وقد أظهرت دراسات سابقة (كخوارزميات DQN وDDPG وPPO [24، 30]) نجاحًا في سيناريوهات سفينة–لسفينة، غير أن معظمها اقتصر على مواجهات ثنائية ولم يعالج التعقيد الكامل للمواجهات متعددة السفن مع الامتثال الصارم لـ COLREGs واستئناف الملاحة بعد المناورة.

تعالج هذه الورقة هذه الفجوة عبر أسلوب تفادي تصادم متعدد السفن قائم على خوارزمية PPO [24] بفضاء فعل مستمر، يسهم بثلاث نقاط: (1) تصميم مجزأ لدالة المكافأة يميز مرحلة تفادي التصادم عن مرحلة استئناف الملاحة مع دمج مخاطر التصادم وحالات المواجهة وقواعد الملاحة؛ (2) إدراج متغيرات قرار التفادي واستعادة المسار في مجموعة الحالات؛ (3) تحسينات خوارزمية (استنساخ السلوك، والشبكات المتبقية، والمعالجة المتوازية CPU-GPU) مع التحقق في بيئة Imazu [41] المحسنة تحت تأثير الرياح والتيارات. وتنظم بقية الورقة على النحو التالي: القسم 2 يستعرض عملية تفادي التصادم ونموذج نطاق السفينة، والقسم 3 يعرض الأسلوب، والقسم 4 يحلل المحاكاة، والقسم 5 يخلص إلى النتائج.

2. عملية تفادي التصادم: COLREGs ونموذج نطاق السفينة

تحلل الورقة قواعد COLREGs ذات الصلة (القواعد 13–17 [1]: التجاوز، والمواجهة المباشرة، والتقاطع، والتزامات السفينة المفسحة والسفينة الثابتة) لاشتقاق سلوكيات ملاحية قابلة للترميز في دالة المكافأة، بحيث يُكافأ الالتزام بالقاعدة المناسبة لكل حالة مواجهة ويُعاقب مخالفتها. كما تُستخدم مؤشرات مخاطر التصادم الكلاسيكية (DCPA وTCPA ومسافة الاقتراب) لقياس الخطر كميًا عبر الزمن.

ويُبنى نموذج نطاق السفينة [35] (ship domain) — المنطقة الآمنة المحيطة بالسفينة التي يجب ألا يقتحمها الآخرون — على نموذج Goodwin الإهليلجي مع تكييف أبعاده حسب طول السفينة وسرعتها وحالة المواجهة، ليكون حدًا موضوعيًا لتقييم نجاح التفادي: فاختراق النطاق يعني فشل المناورة ويستوجب جزاءً في دالة المكافأة.

وتُدمج هذه المكونات في إطار قرار مرحلي: تراقب السفينة المعنية باستمرار مؤشر مخاطر التصادم، فإذا تجاوز عتبة دخلت مرحلة التفادي وطبقت مكافآت الامتثال والخطر، وإذا زال الخطر انتقلت إلى مرحلة استئناف الملاحة حيث تُكافأ العودة الفعالة إلى المسار والوجهة، مع آلية حكم مدمجة تقرر متى يكون الاستئناف آمنًا في المواجهات متعددة السفن.

3. الأسلوب: نمذجة التعلم المعزز العميق ودالة المكافأة

صُمم وكيل PPO [24] بفضاء فعل مستمر (تغير الدفة والدفع) وفضاء حالة يشمل الموضع والسرعة والاتجاه النسبية للسفن الهدف، ومؤشرات DCPA/TCPA، وحالة COLREGs للمواجهة، ومتغيرات «قرار التفادي» و«قرار استعادة المسار» التي تميز المرحلتين. واعتُمدت شبكات ممثل–ناقد بمعمارية متبقية (residual) مع تهيئة متعامدة وقص التدرج، وتوزيع بيتا محدود لإخراج الأفعال، وتطبيع المزايا (GAE)، وتوسيط مكافأة لدقة التدريب.

جوهر الأسلوب هو دالة المكافأة المجزأة normalized إلى النطاق [−1, 1]: (1) مكافأة مؤشر مخاطر التصادم (CRI) المبنية على DCPA/TCPA واختراق نطاق السفينة؛ (2) مكافأة حالة المواجهة التي تكافئ السلوك المطابق لقاعدة COLREGs المناسبة (إفساح يمينًا في التقاطع، وتغير يميني في المواجهة المباشرة، وحظر التجاوز الخطر)؛ (3) مكافأة الهدف والتصادم التي تكافئ التقدم نحو الوجهة وتعاقب التصادم بشدة؛ (4) مكافأة قواعد الملاحة التي تعاقب السرعات والمنعطفات غير الآمنة؛ (5) مكافأة الاستئناف التي تكافئ العودة الفعالة إلى المسار المخطط بعد زوال الخطر. وفي المواجهات متعددة السفن يُجمع مجموع المكافآت عبر السفن الهدف كهدف تحسين لتدريب الشبكة.

وعُزز التدريب بثماني حيل تحسين: تطبيع المزايا وحساب الحالة، وإخراج الأفعال بتوزيع بيتا، وضبط epsilon لمحسن Adam عند 1×10⁻⁵، والتهيئة المتعامدة، وقص التدرج، وإعادة قياس المكافأة، وحد أنتروبيا السياسة للاستكشاف، وتضاؤل معدل التعلم الخطي — إضافة إلى استنساخ السلوك لتسريع البداية ووحدة معالجة متوازية CPU-GPU لتسريع المحاكاة. ودُرب الوكيل 4000 حلقة في بيئة Imazu المحسنة (22 حالة مواجهة معيارية موسعة إلى سيناريوهات متعددة السفن مع رياح وتيارات).

وللمقارنة العادلة، قُيمت ثلاثة وكلاء: PPO الكلاسيكية، وPPO بوحدة متوازية ثنائية النواة، وخوارزمية PPO-Max المقترحة بالوحدة المتوازية، حيث أظهرت منحنيات المكافأة أن PPO-Max حققت أسرع تقارب وأعلى مكافأة تراكمية وأدنى معدل تصادم عبر حالات Imazu، مما يؤكد فعالية دمج حالات المواجهة والعوامل الملاحية في دالة المكافأة لتوجيه السفينة المعنية نحو الامتثال لـ COLREGs.

4. المحاكاة والنتائج والمناقشة

صُممت تجارب التفادي على مشكلة Imazu [41] — مجموعة الحالات المعيارية لاختبار قرارات تفادي التصادم — بعد تحسينها لتشمل مواجهات متعددة السفن وتأثيرات الرياح والتيارات المحيطية. وقورن أداء الوكلاء الثلاثة عبر منحنيات المكافأة ومعدلات التصادم والامتثال للقواعد، فانخفض معدل التصادم لجميع الوكلاء بعد 4000 حلقة تدريب، مع تفوق واضح لخوارزمية PPO-Max في سرعة التقارب والاستقرار.

أظهرت النتائج أن الأسلوب المقترح يتعامل بفعالية مع مختلف حالات المواجهة (المواجهة المباشرة، والتقاطع من اليمين واليسار، والتجاوز، والمواجهات الثلاثية) [27]، ملتزمًا بالتزامات الإفساح والثبات الصحيحة ومستأنفًا الملاحة بكفاءة بعد زوال الخطر. كما أظهرت الاختبارات قدرة تعميم جيدة على سيناريوهات لم تُرَ أثناء التدريب، بفضل دمج ممارسات الملاحة الواقعية وتعقيداتها في تصميم المكافأة والحالة.

وتناقش الورقة أن التحسينات (استنساخ السلوك للتوجيه المبكر، والشبكات المتبقية لاستقرار التدريب العميق، والتوازي CPU-GPU للكفاءة) كانت حاسمة للأداء، وأن التطبيع إلى [−1, 1] وازن تأثير المكافآت المتنافسة. ومن القيود: الاعتماد على بيئة محاكاة مثالية جزئيًا، وافتراض معلومات كاملة عن السفن الهدف، والحاجة إلى تحقق واقعي على متن سفن فعلية مع ضجيج المستشعرات وحركة بشرية غير متوقعة.

5. الخاتمة

قدمت الدراسة أسلوب تفادي تصادم للسفن بخوارزمية DRL ذات فضاء فعل مستمر، مع دوال مكافأة مصممة لمختلف حالات المواجهة بما يتوافق مع COLREGs، ومراعاة مخاطر التصادم والأعراف الملاحية الواقعية واستئناف الملاحة. وفي المواجهات متعددة السفن، تضمن آلية حكم لتقييم الخطر وتقرير استئناف الملاحة، مدعومة بمتغير استئناف الملاحة الأحدث ضمن مجموعة الحالات.

حسّنت الدراسة خوارزمية DRL بتقنيات استنساخ السلوك والشبكات المتبقية والمعالجة المتوازية CPU-GPU، فتعزز الأداء والكفاءة التشغيلية بشكل كبير. وأكدت نتائج مشكلة Imazu فعالية دمج حالات المواجهة والعوامل ذات الصلة في دالة المكافأة لتوجيه السفينة المعنية نحو الامتثال لـ COLREGs، وتخطط الأعمال المستقبلية للتحقق الواقعي ودمج معلومات استشعار غير مكتملة وضجيجة.

Abstract

Automatic collision avoidance decision making for vessels is a critical challenge in the development of autonomous ships and has become a central point of research in the maritime safety domain. Effective and systematic collision avoidance strategies significantly reduce the risk of vessel collisions, ensuring safe navigation. This study develops a multi-vessel automatic collision avoidance decision-making method based on deep reinforcement learning (DRL) and establishes a vessel behavior decision model. When designing the reward function for continuous action spaces, the criteria of the "Convention on the International Regulations for Preventing Collisions at Sea" (COLREGs) were adhered to, taking into account the vessel's collision risk under various encounter situations, real-world navigation practices, and navigational complexities. Furthermore, to enable the algorithm to precisely differentiate between collision avoidance and the navigation resumption phase in varied vessel encounter situations, this paper incorporated "collision avoidance decision making" and "course recovery decision making" as state parameters in the state set design, from which the respective objective functions were defined. To further enhance the algorithm's performance, techniques such as behavior cloning, residual networks, and CPU-GPU dual-core parallel processing modules were integrated. Through simulation experiments in the enhanced Imazu training environment, the practicality of the method, taking into account the effects of wind and ocean currents, was corroborated. The results demonstrate that the proposed algorithm can perform effective collision avoidance decision making in a range of vessel encounter situations, indicating its efficiency and robust generalization capabilities.

Keywords: automatic collision avoidance decision making; multi-ship encounter situations; deep reinforcement learning; COLREGs.

1. Introduction

With the globalization of the world economy, the number of ships used for marine transportation has increased significantly, leading to more congested waterways and higher collision likelihood. Although COLREGs [1] established binding collision-avoidance rules, their automated application on autonomous vessels remains difficult in multi-vessel encounters, where several target ships interact with the own ship (OS) simultaneously and give-way/stand-on obligations overlap.

Traditional approaches (artificial potential fields, optimization, expert systems) offered partial solutions but suffer weak adaptation to dynamic environments and demand precise prior modeling. Deep reinforcement learning, by contrast, learns decision policies through direct trial, and prior studies (DQN, DDPG, PPO algorithms [24, 30]) succeeded in ship-to-ship scenarios — yet most were limited to pairwise encounters and did not address the full complexity of multi-vessel encounters with strict COLREGs compliance and post-maneuver navigation resumption.

This paper fills the gap with a multi-vessel avoidance method based on the PPO algorithm [24] with a continuous action space, contributing three points: (1) a staged reward design separating the avoidance phase from the navigation-resumption phase while fusing collision risk, encounter situations, and navigation rules; (2) inclusion of avoidance-decision and course-recovery-decision variables in the state set; (3) algorithmic enhancements (behavior cloning, residual networks, CPU-GPU parallel processing) validated in an enhanced Imazu environment [41] under wind and currents. The remainder is organized as follows: Section 2 reviews the avoidance process and ship domain model, Section 3 presents the method, Section 4 analyzes simulations, and Section 5 concludes.

2. Collision Avoidance Process: COLREGs and the Ship Domain Model

The paper analyzes the relevant COLREGs rules (Rules 13–17 [1]: overtaking, head-on, crossing, give-way and stand-on obligations) to derive encodable navigational behaviors for the reward function, rewarding compliance with the applicable rule per encounter situation and penalizing violations. Classical collision-risk indicators (DCPA, TCPA, approach distance) quantify risk over time.

A ship domain model — the safety zone around a vessel others must not violate — is built on Goodwin's [35] elliptical model with dimensions adapted to ship length, speed, and encounter situation, serving as an objective criterion for maneuver success: domain penetration means maneuver failure and incurs a reward penalty.

These components are fused into a staged decision framework: the OS continuously monitors the collision risk index, entering the avoidance phase with compliance/risk rewards once a threshold is crossed, and switching to the navigation-resumption phase once risk clears, where efficient return to route and destination is rewarded — with an embedded judgment mechanism deciding when resumption is safe in multi-ship encounters.

3. Method: DRL Modeling and Reward Design

A PPO agent [24] was designed with a continuous action space (rudder and thrust changes) and a state space covering relative position, speed, and heading of target ships, DCPA/TCPA indicators, the COLREGs encounter status, and the "avoidance decision" and "course recovery decision" variables distinguishing the two phases. Residual actor–critic networks with orthogonal initialization and gradient clipping, a bounded Beta distribution for action outputs, advantage normalization (GAE), and reward scaling were adopted for training accuracy.

The core is the staged reward function normalized to [−1, 1]: (1) a collision risk index (CRI) reward built on DCPA/TCPA and ship-domain penetration; (2) an encounter-situation reward for behavior matching the applicable COLREGs rule (starboard give-way in crossing, starboard alteration head-on, prohibiting dangerous overtaking); (3) a target-and-collision reward for progress toward destination with heavy collision penalties; (4) a navigation-rules reward penalizing unsafe speeds and turns; (5) a resumption reward for efficient return to the planned route after risk clears. In multi-ship encounters, summed rewards across target ships serve as the network-training optimization objective.

Training was boosted with eight optimization tricks: advantage/state normalization, Beta-distributed action outputs, Adam eps of 1×10⁻⁵, orthogonal initialization, gradient clipping, reward scaling, a policy-entropy term for exploration, and linear learning-rate decay — plus behavior cloning for a warm start and CPU-GPU parallel processing to accelerate simulation. The agent was trained for 4,000 episodes in the enhanced Imazu environment (the 22 standard encounter cases extended to multi-vessel scenarios with wind and currents).

For fair comparison, three agents were evaluated: classic PPO, PPO with a dual-core parallel module, and the proposed PPO-Max with the parallel module; reward curves showed PPO-Max achieving the fastest convergence, highest cumulative reward, and lowest collision rate across Imazu cases — confirming that embedding encounter situations and navigational factors into the reward function guides the OS toward COLREGs compliance.

4. Simulation, Results, and Discussion

Avoidance experiments were designed on the Imazu problem [41] — the benchmark case set for testing collision-avoidance decisions — enhanced with multi-vessel encounters and wind/ocean-current effects. The three agents were compared via reward curves, collision rates, and rule compliance; all agents' collision rates fell after 4,000 training episodes, with PPO-Max clearly superior in convergence speed and stability.

Results show the proposed method handles diverse encounter situations effectively (head-on, starboard/port crossing, overtaking, three-ship encounters) [27], honoring correct give-way/stand-on obligations and resuming navigation efficiently after risk clears. Tests also showed good generalization to scenarios unseen during training, thanks to embedding real-world navigation practices and complexities into the reward and state design.

The paper discusses that the enhancements (behavior cloning for early guidance, residual networks for deep-training stability, CPU-GPU parallelism for efficiency) were critical to performance, and that normalization to [−1, 1] balanced competing reward terms. Limitations include reliance on a partly idealized simulation environment, assumed complete target-ship information, and the need for real-world validation aboard actual vessels with sensor noise and unpredictable human traffic.

5. Conclusions

The present study proposes a ship collision-avoidance method using a DRL algorithm with a continuous action space. To ensure optimal performance, appropriate reward functions were designed for different encounter situations in compliance with COLREGs. Furthermore, the reward function was tailored to account for ship collision-avoidance risks, actual ship navigation norms, and navigation resumption. In multi-ship encounters, the approach incorporates a judgment mechanism to assess ship danger and determine whether navigation should be resumed, supported by the latest navigation-resumption variable in the algorithm's state set.

The study innovated improvements to the DRL algorithm — behavior cloning, residual networks, and CPU-GPU dual-core parallel processing — significantly enhancing performance and operational efficiency. Results on the Imazu problem confirm the effectiveness of incorporating encounter situations and relevant factors into the reward function, guiding the OS to adhere to COLREGs; future work plans real-world validation with incomplete, noisy sensing information.

References (selected)

  1. W. Xie et al., "Optimizing Multi-Vessel Collision Avoidance Decision Making for Autonomous Surface Vessels: A COLREGs-Compliant Deep Reinforcement Learning Approach," J. Mar. Sci. Eng., vol. 12, no. 3, 372, 2024.
  2. [15] C. J. C. H. Watkins and P. Dayan, "Q-learning," Mach. Learn., vol. 8, pp. 279–292, 1992.
  3. [24] J. Schulman et al., "Proximal policy optimization algorithms," arXiv:1707.06347, 2017.
  4. [41] Y. Imazu and T. Koyama, "The determination of collision avoidance action," J. Japan Inst. Navigation, vol. 70, 1984 (Imazu problem benchmark).
  5. [35] E. M. Goodwin, "A statistical study of ship domains," J. Navig., vol. 26, p. 130, 1973.
  6. [27] L. Zhao and M. I. Roh, "COLREGs-compliant multiship collision avoidance based on deep reinforcement learning," Ocean Eng., vol. 191, 106436, 2019.
  7. [30] R. Sawada, K. Sato, and T. Majima, "Automatic ship collision avoidance using deep reinforcement learning with LSTM in continuous action spaces," J. Mar. Sci. Technol., vol. 26, pp. 509–524, 2021.
  8. [1] IMO, "Convention on the International Regulations for Preventing Collisions at Sea (COLREGs)," 1972.