Page 1 of 2

Current Games thing

Posted: Sat Oct 20, 2012 11:55 pm
by stromae
Change it so it's easier to see who is on what team? Possibly be able to click on someone's name to see their stats page?

Would also be nice to see teams' average Elo, and possibly difference?

Re: Current Games thing

Posted: Sun Oct 21, 2012 1:23 am
by uakf.b
I made the server crash when doing this :(

Check out "beta" at games/games.php

Re: Current Games thing

Posted: Sun Oct 21, 2012 2:56 am
by stromae
Nice, looks good! Only other thing (to make it look better) might be to to have +/- Elo thing next to team's average, instead of next to everyone's Elo. Also, instead of:

avg_elo=1000)

Maybe:

Average Elo: 1000 | +17.5 / -14.5

Re: Current Games thing

Posted: Sun Oct 21, 2012 3:20 am
by uakf.b
Yeah, actually just changed it :P
I had it the other way before because when someone's ELO is over 2000 it changes differently (different K value for them for some reason). But since there's not too many it doesn't matter much.

Edit: ok, I'll change the text to Average elo and stuff
Edit2: nevermind, that'll take up too much space

Re: Current Games thing

Posted: Sun Oct 21, 2012 3:58 am
by stromae
Looks good now.

Re: Current Games thing

Posted: Sun Oct 21, 2012 4:02 am
by uakf.b
Cool; replaced old gamelist (Games tab now shows new one).

Re: Current Games thing

Posted: Sun Oct 21, 2012 4:18 am
by stromae
Out of curiosity, how is the average calculated when there are less than 5 players on the team? Does it average the 4 players' Elo (add up 4 Elo's and divide by 4), or does it add in an extra 1k (add up 4 Elo's, add 1000, divide by 5) ? Just curious.



edit: Hmm....what's the K value for Elo? The win loss between 0-30 and not 0-32?

Re: Current Games thing

Posted: Sun Oct 21, 2012 4:30 am
by uakf.b
Average: just average of the four players. (edit: actually you're right, I guess it's average of five because of how I implemented it :P)

K value: using the same as GHost's (update_dota_elo):

Code: Select all

   /* Calculate new ratings for all players. */
   for (i = 0; i < num_players; i++) {
      int team = num_teams > 0 ? player_teams[i] : i;
      float K, diff;

      /* FIXME: this is the chess distribution; games should be
         able to set their own. */
      if (player_ratings[i] < 2000)
         K = 30.0;
      else if (player_ratings[i] > 2400)
         K = 10.0;
      else
         K = 130.0 - player_ratings[i] / 20.0;

      diff = K * (team_winners[team] - team_probs[team]);
      player_ratings[i] += diff;
      /* dbg_msg(GGZ_DBG_STATS,
         "Player %d has new rating %f (slope %f).", i,
         player_ratings[i], K); */
   }

Re: Current Games thing

Posted: Sun Oct 21, 2012 6:03 am
by adventureclub
didnt know its written in java lol

Re: Current Games thing

Posted: Sun Oct 21, 2012 1:48 pm
by uakf.b
Um. That is C++, Java and C++ are both C-based languages in terms of syntax.

Re: Current Games thing

Posted: Sun Oct 21, 2012 3:07 pm
by uakf.b
The average ELO is now simple average of players in the current game.

Re: Current Games thing

Posted: Sun Oct 21, 2012 6:28 pm
by stromae
^ So it does or doesn't fill open slots with "1000 Elo's" ?

And ya, GHost++ was written in C++

Re: Current Games thing

Posted: Sun Oct 21, 2012 6:37 pm
by uakf.b
It did earlier, now it just does average of however many players are in game so not anymore.

Re: Current Games thing

Posted: Sun Oct 21, 2012 6:52 pm
by stromae
Notice: Undefined offset: 5 in /var/www/ent/forum/slots_fast.php on line 176 Notice: Undefined offset: 5 in /var/www/ent/forum/slots_fast.php on line 176

Re: Current Games thing

Posted: Sun Oct 21, 2012 7:11 pm
by uakf.b
Hm, should be fixed.
Edit: just kidding
Edit2: alright should be fixed now, thanks for reporting :P