The railgun is an electromagnetic device that converts electrical energy to mechanical energy for accelerating the projectiles to hyper velocities, which is the main reason that railguns are becoming an increasingly popular topic of interest among the military, defense industry and scientific communities. Output force is used for evaluating the performance and the effectiveness of a railgun which is highly depended on the Railgun geometric design parameters. When a new railgun is designed, drawing the geometry, simulation and analysis stages take a long time; this study has aimed to provide an Artificial Intelligence based surrogate model for a railgun design to prevent time consuming at these stages and to make design optimization process computationally efficient. For this reason, in this paper three different rail geometries have been combined and simulated with three different armature types by using Ansys Maxwell which is based on 3-D Finite Element Method. Within the scope of this study; first of all, one of the best rail and armature pair was selected according to the efficiency. Secondly, a dataset with inputs and outputs was created by changing the geometric variables of the selected pair. Thirdly, using this dataset; six different surrogate models were trained, tuned and tested. Railgun’s output force was predicted with minimum symmetric mean absolute percentage error (SMAPE) of 1.89% at the end of tests. Finally, Particle Swarm Optimization (PSO) was carried out with the surrogate model that gave the best result for modelling of a railgun design with 8.0 kNewton required output force. These optimization results were compared with the Ansys simulation outputs and found to be hand to hand. Thus, herein, a computationally efficient method for design optimization of railgun designs has been achieved using surrogate based modelling techniques.