本研究主要將應用多代理人機制,透過實際開發塔防遊戲為例,改進遊戲的人工智能。過去傳統的塔防遊戲都是使用固定的敵方行走路徑,這樣的設計除了遊戲的挑戰性有限外,也缺少玩家運用策略的變化性。因此,此研究將改以使用 A* 最短路徑演算法來改善基本的路徑搜索方式,再透過多個遊戲物件代理人之間互相的溝通及協調藉以產生路徑的變化進一步改良路徑搜尋演算法,使敵方的路徑選擇和整體智能夠有大幅度的提昇。 This article uses the multi-agent system coordination mechanism and implements the characteristics of agents to construct and add intelligence to a computer program. By redesigning and developing a tower defense game as an example, this article presents models for coordination and message transmission between agents and creates two new methods to correct the path of the enemies and dynamically generate agents, which largely improves the intelligence of the enemies and towers in the game. Overall, the system changed traditional game rules and made a real-time strategy game more challenging.