• thebestaquaman@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      28 minutes ago

      You could argue that there is though, since the genie will grant three wishes. In that case, it operates like

      granted_wishes = 0
      while granted_wishes < 3:
          wish = receive_wish()
          granted = grant_wish(wish)  # True if wish is granted, false otherwise (invalid wish etc)
          if granted:
              granted_wishes = 0
      

      So we get

      1. Do opposite of next -> granted_wishes = 1
      2. Complete 3 -> granted_wishes = 2
      3. Enter time loop (recurse)

      -inner loop-

      1. Do opposite of next (ignored due to outer loop) -> granted_wishes = 0
      2. Ignore 3 -> granted_wishes = 1
      3. Ignore 1 -> enter time loop (recurse)

      -inner loop 2-

      1. Do opposite of next (ignored due to outer loop) -> granted_wishes = 0
      2. Ignore 3 -> granted_wishes = 1
      3. Ignore 1 -> enter time loop (recurse)

      … etc.

      We get an infinite time-loop recursion, because we never reach the third guess in the inner loops.