We conjecture that if $C$ is a curve of genus $>1$ over a number field $k$ such that $C(k)=\emptyset$, then a method of Scharaschkin (essentially equivalent to the Brauer--Manin obstruction in the context of curves) supplies a proof that $C(k)=\emptyset$. As evidence, we prove a corresponding statement in which $C(\F_v)$ is replaced by a random subset of the same size in $J(\F_v)$ for each residue field $\F_v$ at a place $v$ of good reduction for $C$, and the orders of Jacobians over finite fields are assumed to be smooth (in the sense of having only small prime divisors) as often as random integers of the same size. If our conjecture holds, and if Tate--Shafarevich groups are finite, then there exists an algorithm to decide whether a curve over $k$ has a $k$-point, and the Brauer--Manin obstruction to the Hasse principle for curves over the number fields is the only one.