Sort:  

I think I saw a movie with this premise. But I can't remember the name or when it was made! Seems like it was old, like from the '60s.

AI - Artificial Intelligence (Spielberg) has elements of this. Wait, that's a bit of a spoiler, sorry!

I wrote some fiction about this concept, actually.
I haven't posted it yet, but I will, if this post gets a lot of upvotes.

I'll probably post it eventually anyways, but if this one is popular, I'll upload my weird scifi story right away!