The combinatorics inherent to the issue of planning legged locomotion can be addressed by decomposing the problem: first, select a guide path abstracting the contacts with a heuristic models; then compute the contact sequence to balance the robot gait along the guide path. While several models have been proposed to compute such path, none have yet managed to efficiently capture the complexity of legged locomotion on arbitrary terrain. In this paper, we present a novel method to automatically build a local controller, or steering method, able to generate a guide path along which a feasible contact sequence can be built. Our reinforcement learning approach is coupled with a geometric condition for feasibility during the training, which improves the convergence rate without inducing a loss in generality. We have designed a dedicated environment and the associated reward function where a classical reinforcement learning algorithm can be run to compute the steering method. The policy takes as inputs a target direction and a local heightmap of the terrain around the robot, to steer the path where new contacts should be created. It is then coupled with a contact generator that creates the contacts to support the robot movement. We demonstrate that the trained policy is able to generate feasible contact plans with a higher success rates than previous approaches and that it generalises to terrains not considered during the training. As a result, the policy can be used with a path planning algorithm to navigate in complex environments.