forked from rspeer/dominionstats
-
Notifications
You must be signed in to change notification settings - Fork 17
/
supply_win.html
128 lines (121 loc) · 4.97 KB
/
supply_win.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
122
123
124
125
126
127
128
$def with (cardFilterBlurb)
<html><head><title>Card Winningness</title>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.js"></script>
<script language="javascript" type="text/javascript"
src="static/flot/jquery.parsequery.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>
<script language="javascript" type="text/javascript"
src="static/supply_win.js"></script>
<script language="javascript" type="text/javascript"
src="static/jquery.dataTables.js"></script>
<style type="text/css">
tr {
display: table-row;
}
table {
border-collapse: separate;
border-spacing: 2px 2px;
}
tr.odd {
background-color: #E2E4ff;
}
tr.even {
background-color: white;
}
th {
cursor: pointer;
}
th.overall {
background-color: #E2E4FF;
}
th.player {
background-color: #A3A9FF;
}
</style>
</head>
<body>
<p>This contains an interface to card winning stats that depend
on having up to two other cards available in the supply. It also
ranks cards and determines how much a cards quality changes as
a function of having other cards available.
<div style="float:left;width:45%;margin:10px">
<h3>Interpretting the stats</h3>
<p>This let's you see how cards perform when others are available to
be gained. When a card is conditioned upon, it simply restricts
the statistics to games in which that card was available in the
supply. The conditioned upon card does not ever have to be gained.
<ul>
<li><b>Availability</b>: The number of games in which the card is
present, multiplied by the number of players in each game.
It represents the number of "decks" that could have purchased
that card.
<li><b>%+</b>: Percentage of times the named card was gained at
least once.
<li><b>Per Gain</b>: This is win rate on the card on a per gain basis.
If player 1 bought the card 5 times and won, and player 2 bought the
card 3 times and lost, then this would count as 5 wins and 3 losses
in two player games, giving a win rate of 5 * 2 / (5 + 3) =
10 / 8 = 1.25.
<li><b>Any Gain</b>: This is a win rate that does not include multiple
gains of a card in the same game. In the above 5 winning vs 3 losing
example, the card would have a win rate of 1, because both players
purchased it.
<li><b>Num Gained</b>: The average number of the times the card was
gained when it was available, per player.
<li><b>Quality</b>: This is a measure of card quality that tries to
recover the excellent
<a href="http://forum.dominionstrategy.com/index.php?topic=1134.0">
community card rankings</a> using only the statistics about the
cards and information about the cards themselves. Currently
<a href="https://github.com/rrenaud/dominionstats/blob/master/card_ranker/optimize_ranks.py">the ranking function</a>
recovers almost 90% of the community ordered pairs,
using only the following signals:
<ul>
<li>the win rate given any gain
<li>the chance of a card being gained
<li>the number plus actions
<li>whether it has vp
<li>whether it's a reaction
</ul>
<li><b>Δ Qual</b>: The change in quality given the conditioned
cards are available.
</ul>
Post comments, questions, and insights on this
<a href="http://forum.dominionstrategy.com/index.php?topic=1451.0">
thread on the DominionStrategy forum</a>.
</div>
<div style="float:left;width:40%;margin:10px">
$:cardFilterBlurb
</div>
<div style="clear:both;"></div>
<div>
<form onSubmit="RefreshData(); return false;">
<label for="targets">target cards</label>
<input id="targets" type="text" size=70>
<br>
<label for="interaction" style="width:100px;">interaction cards</label>
<input id="interaction" type="text" size=70>
<br>
<label for="unconditional">include unconditional stats</label>
<input id="unconditional" name="unconditional" type="checkbox"
checked>
<br>
<label for="nested">include double conditions</label>
<input id="nested" name="nested" type="checkbox">
<br>
<button onclick="RefreshData();">Fetch</button>
<input type="button" onclick="DisplayUrl() && false;" value="Get Link"
id="getlink">
</form>
</div>
<input id="url_display" size="20" type="text"
style="position:absolute; z-index:10; display:none"
value="blah">
<div style="clear:both;"></div>
<div id="data_display"><b>Loading...</b></div>
</body>
</html>