How to Program the A.I. to Recognise Zelda Games

We're talking about two dimensional games. I have a game in mind, in specific. It's A Link to the Past.

The A.I. must take every pixel into account. It must have a record of all of the images, including images that are placed on top of a background. In order to detect a copyright infringement on Youtube, ALL of the pixels must match exactly what could be in the game.