What's the algorithm for the 'recently played' playlist?

Whenever I add new songs to my library and play them a few times they never show up in the recently played playlist. Ideally I want the last song I played to be #1, second #2 etc but instead it seems to be a function of number of times played and when they were played? Anyone know the deal?
Hmmmm that's a strange one. Not a regular iTunes user but I'll ping some of our Ambassadors to see if we can get you some help!! 🙂
I have no idea, but @Tartarus is our iTunes music guru. He should be along to help soon.
@Led, thanks for your trust in me.

To answer this question I have to start by explaining you that the 'recently played' playlist is a "Smart Playlist", i.e. you can edit as you like.

I have edited it in iTunes to show the last 100 played songs in the last month.

726ee80dc9c3625d6468cd9097387011.png


I then enabled 'songs' view in View > View as ~> Songs.
e5d75c0a31f648d6877a3067dbf8530b.jpg


And sorted by Last Played by descending date, as in last played first.

03f7851aee06bb2ec3e34395d2e80d76.jpg

If you follow these steps this playlist and the way it's sorted will also transfer to all you devices with Music enabled.

Enjoy!

Original thread: https://forums.imore.com/threads/whats-the-algorithm-for-the-recently-played-playlist.382259/