There are three conditions that lead to a draw:

  1. The same position appears 3 times.
  2. Both players agree on a draw.
  3. If no stone is removed for 30 moves (or 15 moves if both players are in the flight phase).