Yes, we've had things we thought could show intelligence come up before. Computers beating grand masters at chess or at go are milestones. Assuming we don't come up against some fundamental aspect of technology that prevents us from building ever more powerful computers, we will get to the point where AI will be able to do more and more. I don't think it's a forgone conclusion that these AI will take jobs. It's up to politicians and the people behind the companies build AI to decide how they will be used. However, assuming nothing is done, I can quite easily see the 20% to 30% of jobs going. Everything we've seen with the development of computer technology shows us it will happen.
I've noticed several design suggestions in your code.