The teaching-learning optimization (TLBO) technique is applied to unbraced steel frames with semi-rigid beam-to-column connections and semi-rigid column-to-base connections. The algorithm for design produces optimized steel frames by choosing appropriate sections from a set of standard steel sections. These standard steel sections, including wide-flange profiles (W), are provided by the American Institute of Steel Construction (AISC). The first example is subjected to the displacement, inter-story drift, and stress constraints of AISC-Load and Resistance Factor Design (LRFD) regulations. In addition, the displacement and stress limitations of the AISC-Allowable Stress Design (ASD) standard and the geometric (size) requirements are implemented in the last two examples. In finite element analysis, optimal designs of three alternative unbraced frames are performed with and without semi-rigid beam-to-column and column-to-base plate connections. All optimization techniques are encoded in the high-level programming language C# version 17.4.4 to integrate with SAP2000 version 22's Open Application Programming Interface (OAPI). The analysis results indicate that the rigidity of connections is determining parameter in the weight optimization of unbraced steel frames.