In this paper, a new pitch synchronous FO-algorithm is described. The task of detecting pitch periods in the speech signal is solved with a search for an optimal path through a space of pitch period hypotheses. The search is efficiently implemented by dynamic programming (DP). The DP cost function is computed with an automatically trained artificial neural network (ANN) which combines the outputs of heuristic functions measuring the similarity of adjacent period hypotheses. With this algorithm a coarse error rate of 4,75% on a German speech database is achieved. It outperforms the DPFO algorithm, which itselfs outperforms two "conventional" algorithms.