thealexhoar / HuntTheWumpus

One of the STEM High School Hunt the Wumpus groups.
GNU General Public License v2.0
1 stars 0 forks source link

How should scores be sorted? #1

Open dykatz opened 10 years ago

dykatz commented 10 years ago

We currently have the problem of not really knowing how scores should be sorted. Should it be based off of purely tie breaking with NOTHING else being taken into account unless there is a tie, like this pseudocode?

if (this.points > other.points)
    return 1;
else if (this.points < other.points)
    return -1;
else
{
    if (this.time < other.time)
        return 1;
    else if (this.time > other.time)
        return -1;
    else
    {
        if (this.turns < other.turns)
            return 1;
        else if (this.turns > other.turns)
            return -1;
        else
            return 0;
    }
}

We can change the order of priorities depending on what you guys think.

However, we could also handle all of the components in a single equation, but I have no idea how that could work, so comment if you have an idea/suggestion.

dykatz commented 10 years ago

Currently, I have it set up to work the way I described. I'm assuming that that's the way we want it until futher notice.

thealexhoar commented 10 years ago

I imagine a system that adds subscores together:

completionScore = 3000 * convertToInt(didComplete) timeScore = 30 - time explorationScore = 100 * roomsExplored

and adds subscores together for an overall score but retains the subscores for further tiebreaking later

On Sat, Mar 29, 2014 at 5:59 PM, muddmaker notifications@github.com wrote:

Currently, I have it set up to work the way I described. I'm assuming that that's the way we want it until futher notice.

Reply to this email directly or view it on GitHubhttps://github.com/thealexhoar/HuntTheWumpus/issues/1#issuecomment-39014317 .

Alex Hoar

dykatz commented 10 years ago

so this could be a system set up before the others:

int mysuperscore = 3000 * completed - time + 100 * roomsExplored;
int othersuperscore = 3000 * other.completed - other.time + 100 * other.roomsExplored;
if (mysuperscore > othersuperscore) return 1;
else if (othersuperscore > mysuperscore) return -1;
else // see above