Dominion Strategy Forum

Dominion => Dominion Online at Shuffle iT => Dominion General Discussion => Goko Dominion Online => Topic started by: amalloy on May 17, 2014, 03:25:43 pm

Title: New basic stats page
Post by: amalloy on May 17, 2014, 03:25:43 pm
I've been curious about some stats recently, and since Andrew graciously gives read-only access to the gokosalvager database to anyone on the forums, I was able to put together something I think f.ds users will find moderately useful. It's very much a prototype at the moment, and being hosted with a lame URL on my own server; it could disappear at any time, but I'll be working with Andrew to get it integrated as a gokosalvager.com page.

It currently lives at http://malloys.org:6789/ (http://malloys.org:6789/), and all it does is let you type in a username (case-sensitive - sorry!). Here's what happens for my username (http://malloys.org:6789/winrate?player=Alan+Malloy). The idea is to see who you've played against most often, and how often you've won against each player. If you want more details (like, how on earth have I won 45% of my games against SCSN?), you can use the existing log-search page to drill down and view individual games.

So, go try it out! Let me know if there's anything wrong, or if there's something more you'd like added (no promises I can do it, of course). Is this something you'd like to live at gokosalvager.com?
Title: Re: New basic stats page
Post by: jsh357 on May 17, 2014, 03:36:33 pm
Great idea! 

One problem I noticed: It's counting those games where we resign before getting the right first player during GokoDom... not much you can do about that, I suppose.

LOL:
Stef   5   100
Title: Re: New basic stats page
Post by: amalloy on May 17, 2014, 03:37:59 pm
Great idea! 

One problem I noticed: It's counting those games where we resign before getting the right first player during GokoDom... not much you can do about that, I suppose.

Well, I can do a few things. I can ignore games that have fewer than N turns (probably like 3 is good), and I can ignore non-Pro games. I'm a little dubious about ignoring non-Pro, but I definitely shouldn't be counting quick resigns.
Title: Re: New basic stats page
Post by: markusin on May 17, 2014, 03:40:38 pm
Great idea! 

One problem I noticed: It's counting those games where we resign before getting the right first player during GokoDom... not much you can do about that, I suppose.
Yeah, but I'd say counting unrated games will lead to all sorts of anomalies. A lot of preset boards are tried out in unrated games, some of which may be trap boards.

On the other hand, counting unrated games is good for people like LastFootnote who mostly play unrated games.
Title: Re: New basic stats page
Post by: jsh357 on May 17, 2014, 03:42:14 pm
A more general question: what all data are you able to pull easily this way?  Is it in a parse-able format?  This may seem small, but every little feature we have like this opens the door to something more robust e.g. Councilroom.

Title: Re: New basic stats page
Post by: amalloy on May 17, 2014, 03:47:15 pm
A more general question: what all data are you able to pull easily this way?  Is it in a parse-able format?  This may seem small, but every little feature we have like this opens the door to something more robust e.g. Councilroom.

It's better than parseable; it's already parsed and in the gokosalvager database, as I mentioned. AI has the results of like every game ever played on goko, including the logfile and the supply. The main problem right now is the supply, which is stored as one big string. Once we figure out a better way to save that in an indexed fashion, it becomes a lot easier to do statistics based on supply cards. But it's still an unsolved problem to answer questions like "in game XYZ, did jsh ever buy a Scavenger?" The log files are not parsed at all, so you have to work with files like http://dominionlogs.goko.com/20140517/log.516d31dbe4b082c74d7b3391.1400310541265.txt.
Title: Re: New basic stats page
Post by: Mic Qsenoch on May 17, 2014, 03:53:32 pm
This is probably silly, but I've been curious (paranoid) about this ever since the onigame set generator thread. How hard would it be to check if pro games are using unbiased random selection of the kingdom cards? I will try and figure out how to access the database and run the stats when I have time/motivation. Unless anyone else feels motivated...
Title: Re: New basic stats page
Post by: SCSN on May 17, 2014, 04:12:53 pm
Great work!

