The doppelganger is a shapeshifter. They will imitate player monsters and occasionally monsters that may be created by summon nasties. Each turn they have a one-sixth chance of attempting to change form; one-seventh of these attempts will turn them into a nasty and two-thirds of the rest will change them into a random player monster.
Doppelgangers that are imitating player monsters will take the rank titles for that role, based upon its level - a doppelganger imitating a fourth-tier Healer appears as a "Dresser", one imitating an equivalent Wizard appears as a "Magician".
Doppelgangers are considered human for sacrifice and cannibalism purposes. Eating a doppelganger corpse will cause you to polymorph, unless you have unchanging. This will polymorph pets as well, which is one of the dangers of leaving carnivorous pets (especially purple worms) near doppelgangers.
In SLASH'EM, doppelgangers are a playable race, with high stats, natural protection, and, as one might expect, the ability to polymorph at will, via the "#youpoly" extended command. However, doing that will cost power. A very useful tactic is to polymorph into something when going near a hard battle, to have both the benefits of the new form, and those of reforming as a doppelganger when you should die.
An excellent choice of Role for a doppelganger is a monk, since these would benefit from the polymorph much more than anything else.
"Then we can only give thanks that this is Antarctica, where
there is not one, single, solitary, living thing for it to
imitate, except these animals in camp."
"Us," Blair giggled. "It can imitate us. Dogs can't make four
hundred miles to the sea; there's no food. There aren't any
skua gulls to imitate at this season. There aren't any
penguins this far inland. There's nothing that can reach the
sea from this point - except us. We've got brains. We can do
it. Don't you see - it's got to imitate us - it's got to be one
of us - that's the only way it can fly an airplane - fly a plane
for two hours, and rule - be - all Earth's inhabitants. A world
for the taking - if it imitates us!
Xander: Let go! I have to kill the demon bot!
Xander Double (grabbing the gun): Anya, get out of the way.
Xander Double: That's all right, Buffy. I have him.
Xander: No, Buffy, I'm me. Help me!
Anya: My gun, he's got my gun.
Riley: You own a gun?
Buffy: Xander, gun holding Xander, give it to me.
Anya: Buffy, which one's real?
Xander: I am.
Xander Double: No, _I_ am.