Keystone Kops are not randomly generated, and normally-created ones are always generated hostile. A Keystone Kop can grow up into a Kop Sergeant.
Keystone Kops usually only appear if you have overtly stolen items from a shop: if you step outside but remain near the shop, one swarm is created around you; if you teleport a long distance away or leave the level, one swarm is created around the shopkeeper and another around the down stairs. If that shopkeeper is pacified, any live Kops vanish from the level along with their inventory, including any items they pick up. Each swarm of Kops includes DL + d5 ordinary Keystone Kops.
The Tourist quest goal level generates five Keystone Kops in a "police station" on the western half of the level at level creation.
A Keystone Kop has a 1⁄3 chance of generating with either a club or rubber hose with an equal probability of each, and a 1⁄4 chance of generating with 3 to 4 cream pies. Keystone Kops never generate with an offensive item, defensive item, miscellaneous item, or gold, and never leave death drops.
Keystone Kops are valid forms for polymorph, which is generally the only other means to encounter any of them outside of bones. They are also valid targets for genocide, but cannot be rendered extinct.
The Keystone Kop first appears in NetHack 1.3d - from this version to NetHack 2.3e, they appear using the K glyph in place of the kobold if the KOPS compile-time option is defined. In NetHack 3.0.0, kobolds were moved to the k glyph, leaving the Keystone Kops and their newly-introduced stronger variants to occupy the K glyph if KOPS is defined.
The Keystone Cops are an incompetent bunch of policemen featured in a series of films from 1912 to 1917.
The Kops are a brilliant concept. To take a gaggle of inept
policemen and display them over and over again in a series of
riotously funny physical punishments plays equally well to the
peanut gallery and the expensive box seats. People hate cops.
Even people who have never had anything to do with cops hate
them. Of course, we count on them to keep order and to protect
us when we need protecting, and we love them on television shows
in which they have nerves of steel and hearts of gold, but in
the abstract, as a nation, collectively we hate them. They are
too much like high school principals. We're very happy to see
their pants fall down, and they look good to us with pie on
their faces. The Keystone Kops turn up--and they get punished
for it, as they crash into each other, fall down, and suffer
indignity after indignity. Here is pure movie satisfaction.
The Kops are very skillfully presented. The comic originality
and timing in one of their chase scenes requires imagination
to think up, talent to execute, understanding of the medium,
and, of course, raw courage to perform. The Kops are madmen
presented as incompetents, and they're madmen rushing around
in modern machines. What's more, the machines they were operating
in their routines were newly invented and not yet experienced
by the average moviegoer. (In the early days of automobiles,
it was reported that there were only two cars registered in all
of Kansas City, and they ran into each other. There is both
poetry and philosophy in this fact, but most of all, there is
humor. Sennett got the humor.)