on-board predicate and neighbours function