Currently Online

Latest Posts

Topic: Game statistics saved on Meta Server

SirVer

Topic Opener
Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-04, 12:54

This thread discusses the blueprint

http://wl.widelands.org/wiki/StatisticsSavedOnMetaServer/


Top Quote
SirVer

Topic Opener
Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-04, 13:17

I read through the blueprint and I am not satisfied with the approach taken there. The following went through my mind:

  • The statistics should be useful: I should know when I face an opponent how strong he is. If I beat an experienced player while being a novice, my skill should improve radically so that the next player is warned. That is: the system should represent my true skill after very little games.
  • Related to that: The statistics should not just accumulate points, but rather represent an estimation of the skill level of an player.
  • The current proposed system does not offer this: someone who played ten games will always have more points than someone who has played less.
  • The current system does not incorporate skill updates for team plays that represent an increase of information about each player that participated in the game.

I googled some and knowing that Microsoft research did some work into this topic for their X Box Automatching system I found a (short) description of True Skill, which is their system 1: The idea is pretty basic and I think we can copy it right away: The skills of a player are modeled as an gaussian distribution, the prior information (before any game is played) is a zero-mean with inifite (or very large) variance. Each game represents a sample measurement from this distribution, but only a comparative: we know the current estimation of the skill of the two players, if the first one is a new player (p1(0,inf)) and the second is a sesoned player (p2(123,0.2)) and p1 wins over p2 we can decrease the variance of p1 and drastically increase its skill. We will not change p2 skill level too much, because we can't say yet how good p1 really performs yet. The variance therefore gives us some information about the certainty of a players skill.

Computer players can be incorporated in the same way: each AI gets initialized to p(0,inf) and its skill is updated as if it were a player. This can also be done offline by letting the computer play against each other.

Team plays can be incorporated by adding the skills of the individuals up and update their skill after win or loss according to the joint distribution of the other players.

My suggestion therefore would be to gather all possible game data on the server so that we can experiment which variables are important in widelands games: time of disconnect, wares at this time, landsize, military strength, workers, just about everything so that we can play around with regression techniques.

People interested in implementing some or all of this should refer to 2 which introduce the True Skill system and 3 which adds time tracking ideas to the approach.

Comments?

Edited: 2010-04-04, 13:19

Top Quote
ixprefect

Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-04-04, 22:42

I agree that we should just store statistics about each game and keep them around. Then we can always change the ranking system afterwards if it turns out to have problems. Also, I agree on using a previously researched rating system. After all, this topic has been looked at by many people, whether it's Microsoft for the XBox or the chess player rating system.


Top Quote
Dwarik

Joined: 2009-05-11, 17:50
Posts: 42
Ranking
Pry about Widelands
Posted at: 2010-04-05, 10:47

There are really two different issues here

1) Assigning points for a game 2) Translating game points to rank adjustment

As far as assigning points for a game i wouldn't award points for game time. even if subtracting points if there is no combat for an hour that just means that i need to conquer a building every 55 minutes. still leaves a large margin for afk/point grabbing.

also i would be careful with assigning point for having the largest army/most goods/etc. this just sound like giving more points to the victor. especially with number of goods graphs i havn't really noticed a big drop during any of my games.

better metrics might be award points based who is number 1,2,3 in good/militar/etc on increasing intervals (30 min, 1 hour, 2 hour, 4 hour, etc) still like the idea of dividing by game time. that way people could keep playing if they made a lot of progress

I'm somewhat hesitant to use microsoft research for our rank adjustment. There are many other systems available but microsoft research seems a likely candidate for patent/'copy right'/other legal problem. Not that they are very likely to take notice of a small bunch of programmers like us but still wouldn't want to set us up for problems. being paranoid here face-smile.png

Edited: 2010-04-05, 11:00

Top Quote
ixprefect

Joined: 2009-02-27, 14:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-04-05, 20:56

I believe a big part of SirVer's post was pointing out that you don't necessarily assign points for a game in the first place.

It's all about what you want to use the ranking for. Usually, rankings are interesting for match making services, and they should basically act as a predictor for the outcome of a game between two players. Basically, you want to answer the question: if player A plays against player B, what is the probability that player A wins?

