In this study, two new algorithms named Rao-1 and Rao-2 are presented for the optimization of 2D truss structures. The main purpose of the optimization algorithms, used in this study, is to minimize the total weight of the truss structure. When carrying out this purpose, the allowable displacement and stress are taken into account as the constraints. The design variables are the cross-sectional areas of the steel truss bar elements. To calculate the structural response, the finite element analysis is coded in MATLAB. The optimal results obtained in this study are compared with those given in the literature in order to demonstrate the efficiency of the proposed algorithms.