We conduct an active flow control study on the mass flow rate of synthetic jets on the upper and lower surfaces of a square cylinder using a deep reinforcement learning algorithm, with a focus on investigating the influence of the position and width of the synthetic jets on the flow control performance. At Reynolds numbers (Re) of 100 and 500, it is found that our proposed method significantly reduced the lift and drag coefficients of the square cylinder and completely suppressed vortex shedding in the wake. In particular, at Re = 100, placing the synthetic jets near the tail corner was beneficial for reducing drag, with a maximum drag reduction rate of 14.4%. When Re = 500, positioning the synthetic jets near the leading edge corner resulted in a maximum optimal drag reduction effect of 65.5%. This indicates that locating the synthetic jet at the main flow separation point can achieve optimal control. Furthermore, we notice that when the synthetic jets are positioned near the tail corner, vortex shedding can be completely suppressed. Additionally, a narrower width of the synthetic jets can enhance flow instability and increase the cost of flow control.