由於政府大力推動休閒產業,而電腦遊戲具有高度的互動性以及整合各式媒體的能力,電腦遊戲擬真的影像與具備臨場感的聲音效果,能帶給玩家身歷其境的遊戲體驗,使得電腦遊戲已經成為現代人們重要的一項休閒娛樂活動,也因此帶動遊戲產業更加蓬勃發展。近幾年遊戲的發展,由於電腦繪圖技術的突飛猛進,因此遊戲的開發團隊大多把重心投入電腦繪圖的領域,而忽略了遊戲的本質,這個問題漸漸地受到遊戲公司的重視,所以許多的遊戲公司已將注意力放在提升遊戲的人工智慧上,期望具有思考且多變的人工智慧,可以製作出更具遊戲性的電腦遊戲。針對電腦遊戲人工智慧的應用,較適合運算速度較快且較為穩定的演算法,粒子群最佳化演算法(Particle Swarm Optimization)在人工智慧領域中擁有相當不錯評價,其特點為運算與收斂速度較快且穩定,是一項新興的最佳化機器學習技術。在本文中我們提出一種團隊策略的學習方法,可以很容易訓練出具有效率的團隊,訓練過程中不需要大量的訓練資料以及費時的運算,更適合遊戲環境的應用,並且可以輔助遊戲的人工智慧設計師調整行為參數,節省測試不同參數組合的時間,增加遊戲開發的效率。最後,我們將所提出的演算法實際套入雷神之鎚3遊戲中之單旗搶旗模式中,結果顯示我們所創造出來的團隊,與原始的人工智慧相比較,在遊戲中表現的確較為出色。 Computer games have highly interactive ability and can integrate various media. Computer games provide truly images and surround sound effects that give the player a wonderful experience. Now playing computer games becomes one of most popular entertainment. Therefore, it let the game industry develop more quickly.Because the technology of computer graphics improve very quickly recently year, many computer games develop teams put a lot of effort in this area. It makes them ignore the core of game. So many computer companies find this problem and change their target. They become to pay their attention to the game’s AI. They hope the smart and various AI can make the computer game more interesting.For the application of computer game AI, the computation must be quick and stable. Particle Swarm Optimization (PSO) has pretty good evaluation in Artificial Intelligence. This method has three features: calculation fast, convergence fast, and stable. It is a new optimization and machine learning technology. In this paper we propose a strategy of learning, and it is more easily to train the efficiency of the team. Training process does not need a lot of training materials and time-consuming operation; it is more suitable for the environment of the game. Supplementary game designers can adjust the artificial intelligence and behavior parameters, different parameters of the test to save time, increase the efficiency of development of the game.Finally, we put our algorithms into the actual game Quake III-One flag CTF mode. Results indicate that the team we created compared with the original artificial intelligence, indeed more outstanding performance in the game.