adjacent repeats
Why does shuffle keep playing the same artist?
See the same six songs in three different orders. Watch how often one artist comes up twice in a row.
Your playlist
6 tracksCompare the queues
Sample run
The request was “Add shuffle.”
Every track should play once. The next choice is what listeners expect. Fisher–Yates gives every order an equal chance. The artist-aware version spreads artists apart when the playlist allows it.
SeniorMode gives a coding agent guidance for spotting that choice and checking the result while you describe the feature in your own words.