Well, I can do a few things. I can ignore games that have fewer than N turns (probably like 3 is good), and I can ignore non-Pro games. I'm a little dubious about ignoring non-Pro, but I definitely shouldn't be counting quick resigns.

I think by default you should count everything but give users the option to filter for whatever they want. I quitted dozens (possibly over a hundred) games due to laptop crashes. AI has been particularly generous in offering a subsequent T1 resign, so counting one but not the other would greatly distort the results. Well, maybe you shouldn't count everything by default, pick whatever criteria you think are most sensible, but please leave the option to include and exclude everything we may want (early resigns, quits, unrated games, casual games, etc.).

I'd also love to see the option to select a date range.
Title: Re: New basic stats page
Post by: markusin on May 17, 2014, 04:16:21 pm
A more general question: what all data are you able to pull easily this way?  Is it in a parse-able format?  This may seem small, but every little feature we have like this opens the door to something more robust e.g. Councilroom.
"As we speak, the followers of the once glorious Council Room continue to set up information networks around the lands of Goko. Their mission will not be complete until the Council Room is restored and capable to mining all the information there is to know about the events taking place in Goko. They do this in the name of data sharing and statistics."

I'm noticing most of the players I've played the most game against are people I played against in GokoDom. There were a lot of resigns on my part to get the turn order right for those games. A turn 1 resign filter or somethingl ike that would be great.
Title: Re: New basic stats page
Post by: amalloy on May 17, 2014, 04:31:47 pm
A more general question: what all data are you able to pull easily this way?  Is it in a parse-able format?  This may seem small, but every little feature we have like this opens the door to something more robust e.g. Councilroom.
"As we speak, the followers of the once glorious Council Room continue to set up information networks around the lands of Goko. Their mission will not be complete until the Council Room is restored and capable to mining all the information there is to know about the events taking place in Goko. They do this in the name of data sharing and statistics."

I'm noticing most of the players I've played the most game against are people I played against in GokoDom. There were a lot of resigns on my part to get the turn order right for those games. A turn 1 resign filter or somethingl ike that would be great.

I edited those out when jsh suggested it. SCSN wants a way to include them again, which should be doable, but for the moment your gokodom resigns aren't doing anything to your stats.
Title: Re: New basic stats page
Post by: markusin on May 17, 2014, 04:38:25 pm
^
Gotcha. Awesome work on the whole thing, BTW.
Title: Re: New basic stats page
Post by: ragingduckd on May 17, 2014, 09:25:36 pm
This is probably silly, but I've been curious (paranoid) about this ever since the onigame set generator thread. How hard would it be to check if pro games are using unbiased random selection of the kingdom cards? I will try and figure out how to access the database and run the stats when I have time/motivation. Unless anyone else feels motivated...

Check how often each kingdom appears in the game history.

For all-base games, the odds of seeing the same kingdom twice in a row are about 1 in 3 million.  For games with all expansions, it's more like 1 in 10^16.

With ~1 million Pro games played so far, and no non-bot player having played more than ~4k games, any kingdom that appears twice for the same player is strong evidence of cheating.  Actually, even seeing 5 of the same cards repeated is pretty damning.

The only problem with implementing this solution is that my current database scheme sucks.  It records the kingdom as a string (e.g. "Throne Room, Moat, Witch, Hamster, ...") rather than as individual cards.  And the order in which those cards appear isn't guaranteed.  So doing this test requires a lot more programming and CPU time than just writing a clever SQL query.
Title: Re: New basic stats page
Post by: Mic Qsenoch on May 17, 2014, 10:07:09 pm
This is probably silly, but I've been curious (paranoid) about this ever since the onigame set generator thread. How hard would it be to check if pro games are using unbiased random selection of the kingdom cards? I will try and figure out how to access the database and run the stats when I have time/motivation. Unless anyone else feels motivated...