Ideally, you want this percentage to be as close to 50% as possible in a match making service (unless one of the players is a masochist). Everything else derives from that.

Of course, if you don't want to create a match making service, but only want pretty, but meaningless, statistics, then by all means come up with an ad hoc system face-wink.png


Top Quote
Dwarik

Joined: 2009-05-11, 17:50
Posts: 42
Ranking
Pry about Widelands
Posted at: 2010-04-05, 23:15

we don't really have that many people for a match making system. what might be a better goal is a handicap system. say if a rank 5 player plays against a rank 9 player the weaker one gets 4 gold and 4 extra soldiers to start off


Top Quote
SirVer

Topic Opener
Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2010-04-06, 11:51

dwarik. We might get so many people ;). No, what I'd advocated was to used a principled approach researched and proven to work by others. There is no need to use it as match making, but the desire of assigning points is mainly to know the true skills of players. This is important for all conclusions one would like to draw from it, being it handicaps, match making, ranking...


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 826
Ranking
One Elder of Players
Location: Germany
Posted at: 2010-04-10, 12:07

Hey guys and girls ;),

sorry am very busy at the moment, so just a quick statement.

I see different ways to reach the goal:

the easiest (but still a lot of work) way would be to use the ggzd ranking system. This disallows us to save played maps, gametime, etc. as only points, wins and loses are supported. To reach a system like the one SirVer proposes, we could simply save the full reached points, but only show the scaled points (scaled by played games) in the user interface. This would give us something similiar to SirVer's idea.

The second way would be to add mysql access to the widelands metaserver module so that it can directly read out and write map data, players, winner, losers, etc. (But note!!!: the module is not running all the time, it is started for each game (so different instances are possible) and normally is designed to have no direct access to the data - the normal case is communication via the ggzd metaserver) - this would cost quite more work, but in fact would be more dynamically usable

The third way would be to hack the ggzd metaserver to offer us the functionality, so the module does not need to access the mysql database directly. This would perhaps be the "cleanest" way to reach all goals - however I doubt we will find enough man power to get that stuff running in next time... face-wink.png

Cheers

Peter


Top Quote
timowi

Joined: 2009-11-01, 23:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-04-11, 17:16

Hi all,

I read this just now. I'm currently a bit short on internet an computers. I hope I get a "real" internet connection on 19th.

I have the metaserver and storage of the statistics basicly working. Currently it counts only wins/losses. I use the ggz scoring system only because it's easy to use. I currently work on transferring the game results and statistics to the (meta)server.

I have planned it the following way. For build16 the ggz implementation should be fixed and the transferring of the statistics should be finished.

Beside the game results (winner/looser) I want to transfer some basic information about the game (gametime/tribes/ais/...) and most of the game statistics to the server. I have currently no access the this source. I will write a list of transferred data at the start of next week. So the metaserver knows everything interesting about the game.

This changes are quite easy and I will push the first working code in the next two weeks.

For the first time the server just stores the games results as ggz points because this is just the easiest way. This is already working. All further changes then go only to the metaserver code.

In the long term I want to implement the third approach form nasenbaer. This is not so much work but will be a great improvement to ggz too. The data will be written to the database only. Then someone can implement some nice modules for the homepage to create some nice statistics out of this.


Top Quote
timowi

Joined: 2009-11-01, 23:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-04-16, 13:39

So here is what I try to submit currently. I focus on transferring this data not generating it.

Per game:

  • gametype
  • mapname
  • mapsize
  • game time
  • client version

Per player:

  • tribe
  • result (winner/looser/gave up)
  • points
  • conquered land
  • number of buildings
  • military buildings lost
  • civilian buildings lost
  • buildings defeated
  • military buildings conquered
  • economy strength
  • military strength
  • number of workers
  • number of wares
  • productivity
  • casualties
  • kills

Except the result and points this is more or less the current in game statistics. I work on getting this data on the metaserver. Improving this data can be done independent of this. This is just a first draft.

Edited: 2010-04-16, 15:03

Top Quote