I was under the impression that delta is a random variable drawn from the range [ -5, 5], and hence it can not be a rational number as transcendental numbers are infinitely more dense. My algorithm was designed for work for that case. I see that delta is meant to be an arbitrarily chosen number from [ -5, 5].
Under this case, for certain rational values of delta, it is not possible to uniquely identify X, delta, and odd pile. Back to the drawing board.