Lyric Race

Lyric Race is a time-based questionaire minigame about Taylor Swift songs. 13 questions, of which there are 6 different types, are asked one after the other, and all users playing must answer within 30 seconds. Between questions, there is a 10 second break. At the end of the Lyric Race, each users' total time taken to answer all 13 questions is converted into a score called IQ and credits. IQ is used for User Score and to earn extra credits by voting in TaylorBowls.

Starting
Users can use the command !lyricrace to start a Lyric Race, if there is no ongoing Lyric Race already. A 30 second timer will start during which other users can join also by using the command !lyricrace.
Questions
13 questions are asked for each Lyric Race, and users have 30 seconds to answer each question using the command /lyricrace. Note that this is a slash command, and is different from the regular command used to start Lyric Races. Between each question, there is a 10 second break. Each users' answer and BowlBot's responses to these answers will be hidden from other users. Users can answer as many times as they like, even if they answered wrong. If a user is the first to answer correctly, the response will indicate as such. Otherwise, the response will say how many seconds slower their answer was compared to the fastest answer. If a user does not answer the question correctly in 30 seconds, their time taken to answer is considered as 30 seconds.

If all users answer the question correctly in less than 30 seconds, the Race will end that question and begin the break before the next question. If no users answer the question correctly in 30 seconds, the Race will replace the question with another question of the same type and redo that round of answering. If this happens 3 times, the question is skipped and all users have 30 seconds added to their time. If no users answer the question correctly in 30 seconds, and the previous question was skipped, the current question will be immediately skipped. If this happens 2 times in a row, the Race is ended prematurely, and all users have 30 seconds per remaining question added to their time.

For answers that are song titles, punctuation is excluded from the answer, but special characters are included. Song titles of note are: Mr. Perfectly Fine is Mr Perfectly Fine, Come Back...Be Here is Come Back Be Here, Is It Over Now? is Is It Over Now, Miss Americana & The Heartbreak Prince is unchanged, Anti-Hero is Antihero, and I Can Fix Him (No Really I Can) is I Can Fix Him No Really I Can. These rules also apply to acronyms (see paragraph below). Capitalisation is not necessary.

If the answer to a question is a song title, and the song title is at least 3 words long, users can answer using an acronym of the song title. Acronyms of note are: Mary's Song (Oh My My My) is MSOMMM, All Too Well (10 Minute Version) is ATW1MV, I Can Fix Him (No Really I Can) is ICFHNRIC, Miss Americana & The Heartbreak Prince is MA&THP, and all songs with features count the word "ft." e.g. Bad Blood ft. Kendrick Lamar is BBFKL. Capitalisation is not necessary.

There are 6 types of questions in Lyric Race, and each has a corresponding colour to indicate what type of question is next during Lyric Races.
  1. Blue represents 'name the song from lyrics' questions. A few words from a Taylor Swift song are provided; users answer with the correct song name.
  2. Purple represents 'finish the lyrics' questions. A few words from a Taylor Swift song and the number of required words in the answer are provided; users answer with the correct words that follow the given lyrics.
  3. Orange represents 'name a song that has a word' questions. One word from at least one Taylor Swift song is given; users answer with a Taylor Swift song that contains that word. Multiple answers are accepted if the word appears in multiple songs.
  4. Brown represents 'name the song from track number and album' questions. A Taylor Swift album and track number is given; users answer with the Taylor Swift song that is the given track number in the given album.
  5. Black represents 'odd one out' questions. At least 3 Taylor Swift songs are given where 1 is of either a different track number or a different album; users answer with the song that is of the different attribute.
  6. White represents 'missing song' questions. A list of Taylor Swift songs from the same album with at least 1 song missing is given, where the track order is preserved but the initial song in the list is random; users answer with a Taylor Swift song that is missing from that album. Multiple answers are accepted if multiple songs are missing.
If during a Race, BowlBot has an error and the Race does not continue, users can use the command !redflag to end the LyricRace prematurely.
Credits
Users are awarded credits for completing a Lyric Race, given by the formula:

$$\text{Credits}=3\cdot\Biggl\lfloor\cfrac{390-\text{Score}}{2\cdot1.15^{\text{Placement}}}\Biggr\rceil$$

In other, more understandable words, users recieve more IQ the faster they complete a Lyric Race and the lower their score from that Race. Users who have lower placements, e.g. placed 5th in a Race, get a small penalty to their credits awarded. Each placement below 1st divides the awarded credits by 1.15, which is about a 13% reduction per placement. However, being faster than more people while having the same placement will not award more credits. For example, a score of 100 seconds and placing 1st will award 378 credits whether it is a 1 person race or 10 person race.
Lyric IQ
Users are awarded Lyric IQ for completing a Lyric Race. The faster they complete one and the lower their score, the more IQ they gain from that Race. However, the more Races they have already completed, the smaller the gain in IQ, especially if the score they obtain is high compared to their previous Races. Users can check their Lyric IQ using the commands !racestats and !score. Users can check the users with the 13 highest Lyric IQs using the command !rankiq.

