forked from rspeer/dominionstats
-
Notifications
You must be signed in to change notification settings - Fork 17
/
win_graph_template.html
121 lines (112 loc) · 5.24 KB
/
win_graph_template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
$def with (title, xAxis, graphedVar, defaultValue, weightFunc, cardFilterBlurb)
<html><head><title>$title</title>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.js"></script>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.flot.js"></script>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.flot.errorbars.js"></script>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.parsequery.js"></script>
<script language="javascript" type="text/javascript"
src="static/output/all_games_card_stats.js"></script>
<script language="javascript" type="text/javascript"
src="static/stat_utils.js"></script>
<script language="javascript" type="text/javascript"
src="static/utils.js"></script>
</head>
<body>
<table>
<tr>
<td>Win Rate</td>
<td>
<div id="placeholder" style="width:1000px;height:500px;"></div></td>
</tr>
<tr>
<td></td><td><center>$xAxis</center></td>
</tr>
</table>
<form onSubmit="RefreshCardGraph('$graphedVar'); return false;">
<label for="card_names">card names</label>
<input id="card_names" type="text" size=70
value="$defaultValue">
<input type="button" value="update"
onclick="RefreshCardGraph('$graphedVar') && false;">
<input type="button" value="get link" id="getlink"
onclick="DisplayUrl() && false;">
</form>
<input id="url_display" size="20" type="text"
style="position:absolute; z-index:10; display:none"
value="blah">
<div style="width:55%;float:left;margin:10px">
<h3>Understanding the graph</h3>
<h4>Win rates</h4>
<p>
Win rate is a generalization of winning probability for multiplayer
games.
<p>A win in a 2 player game is worth 2 points, a 3 player game
is worth 3, and so on. Someone who plays only 2 player games and
wins every time will have a winrate of 2; a 2-player gamer who loses
every game has a winrate of 0; a 2-player gamer who wins exactly as
often as expected (half wins, half losses) has a winrate of 1.
<p>The win rate of an event is the average
number of points for that event. So an event that is uncorrelated
with winning will have a win rate of 1.0, and events correlated with
winning have a win rate of > 1.0, and losing with < 1.0.
<h4>Error bars</h4>
<p>The error bars represent a 95% confidence interval in the measure for a
particular event.
<p>The smaller the bars, the more times a particular event was observed, and
hence the less likely the true value is signficantly away from the center
point due to randomness.
<p>The error bars represent ±2 standard deviations. They encode the true
mean for any particular point with a probability of about 95%.
<h4>Correlation</h4>
Don't get too carried away with interpreting these graphs:
<a href="http://xkcd.com/552/">correlation does not imply
causation</a>.
<ul>
<li>In general, cards with high costs tend to look good, because they
are correlated with their buyer having lots of money. Someone who is able to get to
$8 is naturally going to have a higher win rate than someone who is only able to get to $6.
<li>Similarly, Duchies are often bought in the late game by players who are behind and
unwilling to end the game by buying out the Provinces.
<li>In addition, the 'card advantage' graph
is most accurate for non-terminal cards and cards that you
typically want more than one copy of. For instance, it buckets the [2 Chapels vs 1 Chapel]
situation into the same event as [1 Chapel vs 0 Chapels]. This is why, on average,
the graph displays a 1-Chapel advantage has being correlated with a below-average winrate
</ul>
<h4>The best choice</h4>
<p>Note that these statistics are merely an average over many games. They do not
necessarily say much about any particular game. So even though
one card's early winning rate may be higher than a different card's winning
rate on the same turn, it does not follow that the more winning card
is neccesarily the best choice for any particular game.
<h4>Curses and Embargo</h4>
<p>The apparent weirdness with the Curse graph is due to the fact that
Curses are rarely intentionally gained. The only exceptions are when
players are ending the game (almost always in a winning position) by running out
the Curse pile, or are gaining Curses as a side effect of Embargo tokens. When people
buy things despite being Embargoed, they are often buying a very valuable card.
</div>
<div style="float:left;width:38%;margin:10px">
$:cardFilterBlurb
</div>
<BR><BR>
<div style="clear:both;"></div>
<A HREF="/">Back to CouncilRoom.com</A>
<script language="javascript" type="text/javascript"
src="static/win_rate_graph.js">
</script>
<script language="javascript">
graph_type = '$graphedVar';
weight_func = $weightFunc;
var cards = $$.parseQuery().cards;
if (cards) {
$$('#card_names')[0].value = cards;
}
</script>
<div id="collection_info"></div>
</body>
</html>