Could artificial general intelligence harm humanity?
This is a very, very controversial topic. But here's my opinion on the topic:

AI won't harm humanity (at least, to the level that a lot of people think it will).

As Kartik mentioned in his answer, AGI (Artificial General Intelligence) is the concept of AI that's become so "generally" intelligent, that it can do everything we as humans can, and more, but do it better, more efficiently, more accurately, you name it.

I'd say that AGI is (so far) a fictional scenario. Why? Because of the physical limitation of computing that wouldn't let us get there. In order to simulate natural, physical intelligence, you wouldn't be able to use gradient descent, you would need to simulate physical interactions of neurons. Simulating even a single molecule on the fastest supercomputers takes a very long time, because the overhead introduced with taking the real, physical world, transposing it onto mathematics, and running those mathematics on electronics, are too much. So simulating the complete working of just a small cluster of neurons would be almost infeasible.

Then you might ask: "what if we were to get enough computing power in the future?". It's a valid question, however, there's one problem: we're already (possibly) quite close to the physical limit of how small we can get our transistors before Quantum Tunnelling kicks in.

So I'd say it's impossible because of a few key reasons:


Current algorithms are intrinsically guided by human-generated data (even reinforcement learning algorithms need human-engineered rewards to understand what's good and what's bad). Therefore, there's no such thing as a self-guided objective for machine learning today.
Computing power isn't there yet, and most probably, will never get near the level required for AGI.
Humans have an innate bias to "humanize" non-living entities. Language, for example, is a great representation of the way our minds work on a fundamental, subconscious level. When we say "my computer isn't co-operating with me", or something along those lines, we don't realize that computers are big calculators with a screen and lots of predefined operations to run.


One thing I don't disagree with: Machine Learning will replace a lot of jobs - but not nearly as many as you may think! It'll take time - if Tesla eventually comes out with a fully-autonomous semi-truck, it's not like the whole industry will adopt to it overnight. Humans, and our genome, will have time to adapt and evolve overtime. We'll free up more people, over time, to get into fields like healthcare, education, and entertainment. When we don't have the option to get jobs like cashiers, drivers, etc., we'll be forced to get more advanced jobs.

This is just how technology has worked, and will continue to work for as long as humanity exists.

People, however, can use AI/ML for negative purposes and bad things. Face swapping, automated social engineering, etc., are all great examples of this. But with powerful unregulated/illegal technology, comes even more powerful regulated/legal technology.

As pointed out in the comments, transistors are not the only solution. There are alternatives like Quantum Computing, that enable you to remove that mathematical overhead, and directly run your operations on qubits. However, there's still a lot of work to be done to see if technology like AGI or self-guided machine learning is possible even with quantum computers.

None of this is certain - anything I've just mentioned can change in the next few weeks, months, or years.