While playing the game I noticed some bias in the chosen songs, where common genres would be played often, while the less well known genres would rarely be played.
Looking at the code, I noticed that it's sampling from all tracks and making sure the genres are unique. This means genres with more songs in them like Detroit Techno and Acid House are more likely to be played than Glitch Hop or Dutch House. It's not a huge bias as most genres in the dataset have around 20 songs in them, but if you want to have a more uniform genre distribution, this PR does that.
I restructured src/data/data.json to have tracks keyed by genre, and updated drawNewRound to sample four genres first, then one track from each genre, which should sample all genres uniformly regardless of how many tracks they contain.
I also fixed a mismatch between the genres list and the tracks themselves: the "Trancecore / Acidcore" genre was listed as "Trancecore & Acidcore" in the tracks.
While playing the game I noticed some bias in the chosen songs, where common genres would be played often, while the less well known genres would rarely be played.
Looking at the code, I noticed that it's sampling from all tracks and making sure the genres are unique. This means genres with more songs in them like Detroit Techno and Acid House are more likely to be played than Glitch Hop or Dutch House. It's not a huge bias as most genres in the dataset have around 20 songs in them, but if you want to have a more uniform genre distribution, this PR does that.
I restructured
src/data/data.json
to have tracks keyed by genre, and updateddrawNewRound
to sample four genres first, then one track from each genre, which should sample all genres uniformly regardless of how many tracks they contain.I also fixed a mismatch between the
genres
list and the tracks themselves: the "Trancecore / Acidcore" genre was listed as "Trancecore & Acidcore" in the tracks.