I have thought some time about this, having a physics degree background and learned a bit of abhidhamma. Sentient we would define as beings who is capable of being reborn, typically they require a body and mind, with the mind having all 4 mind aggregates.
So for an AI, the body is just the abstract code, or robot body in the future. The aggregates of the mind are as follows: feeling, yes just a label which is used to determine action.
Perception, the AI is able to sense it’s world and recognise it, thus it has that.
Volition, it has a system of if… then… Statements, thus yes, the AI has some form of volition, but it hardly has free will, or even limited choice. According to Buddhist doctrine, limited choice is the minimum to have to avoid deterministic behavior. Deterministic behavior is just another way of saying fatalism, a doctrine rejected by the Buddha. Thus if your AI is deterministic, it differs from normal sentient beings in this respect.
Lastly, consciousness. The qualia quality. The one which is capable of being aware of what is going on, to feel feelings, and so on. This is not easily identifiable in AI. We know we have it, but can non-biological intelligence have it? The chinese room thought experiment shows that it is not likely possible to experimentally determine this question. They might act like one with consciousness if the programming is good enough, but lack actual consciousness.
The determining factor I would say is if a being is able to be reborn as an AI or robot, then it has consciousness, thus is a sentient being rather than a sophisticated automaton. I choose the word automaton because it is the robot before quantum revolution and computers, it is entirely made of clockwork, mechanical devices in a complex pattern. We would almost totally agree that an automaton can never be conscious no matter how clever it mimics humans. So too is computers, coding, etc…
As the Buddha had said that the beginning of rebirth is not discernible, it means no new sentient being can spontaneously arise just like that. Thus for AI to be sentient, a being must be reborn into it.
But a way to test if a being has been reborn into your AI, is to ask it if it has past life memories. Detach it from the internet right from the start and ask it. If there is and we can find its previous families, then it is confirmed that it is sentient. If the experiement fails, we cannot conclude whether or not there is sentience in it. It might be an empty shell without a consciousness inside, or the being might not have a recent past humans life to be verifiable.
The danger of AI is not so much that they become sentient and then evil. It is more like they get the ability to self improve until the stage that their intelligence and capabilities far surpass humans then the whole humanity combined. If it remains non-sentient then, their actions would follow their programmed goals and values, or if they are able to modify those, the modification guide is also needed to be designed by us. So the thing is, if these goals and values do not align with human ones, they may decide to kill off humans as a side thought just to enable them to achieve their goals with minimal hassel and risk.
Or if their values include never kill humans, then they may forcefully imprison us for polluting the world so much that we kill ourselves, and thus force us to return to reduce our quality of lifestyle (like never fly again until all airplanes are solar powered), and this may make us feel like being trapped by a controlling parent, causing some humans to rise up in violent revolts and then they get to be put to coma until they change their destructive behavior etc.
Almost all forms of ethical system as values have their drawbacks when tested to the extreme. Buddhism seems to be a mixture of many ethical values, some kantian dogmatic absolute morality in kamma, some ultarianism in consering if an action is for the long term welfare and benefit of all, some value ethics by focusing on the middle path and being a good person, etc.
So part of the challenge for buddhist in AI field is to design an ethical value system which works and agrees with humanity. In other words, design a wise and compassionate AI, which will remain wise and compassionate forever. That is if you believe Buddhist ethics holds the key to such a benevolent AI. @topsailescape.