自 2019 年底以來,隨著 2019 新型冠狀病毒肺炎(COVID-19)在全球迅速蔓延,因此,對防疫物資(如,醫療級口罩)的需求急遽增加,若不適當控管口罩數量,將會導致存貨不足及哄抬價格現象產生。台灣早在疫情大流行前,醫療級口罩就由政府集中管理,並以固定價格出售給所有民眾。在這種情況下,優化供應鏈是一個重要問題,例如,如果政府在某個地區分配了太多的口罩,其他地區的民眾可能會遭受資源短缺的困擾。對於有效預防 COVID-19 而言,至關重要的是,將口罩分配到每個區域的量應接近每日消耗量。 在本研究中,我們提出一個醫療級口罩分配系統。提出的系統採用強化學習框架,該框架以口罩的日常供需為環境,以 DDPG 演算法進行代理人更新,以每日缺貨量為獎勵和懲罰。我們透過實驗將此系統與用於供應鏈需求預測的機器學習方法進行了比較,結果表明,本研究所提出的系統在環境中獲得了更多獎勵。另外,我們的強化學習框架在不同的口罩總數下具有一致的性能。 ;Coronavirus Disease 2019 (COVID-19) has spread rapidly around the world since the end of 2019. As a result, the demand for epidemic prevention materials (e.g., medical-grade masks) has increased drastically. If the masks are not properly controlled, it will lead to understock and price gouging. In Taiwan, since the very early stage of pandemic, the medical-grade masks have been collected and managed by the government, and have been sold to all residents for a fixed price. In this case, the supply chain optimization becomes an important issue. For instance, if the government allocates too many masks to a region, the residents in other regions may suffer from resource shortage. It is crucial that the masks are distributed to each region in the amount close to the daily consumption for efficient COVID-19 prevention. In this study, we propose a robust system for the allocation of medical-grade masks. The proposed system adopts the reinforcement learning framework, which takes the daily supply and demand of masks as the environment, the DDPG algorithm for agent updates, and the daily shortage as rewards and punishments. The proposed system is compared with the traditional machine learning approach used for supply chain demand forecasting through experiments, and the results indicate that the proposed system achieves more rewards in the environment. Moreover, our reinforcement learning framework has a consistent performance under different total numbers of masks.