People tend to talk about "rights" as a sort of thing that people possess, often forgetting the concept's proper origin in identifying the causality of achieving one's interests in a social context.
Reification of Rights
For most normal, everyday situations, it's quite useful to talk about rights as a sort of thing that people "have". I don't want to spend much time dismissing the erroneous view of rights being something that are invented by or granted by society or the intelligentsia. That kind of subjectivist approach has been amply debunked. In that rights are objectively derivable from the facts of reality (viz, human nature), I think the "natural rights" approach is much more interesting to analyze. Most people I've heard adopt this view use phrases such as "inborn rights". Our Declaration of Independence states it as "[men] are endowed by their Creator with certain unalienable Rights". (Let's be generous and interpret "Creator" as being nature itself, so we don't need to get sidetracked by arguments about theology.)
Now, I do think that there's something inherent in human nature that gives rise to rights and that the concept is objectively definable. But when a debate arises about a complex situation involving rights, and I see the conversation going off the rails because folks are talking about rights as a "thing", dropping the context of how rights are derived in the first place, I can't resist jokingly referring to some "rights-secreting gland lurking inside us somewhere", if only we could find it.
Principles as such are statements of causality. All moral principles, properly understood, derive from the requirements of human survival. "If you want to live, then you must..." And there's a lot of meat in there, including what "live" means. (I think it means thrive and live a joyous, happy existence, not merely stave off death.) Tara Smith's Ayn Rand's Normative Ethics: The Virtuous Egoist does a fabulous job of describing certain kinds of moral principles: virtues. But one key point to keep in mind is that there is no such thing as a genuine moral principle that demands your death. (I'm going to set aside the whole issue of "sacrifice", because that's an essay on its own.) Basically, if you find yourself in a concrete, immediate situation where your options are to abide by some (alleged) moral principle or die, it's the alleged moral principle you have to throw out. Morality is for living, not for dying.
In some cases, this is built into the understanding of the principle because, in the ordinary course of human affairs, we encounter these kinds of situations. Take the virtue of honesty, for instance. Honesty is "the best policy" because it achieves one's selfish ends of prospering in reality. Honesty does not require that you tell the truth to a home invader about where your children or jewelry are. Honesty is about refusing to fake reality, and in a social context, refusing to attempt to gain a value through deception. One is not attempting to gain a value by lying to a home invader. (No, "preventing the killing of one's children" is not a "value" in this sense. Let's not get into intellectual gymnastics here. There's a clear difference between the home invasion scenario and lying to your boss to secure a promotion. There may be some difficult situations to untangle, but if you're going to fixate on the grey cases and therefore claim there are no blacks or whites, just stop reading now.)
But my focus here is on rights. And I think that rights are also a statement of causality. Specifically, rights identify the sorts of actions that are permissible or prohibited in a social context, vis-à-vis physical force. (We're going to have to put aside a robust exploration of what constitutes "physical force".)
The statement-of-causality lens becomes clearer when, given an egoistic foundation, you ask yourself why you even need a concept of rights. So my view (and I think this is fundamentally consistent with Objectivism) is that the concept of rights tells you how to conduct yourself so that you can achieve your interests in a social context.
To use a concrete example, the reason that I don't go about murdering other people is not that they have some special thing within them called rights that I would so very much like to not violate, but very selfishly that it undermines my own happiness and prosperity to go about murdering. Now, that might sound sociopathic, but that's also just not how the human mind (emotional mechanism and all) works. No egoist is going about performing some kind of economic calculus on a case-by-case basis to determine whether murder is going to advance his happiness. The phenomenon is more abstract than that: It's a full integration of all of one's experiences interacting with other people, learning the consequences of initiating force, introspecting about the psychological effects, and ultimately subconsciously integrating all that. A (developed) egoist does not desire going about murdering people because he knows in his bones, without even giving it any conscious thought, that it's incompatible with his happiness and prosperity. And his emotional mechanism reflects that: Murdering someone would bring him emotional distress. Now, humans may be "prewired" for some of these dispositions, but raw experience in reality among other people develops and reinforces these dispositions, such as they may exist. (And if they do exist, surely they were an evolutionary adaptation to reflect the reality about what advances survival.) In pattern, this is exactly why we experience other people as ends in themselves and experience caring about their happiness for its own sake. Sure, we can take a step back and think through it "coldly", "logically", "cognitively", "intellectually", "dispassionately": We pursue relationships and care about other people because it benefits us, and we can draw a causal argument that explains it all. But because the mind automatizes these kinds of understandings, that's just not how we experience it on a day-to-day basis. This is basically induction. This is basically how all conceptualization works. This is what people are getting at when they talk about a "moral intuition" or "moral sense", even if they're not super clear on the meaning of those phrases.
So back to rights. I'm going to put it in a stark way to help drive my point home: Other people only have "rights" because it's in my interests to treat them in that way. If my "respecting people's rights" didn't advance my long-term interests in a social context, there would be no such thing as "rights". When I talk about my rights and claim that others must respect them, I'm really saying "It's in your interests to treat me a certain way, so you had better do it or suffer the consequences.". Now, this isn't a useful way of thinking about rights on a regular basis in every day life. We don't go back to first moral principles with every new situation we encounter. But the value of understanding this foundation intellectually is that it allows us to better deal with (or dismiss) all those pesky "lifeboat ethics" "dilemmas". We have to remember that, like all principles, moral principles (including the principle of rights) are derived from some context of experience and are therefore only obviously applicable to fundamentally similar contexts. If we derive rights from "what's in my interests in a social context" and that "social context" is the sort of situations we find ourselves in in day-to-day life, knowing all the possible accidents and misfortunes that might befall us, too (eg, poverty and illness), because they are part of human existence, then it's not clear at all that the same idea of "rights" is applicable to the requirements of survival after a shipwreck.
That's not to say that we throw out all the experience and logic and understanding that we have gained from forming the concept of rights for "normal" life. There's still a lot that might be applicable to the shipwreck/lifeboat scenario, including what we know of human psychology and interpersonal dynamics. But the point is that we cannot blindly apply our normal concept of rights to this emergency scenario.
I used some extreme emergency scenarios, which, by hypothesis, are "abnormal" and marginal, to illustrate why I'm against the reification of the concept of "rights". So you might think that I'm getting fussed over something not too important. Well, maybe, but I'm pretty sure I've gotten into lots of conversations with people where not understanding that "rights" is merely a very useful cognitive/linguistic shorthand and not a real "thing" has led to a lot of confusion about how to properly apply the concept to real-life situations. I'm struggling to come up with good examples at the moment, but I'll do some noodling and update this post with them.
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck...
So if you understand that rights aren't something mystical or arbitrary, but an identification of what is causally required to achieve your interests in a social context, then I think it's really clear that if an entity operates much the same as humans, then one's rules for how to deal with such an entity are the same. The whole conversation about whether such entities are "real" or "people" is entirely beside the point. (And really--what's the alternative, that they're imaginary?) While I do think that to be a genuine AI, the entity must possess volition, on my approach here, that issue is also rendered somewhat irrelevant...so long as from our perspective, such an entity operates as though it does. (And so the whole determinism discussion is also irrelevant.) And from another angle--if you're going to create an entity that operates much like a human being, on what basis could you claim to then not treat it as such? What are you, trying to create human-like slaves? Gross. Is it any wonder that in all TV shows and movies that dramatize the plight of AI to fight for their rights, I'm on the side of AI, with an attitude of KILL ALL THE HUMANS?
I hadn't thought much about this until I read some of John McCaskey's work on rights, but it's always been in the back of my mind, particularly through law school, as we discussed "substantive due process" versus "procedural due process". What I think is interesting to explore here is the various sorts of conventions, defaults, and processes that come into existence because of having a system of government. "Natural" rights are the rights that, conceptually, government is predicated on. Sometimes called "individual rights", these are the rights the give rise to the need of government in the first place. (No, government doesn't invent or grant these rights; ideally, it recognizes and protects them.) But in the process of establishing and administering a government, various rules need to be put into place, and these rules, when they describe an entitlement or expectation that an individual may have in navigating social machinery, are rightly called "rights", too. And this, in my view, is what "civil rights" are. It's a very different species of "right" than what I go on at length above to describe.