Peter and Paul play the following game. First, Peter chooses some positive integer $a$ with the sum of its digits equal to $2012$. Paul wants to determine this number, he knows only that the sum of the digits of Peter’s number is $2012$. On each of his moves Paul chooses a positive integer $x$ and Peter tells him the sum of the digits of $|x - a|$. What is the minimal number of moves in which Paul can determine Peter’s number for sure?
1. **Initial Setup and Problem Understanding**:
   - Peter chooses a positive integer \( a \) such that the sum of its digits is \( 2012 \).
   - Paul needs to determine \( a \) by querying the sum of the digits of \( |x - a| \) for chosen \( x \).
   - We need to find the minimal number of moves \( x \) that Paul needs to determine \( a \) for sure.

2. **General Strategy**:
   - Let \( N \) denote Peter's number.
   - Paul can start by picking \( x = 1 \). The sum of the digits of \( |1 - N| \) will be \( 2012 - 1 + 9k \), where \( k \) is the number of trailing zeros in \( N \).
   - This allows Paul to determine the position of the rightmost nonzero digit of \( N \).

3. **Inductive Step**:
   - Suppose Paul has determined the position of the rightmost nonzero digit. He can then adjust his future guesses by \( 10^k \), effectively reducing the problem to a number with a sum of digits \( 2011 \).
   - By induction, Paul can continue this process, reducing the sum of the digits by 1 each time, until he determines \( N \).

4. **Proof of Necessity**:
   - Consider Peter's number \( N \) of the form:
     \[
     N = 1 \underbrace{0 \dots 0}_{a_1} 1 \underbrace{0 \dots 0}_{a_2} 1 \underbrace{0 \dots 0}_{a_3} \dots 1 \underbrace{0 \dots 0}_{a_{2012}}
     \]
   - Even if Peter announces this form, Paul must determine each \( a_i \).
   - On each turn, if Paul's guess is less than \( 10^{a_n} \), he will only learn the value of \( a_n \).
   - This process must be repeated for each \( a_i \), requiring at least \( 2012 \) moves.

5. **Conclusion**:
   - Therefore, the minimal number of moves Paul needs to determine Peter's number for sure is \( 2012 \).

The final answer is \(\boxed{2012}\).