Algorithm

ColorGuess! New Scoring Algorithm! -- Part 2: Detailed Breakdown

Hey all, welcome to part two of our discussion of our new scoring algorithm. If you’ve missed either our announcement post or part one, make sure to check out both of these posts before starting this one, because we are picking up right where we left off from part one.

Moving on from that, this article is going to discuss the thoughts behind the changes to the scoring system in this second version of ColorGuess! Please keep in mind that any numbers that are discussed here are purely in the development stage, and could change many times between now and the official launch.

As we discussed yesterday, the score will now have a cap of 1,000,000 points, and a subtraction value will be calculated for each color and subtracted from the maximum cap. So let’s talk about how that subtraction value is calculated.

For this example we will be using this data:

testdata.png

It’s a 5 step process:

  • The percent error is calculated for the color. |G – A|/A
    • Percent Error Red: |0.54597 –0.721569| / 0.721569 = 0.24335718
    • Percent Error Green: |0.881226 – 0.968627| / 0.968627 = 0.090232
    • Percent Error Blue: |0.038314 - 0.231373| / 0.231373 = 0.834406
  • The Percent error is then compared to this chart.
  • From the above chart, a grade is given to each color, and then a subtraction value is assigned to each grade.
    • Red Grade: C – Subtraction base value = 166,666
    • Blue Grade: B – Subtraction base value = 66,666
    • Green Grade: F – Subtraction base value = 333,333
    • Note that in the subtraction value chart has a range of subtraction values for each grade, that is due to there being a plus and minus system that I’ve decided not to disclose.
  • Lastly, we look at time. Right now we are giving an undisclosed amount of free time, after which every second subtracts a set points per second value. That value is 2,424. For the remaining example, we will assume you took 22 seconds to complete, and that there is no free time.
    • Time penalty = 2,424 * 22 = 53,328
    • Red final subtraction value = 219,994
    • Green final subtraction value =119,994
    • Blue final subtraction value = 386,661
  • Then, all that is left is to subtract each subtraction value from the total possible points.
    • 1,000,000 – 219,994 – 119,994 – 386,661 = 273,351

Hopefully this step by step breakdown helps you guys understand not only the new method, but the logic and the thought process behind what path we decided to do. As mentioned in the beginning of this post, the numbers are most definitely subject to change, but we will be sure to keep you updated with any tuning changes we make in the next week or so.

Thanks for reading, check out part one here, as well as our compilation of all information relating to the new and upcoming version of ColorGuess! here.

Until next time,

Austin

Download ColorGuess!

ColorGuess! New Scoring Algorithm -- Part 1: Theory

Hey all, if you haven’t seen our exciting news from earlier this week, head on over and check it out here. This post builds off of that announcement, so it’s best if you familiarize yourself with it first.  I’ve decided to break this post up into two parts, as it has gotten quite long. In part 1, no values will be given, only theory.  Part two will follow tomorrow with a more detailed look at the numbers we have decided to start working with.

Moving on from that, this article is going to discuss the thoughts behind the changes to the scoring system in this second version of ColorGuess! Please keep in mind that any numbers that are discussed here are purely in the development stage, and could change many times between now and the official launch.

When we set out to create a new scoring system, we had one big goal in mind: to cap the score at something reasonable. In the original ColorGuess!, all sorts of scores were achievable, and it was hard to define what an amazing score was, what a good score was and what a bad score was. Because of this, the game became more about getting the best grades possible, and less about the overall score; while this is a valid way to play the game, and will continue to be a valid way to play the game, it is not what our original intention was.

So, moving forward, the highest achievable score (and it will only be achievable with a near perfect game) will be 1,000,000.

As mentioned above, there is a very good game play reason to make this change, but conveniently for us, it addresses and fixes a pretty big bug that is present in the current version. Currently, infinity is an achievable score, and all that needs to happen is that you need to be lucky enough to match one of the colors perfectly, just one, and you will get a score of infinity, or “0” as our number formatter formats it.

Achieving a high score of infinity, as displayed by 0.

High score of infinity displayed as 0.

This error is caused by the inverse functions we called in order to get score multipliers, if you happened to match both colors perfectly (guessed-actual = 0), then you end up with 0 in your denominator, causing an undefined value, and spitting out infinity.

Now, you know that the score is capped, but you might be wondering how we go from the capped score to the score given to the players at the end of the game. After a lot of (over) thinking, we decided to use a basic subtraction method. Percent error on the colors will be calculated, and that percent error will be compared against grades. The grade will then determine what value is subtracted from 1,000,000 to give you a final score.

There’s one last key component to our scoring system: time. In order to have time be a part of our equation, we decided that you would get a certain amount of free time, and after that each second would deduct a set number of points. In reality, what happens is the points per second value is added to the subtraction value determined by the grade (i.e. if points per second is 3, and you take 2 more seconds than the free time, 6 points will be added to the subtraction value.)

 

 

 

That’s it for part one, to sum it all up:

  • The score is capped at 1,000,000 points, this is an achievable score.
  • A subtraction value is decided by a grade that is decided by the percent error of the color.
  • Time past the free amount of time is added to the subtraction value at a given points per second rate.

Make sure to check back tomorrow for part two, where more of the actual math is divulged! Thank you for reading.

Download ColorGuess!

Austin