This study explores the use of a reinforcement learning (RL)-based active flow control strategy to reduce the drag of a transversely oscillating cylinder confined between two walls. We incorporate wake kinematic information of the oscillating cylinder from direct numerical solution into the agent to actively adjust the oscillating amplitude. Our findings reveal two strategies that significantly improve drag reduction. First, the oscillating frequency should be chosen within the lock-in region. Second, placing probes in the active region of turbulent kinetic energy enables the full utilization of physical information for achieving more efficient and stable control. The results show that an effective control strategy can reduce the drag by 8.4% compared to the case of stationary cylinder at Re = 200. We identify three characteristics of the controlled flow that contribute to drag reduction: an elongated recirculation zone, an increased energy transport coefficient, and asymmetric cylinder oscillation. We observed that this well-behaved controlled flow can be obtained through real-time RL-based control, as it consistently attenuates the asymmetric dynamic mode decomposition modes of the flow. Furthermore, we find that the asymmetry cylinder oscillation synchronizes with the vortex shedding, indicating that the RL-based control can expand the lock-in region.