-Type 1 Diabetes Mellitus (T1DM) is a worldwide disease. Although a complete cure has not been found yet, an artificial pancreas (AP), also known as a closed-loop insulin therapy, is becoming more important for the treatment of this disease. Controller part of the AP can compute insulin infusion rate that will keep blood glucose concentration (BGC) in normoglycemic ranges for patients with T1DM. In this paper, three different control algorithms are proposed as a controller part of the AP. These control algorithms include genetic algorithm based proportional-integral-derivative (GA-PID) control, artificial bee colony algorithm based PID (ABC-PID) control, and particle swarm optimization algorithm based PID (PSO-PID) control. In silico control studies are implemented through a virtual diabetic patient based on the Stolwijk-Hardy's glucose-insulin regulation model. Simulations are performed to assess control function in terms of tracking BGC profile of a healthy person against to a daily food intake of three meals. In order to demonstrate robustness, sensor noise test is implemented. Simulation results are promising in terms of regulating the daily BGC.