Competitive Programming with AlphaCode
The example problem (essentially, is T a subsequence of S with deletions of size N) is a classic problem with no doubt dozens of implementations in AlphaCode&#x27;s training set.<p>And yet, what a garbage solution it produces.<p>To illustrate the difference between intelligence and regurgitation, someone tell me what CoPilot generates for this:<p><pre><code>  &#x2F;&#x2F; A Go function to swap the sixth bit and seventeenth bit of a 32-bit signed integer.
</code></pre>
Here is a human solution:<p><pre><code>  func swap(x int32) int32 {
      const mask = 1 &lt;&lt; 5
      var (
          xor1 = (x&gt;&gt;11 ^ x) &amp; mask
          xor2 = xor1 &lt;&lt; 11
      )
      return x ^ xor1 ^ xor2
  }
</code></pre>
CoPilot cannot reason numerically like this (understand &quot;seventeenth bit&quot; and &quot;sixth bit&quot; and generate the right code for that combination). It needs to understand the size of the gap between the bits, i.e., 11, and that&#x27;s too hard.