It's advanced Expert System algorithms
Thank you Alistair for hitting the important points about what is euphorically, unrealistically called 'Artificial Intelligence'. "AI" is just another meme being used by marketing divisions and self-promoting researchers as bait to sell what are actually advanced Expert System algorithms.
https://en.wikipedia.org/wiki/Expert_system
Expert system design was introduced in 1965. It has been slowly advancing thereafter. What has triggered the 'AI' moniker are actually advances in speech recognition (speech, to text, to bits) and the reverse (bits, to text, to speech). Much of the speech recognition work was accomplished by Dragon Systems, starting in 1975. Dragon is currently owned by Nuance. As far as I am aware, all of the current popular 'AI' systems involving speech recognition license base technology from Nuance. Apple and IBM, among others, developed their own speech recognition systems in the 1990s. But they fell by the wayside. It is said the Google and Microsoft have been developing their own speech recognition systems. However, I strongly suspect they both use Dragon technology.
https://en.wikipedia.org/wiki/Dragon_NaturallySpeaking
The general concept of Expert Systems is to take a provided input and efficiently traverse an available database for the best matching output. What has become interesting in recent years has been what's called 'machine learning' whereby the algorithms are able to collect new data and add it to their source database over time in pursuit of providing better and more up-to-date output as answers to input queries.
In other words, there is no 'intelligence' at all apart from that imbued by the euphoric, the meme entranced, marketing executives and researchers in need of academic recognition. We may in fact never be able to create anything that is actually 'intelligent' in the science fiction sense. The first goal of artificial intelligence is to be able to interact with it and not be able to tell if it is human or machine. This is called the Turing test. Thus the connection of AI to Alan Turing. And no, so far there has been no so-called 'artificial intelligence' system capable of passing the Turing test. There have been rumors of such a system for decades. But none of them have qualified. No doubt, with time the term 'intelligence' will be bent and twisted to fit the latest attempt at AI. However, the technology we currently have better qualifies as Artificial Idiocy with the goal of making it as mildly idiotic as possible.
https://en.wikipedia.org/wiki/Turing_test
ETHICS: As ever, technology is a tool for the betterment of mankind. Any technology used instead as a weapon of murder and destruction is no longer a tool but an abomination, a victim of self-destructive, territorial and tribal instincts still persistent in species Homo sapiens sapiens ('wise wise', as we wish we were). I call it Coward Murder Machinery, as currently exemplified by killer military drones controlled by humans from a distance with no danger to themselves. Another step in coward murder machinery will be autonomous drones and other robots whereby their creators and controllers will attempt to dodge responsibility for their outcome. Don't be fooled. Mankind will always be responsible for whatever technology we create, including all its consequences. We will become actual 'sapiens sapiens' when we achieve the wisdom to stop murdering one another for any reason.
Conclusion: Ethics begin and end with the creators, programmers and users of technology, not the technology itself. IOW: Don't blame Hal 9000. Blame its inventors and programmers. Hal 9000 or any other 'AI' is just a tool.
https://en.wikipedia.org/wiki/HAL_9000