Pillar dancing
To pillar dance, simply flee a pursuing enemy of the same (or lower) speed around a small "pillar" of walls - anywhere from a 1x2 block to a whole ring of rooms - always going away and eventually going the whole around. Remember that both you and monsters can cross diagonals. Preferably, you should be in a mapped out, open area, to minimize the chances of another monster wandering in.
If the enemy doesn't have any ranged attacks, then you should be regenerating both HP and MP. For the most part, monsters will also regenerate HP. Therefore, this strategy can be used to 'reset' fights from the beginning; or to just take a few extra MP for a spell that'll kill the foe, guaranteed.
Random Energy
The main thing you have to watch out for is the energy randomization mechanic. Monsters of 10 (normal) speed will occasionally get +/- 0.1 decaAut of time whenever moving, with faster monster getting more. The main take away is to always be prepared to take at least 1 hit from any same-speed enemies you may be pillar dancing. A particularly lucky monster may get 1 attack every 10 turns. Monsters that attack slowly, like ogres, flat out can't catch up to you in this way.
However, this same mechanic is a benefit of pillar dancing. Given enough time, enemies will lag behind a space, potentially giving you a space. Said space can be useful for entering up the stairs, without bringing any monsters up. As the extra attack also uses up a monster's energy, monsters that get a free attack are more likely to then lag behind you. You can still continue to dance even with a space - it is even safer that way
History
- In 0.29, random energy will be replaced with Attacks of Opportunity, a much stricter counter to pillar dancing.
- Prior to 0.26, food served as a (very) soft, medium-term counter to pillar dancing; running out of food would force you to take a turn to eat.
- Prior to 0.21, monsters would spawn over time; these monsters could catch you off guard
- Prior to 0.6, monster speed was not random, making pillar dancing much safer.