Check how often each kingdom appears in the game history.

For all-base games, the odds of seeing the same kingdom twice in a row are about 1 in 3 million.  For games with all expansions, it's more like 1 in 10^16.

With ~1 million Pro games played so far, and no non-bot player having played more than ~4k games, any kingdom that appears twice for the same player is strong evidence of cheating.  Actually, even seeing 5 of the same cards repeated is pretty damning.

The only problem with implementing this solution is that my current database scheme sucks.  It records the kingdom as a string (e.g. "Throne Room, Moat, Witch, Hamster, ...") rather than as individual cards.  And the order in which those cards appear isn't guaranteed.  So doing this test requires a lot more programming and CPU time than just writing a clever SQL query.

Oh, I'm not worried about cheating. At one point Goko was using a scheme for choosing the kingdom cards which was a biased random selection based on card properties. There's a long thread about it here:

http://forum.dominionstrategy.com/index.php?topic=5801.0

I'm not sure if it was ever actually used for Pro games, but at some point it was the default for Casual. After some complaints/discussion, we were told that Goko stopped using this set generator. I think this is probably true, I am just curious/paranoid and it shouldn't be too hard to check just by looking at a few thousand games and counting the frequency that cards appear. I don't know how many games you'd have to sample before you were confident the counts were sufficiently close to the actual probabilities, but I wouldn't think it would be that many. The set generator biased some cards very heavily.

Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.

If I had a list of like 10,000 Pro generated kingdoms, I think I could write something to count it all up. I just don't know how easy it is to get that from your database.
Title: Re: New basic stats page
Post by: ragingduckd on May 17, 2014, 10:56:51 pm
This is probably silly, but I've been curious (paranoid) about this ever since the onigame set generator thread. How hard would it be to check if pro games are using unbiased random selection of the kingdom cards? I will try and figure out how to access the database and run the stats when I have time/motivation. Unless anyone else feels motivated...

Check how often each kingdom appears in the game history.

For all-base games, the odds of seeing the same kingdom twice in a row are about 1 in 3 million.  For games with all expansions, it's more like 1 in 10^16.

With ~1 million Pro games played so far, and no non-bot player having played more than ~4k games, any kingdom that appears twice for the same player is strong evidence of cheating.  Actually, even seeing 5 of the same cards repeated is pretty damning.

The only problem with implementing this solution is that my current database scheme sucks.  It records the kingdom as a string (e.g. "Throne Room, Moat, Witch, Hamster, ...") rather than as individual cards.  And the order in which those cards appear isn't guaranteed.  So doing this test requires a lot more programming and CPU time than just writing a clever SQL query.

Oh, I'm not worried about cheating. At one point Goko was using a scheme for choosing the kingdom cards which was a biased random selection based on card properties. There's a long thread about it here:

http://forum.dominionstrategy.com/index.php?topic=5801.0

I'm not sure if it was ever actually used for Pro games, but at some point it was the default for Casual. After some complaints/discussion, we were told that Goko stopped using this set generator. I think this is probably true, I am just curious/paranoid and it shouldn't be too hard to check just by looking at a few thousand games and counting the frequency that cards appear. I don't know how many games you'd have to sample before you were confident the counts were sufficiently close to the actual probabilities, but I wouldn't think it would be that many. The set generator biased some cards very heavily.

Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.

If I had a list of like 10,000 Pro generated kingdoms, I think I could write something to count it all up. I just don't know how easy it is to get that from your database.

Oh ok.  I get it now.

The coding wouldn't be hard, even with my horrible way of storing the kingdoms.  But it'd be super-easy if I'd done it properly.

You either need a SQL tool that can connect to my database and download all 1 million kingdoms, then a programming language that can read that file and parse out the individual cards to create the metric you want.

