<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; player</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=player" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>risk matching in gambling</title>
		<link>https://blog.yhuang.org/?p=520</link>
		<comments>https://blog.yhuang.org/?p=520#comments</comments>
		<pubDate>Thu, 23 Jun 2011 06:57:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chip unit]]></category>
		<category><![CDATA[fruitful path]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[group scheme]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[risk profiles]]></category>
		<category><![CDATA[risk reward]]></category>
		<category><![CDATA[Scheme]]></category>
		<category><![CDATA[size]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=520</guid>
		<description><![CDATA[An argument for playing a game such as poker with &#8220;real&#8221; money is that it forces people to play with true risk-reward calculations. While this is certainly better than playing without risk, there exists the question of how to match risk profiles among players. With enough players (large liquid market), they can self-sort by stake [...]]]></description>
			<content:encoded><![CDATA[<p>An argument for playing a game such as poker with &#8220;real&#8221; money is that it forces people to play with true risk-reward calculations. While this is certainly better than playing without risk, there exists the question of how to match risk profiles among players. With enough players (large liquid market), they can self-sort by stake size, and this seems fair. With only few people though, the situation is turned around, where a stake size has to be <em>agreed upon</em> at some clearing size (so that enough people agree to play the game) rather than chosen individually, and that same amount of money may be considered as very different values by different people. A pauper and a millionaire do not see $100 as the same value, and will adjust their utilities accordingly, and this will materially affect wagering. Since risk is measured in utility units, it is desirable to match utilities rather than dollar amounts. But there isn&#8217;t an agreed-upon utility currency. Or is there?<br />
<span id="more-520"></span><br />
There is: the chips, they are perfect representations. So utility matching could be a fruitful path. Start with this: suppose prior to playing, each player declares an &#8220;exchange rate&#8221; for chips, say 1 chip-unit = $5, and pays however much it takes to get the amount of chips needed for his stake in the game. Without a loss of generality, all games can be played with say 1000 chip units. So this player would pay $5000 to get his chips. Another player who declares 1 chip-unit = $0.05 would pay $50 to get her chips, and so on. At the end of the game, the winning player takes all of the chips at the table and exchanges them back for money. For example, If four people played, then there are 4000 chips, so the person who declared 1 chip-unit = $5 would get $20K, and the person who declared 1 chip-unit = $0.05 would get $200. If we call the usual way of stake-setting with a small group Scheme A, then we call the one described in this paragraph Scheme B.</p>
<p>Two problems arise with Scheme B. One, winning players whose dollar-per-chip exchange rate happens to be &#8220;higher&#8221; than average can&#8217;t be paid back fully from that game alone, or ever if he keeps winning. Two, the players may not declare truthfully. Is there a clean way out of this?</p>
<p>The second problem is complicated, so ignore it now. The first problem occurs because the group of players does not, in aggregate, support the payoff profile demanded by the players with above-average dollar-per-chip exchange rates, if they also win more than average. In this context, we see that Scheme A (a group playing with agreed-upon equal-dollar stakes) gets around this problem by essentially setting a common exchange rate for everybody at the minimum of the group (that which enticed the last person to join). This works, but can we combine Scheme A&#8217;s payoff fairness with Scheme B&#8217;s utility matching fairness?</p>
<p>To some extent, yes. A marginal improvement can be made by noting that, as long as the players do not win 100% of the games, some exchange rate flexibility can be allowed. This is an interesting fundamental trade-off: the less spread out the winning percentages of players, the more spread out they can bid their exchange rates, and vice versa. In the one extreme, players set the same exchange rates (Scheme A) and any game outcome can be supported. At the other extreme, if the players are equally likely to win, then on average no chips change hands, so it wouldn&#8217;t matter what exchange rates were set (Scheme B). I should probably quantify what happens in the middle but can&#8217;t be bothered to do it today.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=520</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>on 80 points (bashifen), aka tractor (tuolaji), aka double rise (shuangsheng)</title>
		<link>https://blog.yhuang.org/?p=176</link>
		<comments>https://blog.yhuang.org/?p=176#comments</comments>
		<pubDate>Mon, 30 Mar 2009 02:59:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[expansion]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[level cards]]></category>
		<category><![CDATA[ms hearts]]></category>
		<category><![CDATA[partnership game]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[point cards]]></category>
		<category><![CDATA[round]]></category>
		<category><![CDATA[team]]></category>
		<category><![CDATA[zero sum game]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=176</guid>
		<description><![CDATA[This is a popular card game of the 5-10-K class played in China, the rules of which are described in English here, but not in a generalizable way. Another version on Wikipedia makes logical sense but isn&#8217;t how I&#8217;ve seen it in practice. In any case, like for many card and board games, the rules [...]]]></description>
			<content:encoded><![CDATA[<p>This is a popular card game of the 5-10-K class played in China, the rules of which are described in English <a href="http://www.pagat.com/kt5/tractor.html">here</a>, but not in a generalizable way. Another <a href="http://en.wikipedia.org/wiki/Bashi_Fen">version on Wikipedia</a> makes logical sense but isn&#8217;t how I&#8217;ve seen it in practice. In any case, like for many card and board games, the rules are not described in a proper way for the new player and that&#8217;s annoying (some rules are not important or obvious, other rules are important but obscure, etc.). I remember in the help files of say, MS Hearts, they follow a four-section template of: (0) basics, (1) goal of the game, (2) playing the game, and (3) strategy; in that order, which I think is the perfect logic that should be used for describing all games. Why nobody wants to explain a relatively simple game as this except by enumeration of examples is a mystery to me, so here goes:</p>
<p><u>Basics:</u><br />
The game is played with two joker-included decks of cards. 5, 10, and K are point cards worth face value, except K is worth 10 points. It is a standard 4-player partnership game, so a person and his cross is a team. It is played in multiple rounds and each round there is a dealer (hence a &#8220;dealer&#8221; team and an opposing &#8220;grabber&#8221; team). Each team keeps a &#8220;level&#8221; represented by a card rank (i.e. 2,3,&#8230;,A), and each round is associated with the dealer&#8217;s level, whose corresponding rank cards are called the level cards.<br />
<span id="more-176"></span></p>
<p><u>Goal of the game:</u><br />
A team&#8217;s goal in the game is to rise from the lowest level (2) through the highest level (A) before the other team. To rise to a higher level, the team must accrue enough points in a round by taking tricks with point cards in them. In usual score keeping, only the grabber team&#8217;s points are counted &#8212; it&#8217;s a zero-sum game. So the dealer team can be better thought of as seeking to prevent the other team from accruing points.</p>
<p><u>Playing the game:</u><br />
Both teams start the first round at the lowest level 2.</p>
<p>Establishing trump and rank: Each round of play begins by dealing all but the last 8 cards face-down, hands-up, dealer first. During the deal, the trump suit is determined by revealing identical level card(s) of the same suit or identical joker(s). The player first to the table with the most identical cards at any given moment is said to govern the trump in that suit at that moment; except if another player reveals the same number of (or greater) identical jokers, in which case the first of the latter players to do so governs the trump and the round is notrump. A player who governs the trump at a given moment may only continue to reveal cards identical to the winning ones.</p>
<p>Once dealing completes, the last determined trump suit becomes official. The final card ranks in descending order are then defined as follows: color jokers, black jokers, trump suit level cards, other level cards, other trump suit cards in A&#8230;2 order, other rank cards in the leading suit in A&#8230;2 order, other rank cards of the other suits in A&#8230;2 order. There is a little bit of strangeness here: jokers and level cards are considered part of the trump suit for all purposes of play other than this initial rank definition.</p>
<p>Bottom pile: After dealing/trump determination, the dealer takes the last 8 cards into his hand. Then he takes 8 cards from this hand to leave face-down as the &#8220;bottom pile&#8221;. Point cards left in the bottom cards have consequences for scoring.</p>
<p>Playing tricks, leading: As usual, the dealer leads on the first trick and subsequently the winner of the prior trick leads. The lead can lay down cards with the following &#8220;patterns&#8221; (<em>to be a pattern, cards in the pattern must be in a single suit</em>): a single card, a multiplicity of <em>identical</em> cards (not just in the same &#8220;suit&#8221;, c.f. trump suit), &#8220;tractors&#8221;, and &#8220;tosses&#8221;.</p>
<p>Tractors are runs of the same multiplicity (>1) of identical cards, where &#8220;run&#8221; is determined by the final card ranks. </p>
<p>Tosses are combinations of singles, multiples, and tractors whose components are seperately unbeatable <em>in the suit</em>. It does not imply that a different outcome is impossible were the components played sequentially even in an optimal way (so tosses are advantageous, at least on that trick). However, it <em>would</em> be a degenerate contraction play if this were a one-suit game. Anyway, this is the most obfuscating aspect of the game.</p>
<p>Note that there is a recursive expansion of higher order patterns into lower order patterns. Let&#8217;s denote the patterns single, multiple, tractor, and toss respectively as S,M,T,X. Then the allowed expansion rules (from observed practice) are M=M*S*, T=M*, and X=T*M*S*. The X expansion is the unique maximal one given by its definition. The T expansion fully and uniquely expands the tractor into its component multiples. The M expansion is different from the rest because it is non-unique.</p>
<p>We can also define an algorithm for matching a subset of some set of cards to any pattern. It involves recursive expansion of the pattern and matching T and M, which are defined by their lengths. Note that T, M, or S are all degenerate forms of X, so without loss of generality we only describe the case for X. Follow this precedence:<br />
1. Given X, the order is to match T* in the expansion, from long to short; each match removes a T from the pattern from further consideration;<br />
2. For the remaining which we call X&#8217;, we expand X&#8217;=T&#8217;*M*S*=M*S* and match the M* from long to short; each match removes an M;<br />
3. For the remaining which we call X&#8221;=M*S*, we take the longest remaining M and expand it in X&#8221; in all possible ways (which necessarily shortens some M) and sort the resulting list of expanded patterns of X&#8221; by longest M, then we discard all but the top of the list, and repeat from 2 on the top of the list; each successful match removes an M; we keep doing this until all the M&#8217;s are matched or all M&#8217;s are turned into S&#8217;s;<br />
4. Match the remaining S* trivially.</p>
<p>To complete the algorithm, define &#8220;successful&#8221; match to a T or M of a certain length. There are two kinds. In &#8220;minimal&#8221; pattern matching, a successful match is between T or M in the set of cards whose <em>maximal</em> length is <em>the same as</em> that of the target T or M. In &#8220;maximal&#8221; pattern matching, a successful match is between any subset of cards that <em>can</em> form T or M of the target T or M length (i.e. they may be part of a longer T or M).</p>
<p>Playing tricks, ranks of same-pattern laydowns: When full pattern matching (i.e. the <em>maximal</em> pattern matching requires no T- or M-expansion) occurs between two laydowns, then we can determine rank between them. One multiple outranks another if its singles all outrank; one tractor outranks another if the lowest multiple of the first outranks the same of the second; one toss outranks another if there exists a correspondence of singles, multiples, and tractor components in the two tosses such that each component of the first outranks the corresponding component of the second.</p>
<p>Playing tricks, following: A follower must play the same number of cards as the lead. In selecting these cards, he must attempt to match the leading pattern out of his leading suit using the <em>minimal</em> pattern matching algorithm. If his leading suit is exhausted in the middle of the algorithm, the remaining can be made up without restriction using any card of any suit. A trick is won by the person first displaying a laydown that is not outranked. A laydown is not outranked if (1) it has the leading pattern (i.e. is a full pattern match to the leading pattern, and of course in some single suit); and (2) it is not outranked among laydowns having the leading pattern. Corollary: The leading laydown can only be outranked by the same pattern with higher rank in the leading suit or by the same pattern with any rank in the trump suit; if the latter is played, that can only be further outranked by the same pattern with a higher rank in the trump suit.</p>
<p>Scoring: The point card values won by the grabber team are added. If the final trick is won by the grabber team, then the bottom pile is revealed, with point card values in the pile generally counting as double value. If the total is <80, the dealer team wins the round, retains deal, and rises 1 level. If the total is >=80, the grabber team wins the round, and becomes dealer. If the total is >=120, the grabber team also skips a level (so rises by 1). These are the usual cases. Ostensibly each additional 40 points allows the winning team to skip another level, but I&#8217;ve not seen this in play.</p>
<p><u>Strategy:</u><br />
Exercise for the reader.</p>
<hr />
Extra credit: The 3-deck, 5-person, dynamic partnership variant dubbed &#8220;finding friends&#8221; (zhaopengyou) can be easily described by diffing with the above description.</p>
<p>In this game, each person keeps his own level. During each round, one person is dealer and it is the dealer&#8217;s job to entice one other person to be a partner for the round, during the course of play. This is done by the dealer declaring an &#8220;identification card&#8221; on the first trick such that, when it is first played by anyone other than the dealer, that person is teamed with the dealer. Then the remaining three players become the grabber team, and they must score 130 points to win, otherwise the dealer team wins. Winning means the people in that team get to advance one level. If the grabber team reaches 195 points, the grabber team gets to skip a level. Losing means people in that team stay at the same level.</p>
<p>Notice that there is a bug here in that the dealer can declare in a way that no partner can be found&#8230; I guess that&#8217;s ok since it would be stupid to do so, but in other literature it is a strategy with point compensations.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zune, XBox, Trojan horse</title>
		<link>https://blog.yhuang.org/?p=30</link>
		<comments>https://blog.yhuang.org/?p=30#comments</comments>
		<pubDate>Sun, 18 Feb 2007 18:41:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[computational]]></category>
		<category><![CDATA[computational capabilities]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[horse marketing]]></category>
		<category><![CDATA[j allard]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[storage hub]]></category>
		<category><![CDATA[XBox]]></category>
		<category><![CDATA[zune]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=30</guid>
		<description><![CDATA[It looks like the Zune is a flop. At least in the conventional sense of market share against the iPod and portable music players. This is predictable with the kind of PR that came before its release. However, I highly doubt the Zune was meant to be just a music player. Earthlings know that the [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like the Zune is a flop. At least in the conventional sense of market share against the iPod and portable music players. This is predictable with the kind of PR that came before its release.</p>
<p>However, I highly doubt the Zune was meant to be just a music player. Earthlings know that the industry vision has been that of a central computational and storage hub in the home or on the network, and portable anywhere devices as terminals. It&#8217;s old news, but I guess it&#8217;s time to get pushy when vanilla home PC&#8217;s are already in pretty much every home and old usage models require no more computational power than is already available.</p>
<p>In this context, the Zune is a way to dump a preferred portable devices platform out there so Microsoft can write software for it. Windows Mobile on PDA is another one of those things, but far more people buy music players and cell phones than full-blown PDA&#8217;s (I&#8217;m guessing). One has to be a bit deceptive about what is really going on when pushing these devices, which is why the Zune is &#8220;just&#8221; a portable music player, when in fact, it is a big screen with computational capabilities and built-in wireless, so with a software change it immediately becomes a generic portable device. Microsoft has done this before, certainly. The XBox was &#8220;just&#8221; a gaming console &#8212; for a while. Not any more, despite J Allard&#8217;s early protests to the contrary. It&#8217;s clearly a computational and storage hub that just happens to be accepted in the living room. Intentionally implementing an accepted specialized device within a generic platform embodiment so that the specialization can later be removed is like Trojan horse marketing, I suppose (no revelation here, just a personal reflection), but it remains the case that the Trojan horse must be a gift worthwhile enough to be accepted.</p>
<p>By that measure, the XBox achieved a level of success as a gaming console by having some compelling features, but the Zune did not. The Zune was too similar to practically everything else. Maybe if the Trojan horse were a cell phone instead (iPhone?) or a car-device (GPS+music player?), Microsoft would have had more success. Actually the GPS+music player idea isn&#8217;t bad. It is getting pretty popular, but only a bunch of small random brands are selling it, with inconsistent interfaces and idiotic software as a result. There is where Microsoft could have made a difference &#8212; as it already has a well regarded PC-based navigation solution and user base from that.</p>
<p>So there you go, Microsoft. Keep the 2-cent change.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=30</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A little Markovian problem</title>
		<link>https://blog.yhuang.org/?p=12</link>
		<comments>https://blog.yhuang.org/?p=12#comments</comments>
		<pubDate>Sun, 29 Oct 2006 20:18:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backtracks]]></category>
		<category><![CDATA[coin]]></category>
		<category><![CDATA[digraph]]></category>
		<category><![CDATA[heads and tails]]></category>
		<category><![CDATA[hht]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[player player]]></category>
		<category><![CDATA[sequence context]]></category>
		<category><![CDATA[state]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=12</guid>
		<description><![CDATA[Here it is:  A has a fair coin and B has a fair coin. They flip coins together, but only keep track of their own sequences of heads and tails. A stops if the sequence &#8220;HHT&#8221; appears. B stops if the sequence &#8220;HTH&#8221; appears. Which player is more likely to stop first? While it would [...]]]></description>
			<content:encoded><![CDATA[<p>Here it is: </p>
<blockquote><p>A has a fair coin and B has a fair coin. They flip coins together, but only keep track of their own sequences of heads and tails. A stops if the sequence &#8220;HHT&#8221; appears. B stops if the sequence &#8220;HTH&#8221; appears. Which player is more likely to stop first?</p></blockquote>
<p><span id="more-12"></span></p>
<p>While it would first appear that any 3-flip sequence is equally likely and so neither A nor B is more likely to stop before the other, this is wrong. The eight 3-flip sequences are only equally likely when taken independently of the remaining sequence context. By context, I mean there is a time origin in this problem and there is memory from the stopping 3-flip sequence that leads all the way back to it.</p>
<p>The answer is found if we draw the state diagram of the game for each player.</p>
<p>Player A<br />
<img align="bottom" alt="Input: digraph G {
graph [rankdir=LR]
{0 H HH HHT [shape=doublecircle]}
0 -&gt; H [label=H]
0 -&gt; 0 [label=T]
H -&gt; HH [label=H]
H -&gt; 0 [label=T]
HH -&gt; HH [label=H]
HH -&gt; HHT [label=T]
}" src="wp-content/cache/f151847dd4f5adb6d5a138ee4e318e12.png" /></p>
<p>Player B<br />
<img align="bottom" alt="Input: digraph G {
graph [rankdir=LR]
{0 H HT HTH [shape=doublecircle]}
0 -&gt; H [label=H]
0 -&gt; 0 [label=T]
H -&gt; H [label=H]
H -&gt; HT [label=T]
HT -&gt; HTH [label=H]
HT -&gt; 0 [label=T]
}" src="wp-content/cache/df43149372f6033610ee6b9ee0c87df5.png" /></p>
<p>They are pretty much the same, except A&#8217;s diagram has a transition that backtracks by one state where the analogous transition on B&#8217;s diagram backtracks by two. So indeed, A is more likely to stop first.</p>
<p>An interesting thing happens if we let A and B continue flipping even after they are supposed to stop. This changes the destination of one transition in each state diagram. Now the two diagrams look more similar.</p>
<p>Player A<br />
<img align="bottom" alt="Input: digraph G {
graph [rankdir=LR]
{0 H HH}
0 -&gt; H [label=H]
0 -&gt; 0 [label=T]
H -&gt; HH [label=H]
H -&gt; 0 [label=T]
HH -&gt; HH [label=H]
HH -&gt; 0 [label=T color=blue]
}" src="wp-content/cache/1f05e52fe69f93b1f3ca986f4916b9b8.png" /></p>
<p>Player B<br />
<img align="bottom" alt="Input: digraph G {
graph [rankdir=LR]
{0 H HT}
0 -&gt; H [label=H]
0 -&gt; 0 [label=T]
H -&gt; H [label=H]
H -&gt; HT [label=T]
HT -&gt; H [label=H color=blue]
HT -&gt; 0 [label=T]
}" src="wp-content/cache/2485278455bd040486cf9dd6cb8c2592.png" /></p>
<p>In fact, they are equivalent (after a rotational shift of the states). So asymptotically, the sequence &#8220;HTH&#8221; occurs just as frequently as &#8220;HHT&#8221;.</p>
<p>If we look at this a little more carefully, we find that it takes on average 8 flips to see the first &#8220;HHT&#8221; while it takes an average of 10 flips to see the first &#8220;HTH&#8221;. After that, however, both subsequences occur at a rate of every 8 flips (overlapping frames allowed), which of course makes perfect sense, since there are 8 such 3-flip sequences.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
