Efficient control of automotive engine idle speed is crucial for achieving better fuel economy and smoother engine running. This paper presents a comparison between proportional-integral-derivative (PID) control and Reinforcement Learning (RL) using the Deep Q-Network (DQN) algorithm as a high-level control method for minimizing idle speed fluctuations caused by changes in engine irregularities, and the response time and accuracy of the throttle control mechanism. In addition to low-level PID control for the throttle valve position, MATLAB/Simulink was employed to build the simulation environment, incorporating an engine model and an electronic throttle body model, and observing the engine's current speed. The results demonstrated the superiority of RL-based control over PID in reducing idle speed fluctuations and enhancing engine performance in simulations and real-world experiments. This study advances automotive engine control strategies.