本研究應用螢火蟲演算法於結構最佳化設計中。螢火蟲演算法是模擬螢火蟲在求偶時使用亮光互相吸引,在空間中尋找最亮光源的特性來尋找問題的最佳解。該法之特點為參數設定少及搜尋範圍廣。螢火蟲演算法將區域中的各初始值模擬為各個螢火蟲個體,賦予各個體初始吸引值並依照光衰公式定義出吸引力關係式而推導出迭代關係式,使各值趨近於最佳解。在研究過程中,吸引力值以及光吸收係數的訂定,必須根據不同的問題做出調整以達到最佳的收斂速度。本研究將ANSYS 有限元素分析軟體中APDL語法與FORTRAN 程式結合成一系統程式,並以數種不同的範例執行結構 最佳化設計。數值範例中將對各種結構做分析與討論。範例中將結構最佳化問題轉為數學函數,再利用螢火蟲演算法對結構系統執行最佳化設計,結果顯示其演算特性能夠在結構最佳化上取得不錯的成效。 Optimum design of structure by firefly algorithm is used in this study. Firefly algorithm is conceptualized fireflies being attracted to each other by flashing light when mating season, and searching the brightest one in space area. The advantages of the firefly algorithm are fewer parameters needed to be adjusted and extensive searching range efficiently. Firefly algorithm using inverse‐square law to determined iterative function and definition of the attractiveness. The finite element software ANSYS was used as structural analysis tool, and combined with FORTRAN in APDL. Structural optimization problems are converted to a mathematical function, then the algorithm of firefly optimization was applied to the design of Structures. The results of numerical examples showed that the characteristic of firefly algorithm are effective in the process of optimum design.