These days, in the surface mount technology (SMT) process field, automatic optical inspection (AOI) machines inspect components mounted on the printed circuit board (PCB) by measuring and processing images of the PCB. In this paper, our objective is to find a path that minimizes the cycle time to improve the productivity of AOI machines. Existing research solves the PCB path planning problem from the perspective of the traveling salesman problem. Meta-heuristic methods such as genetic algorithm and ant colony algorithm have been proposed to solve this problem. Moreover, exact solutions can be solved by mixed-integer linear programming. We present a learning-to-search approach to the PCB path planning problem in this work. To achieve this, our proposed look-ahead search called Branch-and-Rollout search (BRS) is used in both train and test time. After pre-training policy and value networks with reference policy initially, we fine-train pre-trained models using BRS. We empirically show that fine-trained models outperform reference policy. Furthermore, BRS using fine-trained policy and value networks gives near-optimal solutions.