- Edited
It's clearly a violation of the license, just like you can't steal people's images and use it for machine learning. Though the image thing I believe stood up in court. No one has tried the AI programming yet, at least not on this level, so it has not been legally tested. But if the FSF does a lawsuit, they will surely win.
That said, most of my code is with permissive licenses, and I would be okay with anyone learning from it, people or machines. I mostly put the license to avoid legal liability, otherwise I would do public domain. I really don't care what anyone does with my code.