The invention discloses a directional antenna ad hoc network neighbor discovery method based on an SARSA (lambda) algorithm, and the method comprises the following steps: 1, enabling each node to initialize an own Q matrix at the beginning of a neighbor discovery process, and randomly selecting an initial state and an initial action; 2, enabling the node to enter a transmission mode and a receiving mode to carry out corresponding steps, and adopting different steps; 3, employing a greedy strategy to select the action of the next time slot; 4, calculating a one-step prediction error; 5, for all states and actions, updating a Q matrix according to a one-step prediction error; 6, entering the next time slot, returning to the step 2, and stopping until the neighbor discovery process is finished. Compared with a complete random algorithm, the ad hoc network neighbor discovery method disclosed by the invention can accumulate experience in scanning and adaptively find sectors with undiscovered neighbors, so the neighbor discovery speed is accelerated.