This paper presents a modified deep Q-network (DQN) algorithm to control the angle of an inverted pendulum system, improving performance by reducing oscillation through a wider range of force outputs. The study utilizes OpenAI/Gym and Keras to demonstrate that the improved DQN outperforms the original method in stabilizing the pendulum. Results show significant enhancements in maintaining the desired angle compared to traditional control techniques.