I once attempted to code a simple chat-bot in C#.
This made me think a lot about human factors which make each person an individual, morals and such.
It really is, all invisible variables. So if all the neccesary ones are replicated in code and the computer used them as we use ours, like "Hmm, Tom just broke up with his girlfriend, I should not mention that I have met a nice lady...".
Well, that's a lovely example. That defines who we are:
Nice person - "Hmm, Tom just broke up with his girlfriend, I should not mention that I have met a nice lady..."
Bad person - "HA! Tom's missus ditched him, i'm totally gonna rub it in his face that I met a nice lady".
That would be tact I guess and morals... maybe?
Either way, variables!
Then if you just coded one of those "20 Question" information network bots to it, it would have a means to learn about many things:
"A duck quacks."
That would tell it that an object called a "Duck" performs an action which is a "quack". It would probably already know what a duck is (animal, vegetable or mineral route).
So if you could tell it to parse data from Wikipedia or something instead of being fed information by many users... surely there's a means you could replicate a human.
This train of thought could literally go on for hours...