A bard casts Dissonant Whispers (PHB, p. 234) on a monster (diagram below). The monster has to choose between 2 paths. The left path is “safer” than the right path since his allies are that way but the right path led him a little farther from the bard.
Can the monster (A drow in armor and mid melee with at least 16 AC) choose the safer path or does he have to take the right one?
It’s up to the DM…
Dissonant Whispers only requires that the creature:
must immediately use its reaction, if available, to move as far as its speed allows away from you. The creature doesn’t move into obviously dangerous ground, such as a fire or a pit.
From a pure RAW perspective, as long as it moves away from you and not into obviously dangerous ground, then it’s following the spell requirements.
Two Paths
The spell itself is causing the creature terrible pain that is trying to escape from:
You whisper a discordant melody that only one creature of your choice within range can hear, wracking it with terrible pain.
It’s trying to get away, but it’s not ‘frightened’ of you or have any other effect. If the creature has any semblance of intelligence, it’s going to run away from you towards its allies.
If it has no intelligence or knowledge/wherewithal to go towards friends, then it may be a toss-up.
But both options are firmly under the control of the DM as the spell itself doesn’t give any direction here other than to move away from you.