Or you need a language that can do both.  Like the Python with the module py-postgresql, which is what I use for my server programming.
Title: Re: New basic stats page
Post by: serakfalcon on May 17, 2014, 11:04:47 pm
This is probably silly, but I've been curious (paranoid) about this ever since the onigame set generator thread. How hard would it be to check if pro games are using unbiased random selection of the kingdom cards? I will try and figure out how to access the database and run the stats when I have time/motivation. Unless anyone else feels motivated...

Check how often each kingdom appears in the game history.

For all-base games, the odds of seeing the same kingdom twice in a row are about 1 in 3 million.  For games with all expansions, it's more like 1 in 10^16.

With ~1 million Pro games played so far, and no non-bot player having played more than ~4k games, any kingdom that appears twice for the same player is strong evidence of cheating.  Actually, even seeing 5 of the same cards repeated is pretty damning.

The only problem with implementing this solution is that my current database scheme sucks.  It records the kingdom as a string (e.g. "Throne Room, Moat, Witch, Hamster, ...") rather than as individual cards.  And the order in which those cards appear isn't guaranteed.  So doing this test requires a lot more programming and CPU time than just writing a clever SQL query.

Oh, I'm not worried about cheating. At one point Goko was using a scheme for choosing the kingdom cards which was a biased random selection based on card properties. There's a long thread about it here:

http://forum.dominionstrategy.com/index.php?topic=5801.0

I'm not sure if it was ever actually used for Pro games, but at some point it was the default for Casual. After some complaints/discussion, we were told that Goko stopped using this set generator. I think this is probably true, I am just curious/paranoid and it shouldn't be too hard to check just by looking at a few thousand games and counting the frequency that cards appear. I don't know how many games you'd have to sample before you were confident the counts were sufficiently close to the actual probabilities, but I wouldn't think it would be that many. The set generator biased some cards very heavily.

Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.

If I had a list of like 10,000 Pro generated kingdoms, I think I could write something to count it all up. I just don't know how easy it is to get that from your database.

Oh ok.  I get it now.

The coding wouldn't be hard, even with my horrible way of storing the kingdoms.  But it'd be super-easy if I'd done it properly.

You either need a SQL tool that can connect to my database and download all 1 million kingdoms, then a programming language that can read that file and parse out the individual cards to create the metric you want.

Or you need a language that can do both.  Like the Python with the module py-postgresql, which is what I use for my server programming.
Yeah the cards should have been stored in a table and a join table of cards to game would have saved a lot of work. it's not too late to fix it though!
Title: Re: New basic stats page
Post by: ragingduckd on May 18, 2014, 12:13:09 am
Yeah the cards should have been stored in a table and a join table of cards to game would have saved a lot of work. it's not too late to fix it though!

Well duh.

I wrote my parser, database, and UI with the goal of just making something available quickly.  At the time, at least three other f.ds members were each working on similar projects or on getting councilroom.com back online.  I never expected my quick-and-dirty implementation would still be the community's only Goko-compatible tool 11 months later.

For sure, the database schema and about a zillion other things could be enormously improved.  If I were really serious about it, I'd probably scrap the whole thing and redesign from the ground up with the understanding that this was going to be the community's only tool for game search, stats, and analysis.  But I do have my limits, particularly given that this is the first time that anyone has shown enough interest to actually write something based on my database.  For all I know, it's the first time anyone's even connected to it.

If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
Title: Re: New basic stats page
Post by: Donald X. on May 18, 2014, 12:31:52 am
Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.
It seems easy to look at the code; maybe it's not some secret server-side thing. Wei-Hwa's thing is its own file (checks), dominionSetGenerator.js, and anything using it will have to say (checks) DominionSetGenerator. So search for that string in other files. Probably you will find it commented out somewhere.
Title: Re: New basic stats page
Post by: Beyond Awesome on May 18, 2014, 12:35:38 am
Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.
It seems easy to look at the code; maybe it's not some secret server-side thing. Wei-Hwa's thing is its own file (checks), dominionSetGenerator.js, and anything using it will have to say (checks) DominionSetGenerator. So search for that string in other files. Probably you will find it commented out somewhere.