In more detail: A user's Lyric IQ is based on each of their previous completed Races. In the code, their list of scores taken is arranged from lowest to highest and numbered starting from 0. They are awarded IQ from each by subtracting their score from 390 then divided by 100. For example, a score of 100 seconds would award 2.9 IQ. However, the further in the list the score is, the less IQ it awards. Each position further back multiplies the regular IQ awarded by 0.99. For example, if that score of 100 was the user's 4th lowest score, it would be multiplied by \(0.99^4\) or about 0.961, so it would award 2.79 IQ instead. When new scores are added, the list of past scores is recalculated.

When users get lower scores against other users in a Lyric Race, they can gain more IQ. The two lowest scores, or one if there is only one other user, of the users they won against are also added to that user's list of scores. This means that a user winning against players with scores that are high relative to their past scores is less beneficial than winning against players with low relative scores. Losing a Race to another user will not add their score to your list. For example, if user A places 2nd in a 5 person race, they are awarded their score and the scores of the users in 3rd and 4th place.

Lyric IQ is also split into levels of 100 IQ each. When a user reaches a new level, such as going from 99 IQ to 100 IQ, their past scores (excluding the one they just obtained) are deleted and 100 IQ is added to their IQ. However, it also makes it harder to gain IQ. Instead of multiplying scores by 0.99 the for each position further back they are in a user's list of scores, the number is 0.007 less for every level the user has gone up. For example, a user who is at 200 IQ has gone up two levels, so their score multiplier is 0.976.

When a user is in the last 10 IQ of their current level, e.g. between 290 and 299.99 IQ, also known as a Promotion Zone, they can promote. This immediately places them at the next level. For a user to promote, they must win a Race against another user who is also in a Promotion Zone, and their level must be equal to or higher than the user who promotes. However, a user that loses a Race to another user that promotes will lose IQ by having their second lowest score deleted. This is the only way to lose IQ. It is not necessary to promote to reach a higher level, but it is typically faster than obtaining the IQ normally.

Lyric IQ gives users some small benefits. For every 13 IQ they have, users gain 1 extra credit from voting in TaylorBowls. These extra credits are added after multipliers, so they are not affected by a user's Streak, being a Server Booster or Kintsugi, or being Enhanced. For every 0.1 IQ they have, users also gain 1 User Score. Users can check their extra credits using the command !streak and their User Score from Lyric IQ using the command !score.
Race Stats
Users' overall ranking, victories, wins to losses, races joined, and fastest time are kept track of. Users can use the command !racestats to view these statistics. Victories refer to the number of 1st placements a user has achieved, including in solo Races. Wins refer to the number of users a user has placed higher than in Races; conversely Losses refer to the number of users a user has placed lower than in Races. For example, a user that places 2nd in a 5 person Race will gain 3 Wins and 1 Loss.

Maximum IQ
It is possible to calculate a theoretical maximum Lyric IQ for a user based on their lowest score. The reduction in IQ based on a score's position in the user's list of scores is multiplicative, which is similar to a geometric series. Thus, by simplifying a user's list of scores to an infinite number of scores which are all their lowest score, an infinite geometric series is obtained, and its sum given by the formula:

$$S=\cfrac{a_{1}}{1-r} \quad \text{for } |r| < 1 $$

where \(a_{1}\) is the first term and \(r\) is the common ratio.

Here, the first term is 390 minus the user's lowest score obtained in their current level and the common ratio is given by the formula:

$$r=0.99-0.007\cdot\text{Level}$$

Thus, a user's theoretical maximum Lyric IQ is given by the formula:

$$\text{Max IQ}\approx100\cdot\text{Level}+\cfrac{390-\text{Lowest Score}}{1-(0.99-0.007\cdot\text{Level})}\cdot0.01 \\ \text{Max IQ}\approx100\cdot\text{Level}+\cfrac{390-\text{Lowest Score}}{1+0.7\cdot\text{Level}}$$

Note that the fastest time in the command !racestats might not be accurate for this calculation as that time might have occured when the user was at a lower level.

Users can use the EsteBot command /maxiq to calculate their theoretical maximum IQ.

List of Commands
Command Description
!lyricrace Begins a new LyricRace or joins an existing one.
/lyricrace answer Submits an answer for the current LyricRace.
/maxiq Calculates a user's (unachievable) theoretical maximum IQ.
!racestats user Displays a user's Lyric Race statistics.
user is an optional parameter; defaults to command user.
!rankiq Displays the users with the 13 highest Lyric IQs.
!redflag Ends a LyricRace in case there is an error.
List of Formulae
1   A user's theoretical maximum IQ based on their lowest score:

$$\text{Max IQ}\approx100\cdot\text{Level}+\cfrac{390-\text{Lowest Score}}{1+0.7\cdot\text{Level}}$$

List of Terms
Term Definition
Level A division of 100 Lyric IQ.
Loss Placing lower than another user in a LyricRace.
Promote The act of increasing your Lyric IQ past a multiple of 100.
Promotion Zone The last 10 IQ of a level.
Track Order The order of songs on an album.
Track Number The placement of a song based on the track order of its album.
Win Placing higher than another user in a LyricRace.
Victory Placing 1st in a LyricRace, including in solo Races.
Updated for BowlBot Version 17.2.6