That is extremely interesting.
One aspect of intelligence that psychologists study in animals is self awareness. It usually involves using a mirror to see if the animal recognizes that the image in the mirror is its "self".
Is the dog just playing, or does it realize that its behavior affects the shadow?
Great project for a grad student somewhere!
How Self Aware Is a Dog? - Pets