Proportional integral derivative (PID) controller tuning is an area of interest for researchers in many disciplines of science and engineering. This paper presents a new algorithm for PID controller tuning based on a combination of the foraging behavior of E coli bacteria foraging and Particle Swarm Optimization (PSO). The E coli algorithm depends on random search directions which may lead to delay in reaching the global solution. The PSO algorithm may lead to possible entrapment in local minimum solutions. This paper proposed a new algorithm Bacteria Foraging oriented by PSO (BF-PSO). The new algorithm is proposed to combines both algorithms’ advantages in order to get better optimization values. The proposed algorithm is applied to the problem of PID controller tuning and is compared with conveniently Bacterial Foraging algorithm and Particle swarm optimization. Categories and Subject Descriptors: I.2 [Computing Methodologies]: ARTIFICIAL INTELLIGENCE; I.2.8 [Problem Solving, Cont...