One thing I do feel is going on is that Walled Village is showing up less than other promos and other cards. I mean this as someone who owns Walled Village, I swear I see it less than everything else, and that is something I would notice since it is a village and you need villages to make an engine.
Title: Re: New basic stats page
Post by: serakfalcon on May 18, 2014, 12:49:16 am
Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.
It seems easy to look at the code; maybe it's not some secret server-side thing. Wei-Hwa's thing is its own file (checks), dominionSetGenerator.js, and anything using it will have to say (checks) DominionSetGenerator. So search for that string in other files. Probably you will find it commented out somewhere.
Casual and Unrated games use the set generator, pro games do not. (At least, the last time I checked the code a couple months ago, but I doubt it's changed since then)
Title: Re: New basic stats page
Post by: jsh357 on May 18, 2014, 12:56:38 am
Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.
It seems easy to look at the code; maybe it's not some secret server-side thing. Wei-Hwa's thing is its own file (checks), dominionSetGenerator.js, and anything using it will have to say (checks) DominionSetGenerator. So search for that string in other files. Probably you will find it commented out somewhere.
Casual and Unrated games use the set generator, pro games do not. (At least, the last time I checked the code a couple months ago, but I doubt it's changed since then)

Interesting... that would explain why I never see certain cards when playing bots (like Feast) but constantly see some (like Philosopher's Stone).  It's subtle, but there are definitely some cards getting precedence in casual.
Title: Re: New basic stats page
Post by: serakfalcon on May 18, 2014, 01:41:01 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I tried to get a version of the server running a while back, I think I ran out of time to work on it before I had figure out how to get everything working in windows. I can take another crack at it but it'll take a while before anything substantive comes of it I'm afraid...
Title: Re: New basic stats page
Post by: amalloy on May 18, 2014, 02:14:15 am
Like I said, I don't believe Goko is using the set generator anymore, but it would give me peace of mind (or something) to know for sure.
It seems easy to look at the code; maybe it's not some secret server-side thing. Wei-Hwa's thing is its own file (checks), dominionSetGenerator.js, and anything using it will have to say (checks) DominionSetGenerator. So search for that string in other files. Probably you will find it commented out somewhere.
Casual and Unrated games use the set generator, pro games do not. (At least, the last time I checked the code a couple months ago, but I doubt it's changed since then)

Interesting... that would explain why I never see certain cards when playing bots (like Feast) but constantly see some (like Philosopher's Stone).  It's subtle, but there are definitely some cards getting precedence in casual.

I did some unscientific sampling, and I think this is just confirmation bias. I took 10,000 random pro games and 10,000 random casual games. Then I removed all the promos and base cards (since I figure these will show up with frequencies that relate more to sets owned than anything else). For each card, i counted what % of pro games it showed up in, and what % of casual games. Then, I divided these two percentages by each other, and sorted them, to see which cards are most heavily weighted to pro and casual.

Every card is within 30% of "normal" - that is, showing up exactly as often in pro as in casual. A couple of the most "fun" cards (KC, GM) show up only 72% as often in pro games: one reasonable interpretation of this is that when someone pre-sets a casual game, they include these most often. Likewise, a few of the least fun cards (Cultist, Pillage, Mandarin(?)) show up 25-30% more often in pro games; probably, pre-set games don't include these cards because nobody loves seeing them on the board.

I'm not sure what the "expected" deviation would be for a perfectly random card selection, but 30% seems pretty plausible - I think an automated "introduce the fun cards more often" process would be more biased than this. But, if anyone cares to run more statistics on this data, it's available at https://gist.github.com/amalloy/faebd4509ad922a982d7 (where the numbers are obtained via the method described above).

As for jsh's observation about Philosopher's Stone: it appears 20% more often in pro games than in casual games. I wouldn't worry that Goko is trying to sneak more of them into your bot games!
Title: Re: New basic stats page
Post by: SCSN on May 18, 2014, 02:19:09 am
a few of the least fun cards (Cultist, Pillage, Mandarin(?)) show up 25-30% more often in pro games

Wow, good to see I'm not the only one who shits his pants whenever Mandarin shows up in a kingdom. I really started worrying that something might be wrong with me.
Title: Re: New basic stats page
Post by: amalloy on May 18, 2014, 02:33:55 am
a few of the least fun cards (Cultist, Pillage, Mandarin(?)) show up 25-30% more often in pro games

Wow, good to see I'm not the only one who shits his pants whenever Mandarin shows up in a kingdom. I really started worrying that something might be wrong with me.

While I don't recall admitting to any accidental fecal release, I can neither confirm nor deny that you are the only one.
Title: Re: New basic stats page
Post by: serakfalcon on May 18, 2014, 10:01:54 am
I did some unscientific sampling, and I think this is just confirmation bias. I took 10,000 random pro games and 10,000 random casual games. Then I removed all the promos and base cards (since I figure these will show up with frequencies that relate more to sets owned than anything else). For each card, i counted what % of pro games it showed up in, and what % of casual games. Then, I divided these two percentages by each other, and sorted them, to see which cards are most heavily weighted to pro and casual.

Every card is within 30% of "normal" - that is, showing up exactly as often in pro as in casual. A couple of the most "fun" cards (KC, GM) show up only 72% as often in pro games: one reasonable interpretation of this is that when someone pre-sets a casual game, they include these most often. Likewise, a few of the least fun cards (Cultist, Pillage, Mandarin(?)) show up 25-30% more often in pro games; probably, pre-set games don't include these cards because nobody loves seeing them on the board.

I'm not sure what the "expected" deviation would be for a perfectly random card selection, but 30% seems pretty plausible - I think an automated "introduce the fun cards more often" process would be more biased than this. But, if anyone cares to run more statistics on this data, it's available at https://gist.github.com/amalloy/faebd4509ad922a982d7 (where the numbers are obtained via the method described above).

As for jsh's observation about Philosopher's Stone: it appears 20% more often in pro games than in casual games. I wouldn't worry that Goko is trying to sneak more of them into your bot games!

with 10,000 games 30% seems like a huge deviation. However your metric isn't that useful, we shouldn't be dividing them by each other but separately by expected frequency. (which is, admittedly, hard to predict because we don't know who bought what sets). With your metric we don't know if casual is biased or pro is biased, just that they are biased from each other in a major way. (non biased with samples of 10,000 should be in the single digit percents or less).
Title: Re: New basic stats page
Post by: 2.71828..... on May 18, 2014, 10:03:24 am
question:  how are ties calculated into this percentage?
Title: Re: New basic stats page
Post by: amalloy on May 18, 2014, 01:04:18 pm
question:  how are ties calculated into this percentage?

Each win is worth 1 point, ties are 0.5, and losses are 0. So a tie has the effect of bringing your total closer to 50% (you can see this effect in, for example, my win-rate against AdamH: 50% of 9 games)
Title: Re: New basic stats page
Post by: Hugovj on May 18, 2014, 02:59:24 pm
Great work :D
Title: Re: New basic stats page
Post by: amalloy on May 18, 2014, 04:35:28 pm
Great work!

Well, I can do a few things. I can ignore games that have fewer than N turns (probably like 3 is good), and I can ignore non-Pro games. I'm a little dubious about ignoring non-Pro, but I definitely shouldn't be counting quick resigns.

I think by default you should count everything but give users the option to filter for whatever they want. I quitted dozens (possibly over a hundred) games due to laptop crashes. AI has been particularly generous in offering a subsequent T1 resign, so counting one but not the other would greatly distort the results. Well, maybe you shouldn't count everything by default, pick whatever criteria you think are most sensible, but please leave the option to include and exclude everything we may want (early resigns, quits, unrated games, casual games, etc.).

I'd also love to see the option to select a date range.

I added checkboxes for pro/unrated/casual/early-resignation. Datepicker sounds like a good idea but is more work; I'll probably get to it eventually.
Title: Re: New basic stats page
Post by: serakfalcon on May 19, 2014, 01:50:49 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?
Title: Re: New basic stats page
Post by: amalloy on May 19, 2014, 02:56:32 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

The only tables that you actually need are game and presult. Everything else is just various nonsense he's accumulated over time, I think, or things that aren't related to the project you're hoping to undertake.
Title: Re: New basic stats page
Post by: ragingduckd on May 19, 2014, 03:28:05 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

The only tables that you actually need are game and presult. Everything else is just various nonsense he's accumulated over time, I think, or things that aren't related to the project you're hoping to undertake.

Yes, game + presult is pretty much the whole story for Pro games.
Title: Re: New basic stats page
Post by: rrenaud on May 20, 2014, 11:35:04 am
One interesting stat that I didn't have on CR but that would fit well with AI's system is this:

Your net change in rating after playing different players.  So you'll see who you've earned and lost your points from.  It's good for breeding rivalries, finding feared opponents, and discovering opponents who seem to love to make you look better.

(Of course, you'll need to hook into the trueskill implementation, not just the games database).

I did this for my previous race for the galaxy stats site.  EG, see here.  http://jburnim.github.io/rftgstats/tgs/player_rrenaud.html
Title: Re: New basic stats page
Post by: ragingduckd on May 20, 2014, 04:32:46 pm
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

I agree with amalloy that it shouldn't be necessary, but I just granted select privileges on advbot to the forum user anyway.  Let me know if there's any other access you need.  I'd just open up the whole thing, but there are few tables (e.g. blacklist) that I'd rather not make public.
Title: Re: New basic stats page
Post by: ragingduckd on May 20, 2014, 04:34:45 pm
One interesting stat that I didn't have on CR but that would fit well with AI's system is this:

Your net change in rating after playing different players.  So you'll see who you've earned and lost your points from.  It's good for breeding rivalries, finding feared opponents, and discovering opponents who seem to love to make you look better.

(Of course, you'll need to hook into the trueskill implementation, not just the games database).

I did this for my previous race for the galaxy stats site.  EG, see here.  http://jburnim.github.io/rftgstats/tgs/player_rrenaud.html

This would be very cool.  It'd give somewhat quirky results with either Isotropish or Goko Pro, as both have a hefty bias in favor of the lower-rated player (more on this in my forthcoming analysis), but it'd still be interesting to see.
Title: Re: New basic stats page
Post by: serakfalcon on May 20, 2014, 11:49:07 pm
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

I agree with amalloy that it shouldn't be necessary, but I just granted select privileges on advbot to the forum user anyway.  Let me know if there's any other access you need.  I'd just open up the whole thing, but there are few tables (e.g. blacklist) that I'd rather not make public.

The tables I could use are supply and cardname (which actually should be merged with card_url, maybe just call it cards?)
I know amalloy is working on those now, but it will be useful for later, as I'd like to remove logfile as a pk from everywhere.
Title: Re: New basic stats page
Post by: amalloy on May 21, 2014, 01:23:20 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

I agree with amalloy that it shouldn't be necessary, but I just granted select privileges on advbot to the forum user anyway.  Let me know if there's any other access you need.  I'd just open up the whole thing, but there are few tables (e.g. blacklist) that I'd rather not make public.

The tables I could use are supply and cardname (which actually should be merged with card_url, maybe just call it cards?)
I know amalloy is working on those now, but it will be useful for later, as I'd like to remove logfile as a pk from everywhere.

This is getting a bit off-topic for this thread. Shall we take the db management stuff elsewhere? I don't really know what subforum is right.

As for those tables: yes, I created them yesterday-ish, and populated them today, and they just had whatever visibility is the default. I've now given the forum user read access. And the reason cardname and cardurl are separate is because cardname didn't exist until yesterday; I'm trying to make as few changes as possible to the existing tables.
Title: Re: New basic stats page
Post by: serakfalcon on May 21, 2014, 02:09:00 am
If you're willing to fix the database structure to store the kingdoms more sensibly, I'd be delighted: https://github.com/aiannacc/goko-dominion-tools.  I'd prefer if you work with your own local version of the database, but I can also give you write access to mine if you need it.
I don't need write access to yours but do need read permission for the tables (for example, advbot). Will that require a new user or can you give the permission to forum?

I agree with amalloy that it shouldn't be necessary, but I just granted select privileges on advbot to the forum user anyway.  Let me know if there's any other access you need.  I'd just open up the whole thing, but there are few tables (e.g. blacklist) that I'd rather not make public.

The tables I could use are supply and cardname (which actually should be merged with card_url, maybe just call it cards?)
I know amalloy is working on those now, but it will be useful for later, as I'd like to remove logfile as a pk from everywhere.

This is getting a bit off-topic for this thread. Shall we take the db management stuff elsewhere? I don't really know what subforum is right.


I'll make an issue in Github
Title: Re: New basic stats page
Post by: 2.71828..... on May 31, 2014, 10:54:23 pm
The stats page was working earlier today, but is no longer working.  I know you said it could disappear at any time, but I am just curious if this is a bug or a disappearing act.

If it is a disappearing act I will be very sad.  I really enjoyed learning things like my win rate against WanderingWinder is about 27%
Title: Re: New basic stats page
Post by: amalloy on May 31, 2014, 10:56:34 pm
The stats page was working earlier today, but is no longer working.  I know you said it could disappear at any time, but I am just curious if this is a bug or a disappearing act.

If it is a disappearing act I will be very sad.  I really enjoyed learning things like my win rate against WanderingWinder is about 27%

Something is wrong the gokosalvager database that the stats page uses. I'll send Andrew an email to see what's up.

Edit: AI was doing somehousekeeping without telling me. The stats page is back.
Title: Re: New basic stats page
Post by: SirD on July 28, 2014, 04:57:14 am
Hello all,

does this awesome project only take 2 player games into account?
Title: Re: New basic stats page
Post by: amalloy on July 28, 2014, 03:34:42 pm
Hello all,

does this awesome project only take 2 player games into account?

Yes, two-player games only, just like the isotropish leaderboard. Figuring out whether who "won" and "lost" in a 3+ player game is just weird and not really that useful.

Also, I've finally given this program a slightly nicer URL: http://gokostats.malloys.org (the old URL will continue to work, but you should use the new one just in case I change the port number or move to Andrew's server someday in the future).
Title: Re: New basic stats page
Post by: rrenaud on July 28, 2014, 05:02:30 pm
I think it's simple.  The winner won.  Everyone else lost.  You neither beat nor lost to the player who got third if you were 2nd.

Of course, it's basically not useful because who plays >2p :P.
Title: Re: New basic stats page
Post by: Holger on August 14, 2014, 11:04:11 am
So, go try it out! Let me know if there's anything wrong, or if there's something more you'd like added (no promises I can do it, of course). Is this something you'd like to live at gokosalvager.com?

Yes.  :) But I'd like the page to also show statistics for opponents with <4 games, at least when there's few or no opponents with >4 games.
Is it intended that pro/casual games against bots are not included? You do seem to list the adventures' bots, after all...
Title: Re: New basic stats page
Post by: ThaddeusB on August 28, 2014, 12:35:33 pm
Any particular reason bot games aren't included?