[Kde-games-devel] KNetWalk Score Calculation

Parker Coates coates at kde.org
Tue Mar 19 02:49:14 UTC 2013


On Mon, Mar 18, 2013 at 6:20 AM, Ashwin Rajeev wrote:
> Current score calculation of KNetWalk considers time and penalty moves(
> Total moves - minimum required moves to complete)
>
>     double penalty = m_gameClock->seconds() / 2.0 * (m_clickCount/2 + 1);
> //m_clickCount = 0 for perfect game play
>     penalty = std::sqrt(penalty/m_scene->fieldItem()->cellCount());  //
> cellcount = 25 for easy, 49 for medium and 81 for hard
>     int score = static_cast<int>(100.0 / penalty);
>
> But there is problem with this method which is reported here :
>  https://bugs.kde.org/show_bug.cgi?id=172089
> screenshot: https://bugs.kde.org/attachment.cgi?id=27674

Hello Ashwin,

I'm the original reporter.

> So i proposed a simpler score calculation method which considers least score
> as best
>    score = m_gameClock->seconds() + (m_clickCount * 10)

My original proposal was to capture the "spirit" of the current score
calculation while removing the current time resolution issues. I
personally prefer an approach like yours, where a misclick is a
penalty not an immediate "disqualification", but it would be a more
invasive change.

> But later i realized both these scoring methods doesn't considers the
> minimum required moves to complete. For easy level it may vary from 13 to
> 29. Screenshot of my highscore:
> http://simplest-image-hosting.net/png-0-me1640%0A (calculated with existing
> method). Here i got score of 213 with 11 second because it only required 13
> moves to finish the game.

At one point I had a patch for KNetwalk that ensured that every game
(within a given difficulty) required the same number of clicks to win.
At the time there was some resistance on this list as some felt it
took the randomness out of the game, but I see that is the only way to
ensure fairness between games. My highscore list is also topped by
very rare games that required a very low number of clicks; if I ever
manage to beat them it'll be by pure chance.

> Does anyone have a better solution to this issue?

I'll comment on your review request.

Parker


More information about the kde-games-devel mailing list