In the US at least, there have already been rulings considering it "fair use" (which is not a concept in almost any other country AFAIK)... I believe it is seen as basically doing an equivalent thing a human does i.e. drawing influence from other sources it has seen before to create something "new". The only legal difference in my mind is how different it actually is, and how obvious is it, from whatever the original influence(s) were, which also applies to humans.