Machines, the new ruler of the Earth?

I believe that machines are programmed to believe whatever it is that the programmer (lack of a better word) program them too.  For instance, a computer can love if you tell the computer what love is, how to run love, test love, etc.  A computer can see if you tell it what to see or hear what you want it to hear. 

What gets me is the point when humans are no longer needed and are no longer essential for a computer to evolve and computers just become another species on the planet.  Is this when the "Matrix" becomes reality?  Is the world going to someday be ruled by machines instead of humans?  Humans might become another lowly organism on the food chain, not to say that machines will start to eat humans...

More research is to come.