How Lien works
Lien is the card game the wanderer plays in The Lien, built for one standard deck and a pile of chips. This is the whole rules set, the reasons behind the rules that changed, what 32,000 simulated games showed, and what nobody has checked by hand yet.
Written up later from the repo's history and dated to the days it describes.
The Lien has a card game inside it. It is called Lien, the wanderer invented it on the road, and he deals it at a table in the juke joint. I asked for it on September 25 as the setting's own card game on a standard deck, "like Magic the Gathering a bit but with poker cards". By September 27 it had a rules sheet, an engine, a simulation of 32,000 sittings and a table you can sit at.
This post covers all of it. The rules first, in full, since the rules are the point. Then why four of them are not what I first wrote, what the simulation said, and what is still unchecked.
What it has to be
I set three requirements before writing any rule.
The first is that it plays on a real table with one 52-card deck and a pile of chips. No hidden counters, nothing too fiddly to track, numbers small enough to add in your head. If something cannot be played physically, it can be an optional layer and never the core.
The second is simple rules and deep play, and I held every rule to two tests. It has to do one job that nothing else does, and it has to touch the other parts. A rule that stands alone is decoration.
The third is that the skill sits in holding, ordering, timing and reading the other player. The draw is luck. What you do with it is not.
One more constraint is technical. The engine depends on nothing in the game except its playing card type, so it could lift out whole and become a standalone game.
The shape of it
Two players, one deck, 50 chips each. Your chips are your life. You take theirs, guard yours, and win back what you lose.
Each player keeps a stack, which is their chips, and a take pile, which is chips they have taken. They also keep a hold of up to three cards face down, a board for face cards in play, and any guards and raises laid in front of them. You lose when your stack and your take pile are both empty. That is called broke.
Card values are what you would expect, with an ace at 1 and the face cards at 11, 12 and 13. Each player starts with five cards. The guest goes first and does not draw on their first turn.
A turn runs in four steps. Your board acts. You draw one card. You take one action, which is to play a card from your hand, to hold a card face down, or to cash a chain. Then you discard down to seven in hand, and the hold does not count against that. At the start of your turn you may instead walk away with your stack and your take pile.
The four suits
Each suit has one job.
Spades take. A spade takes its value from the other player into your take pile. The chips come from their stack first, then from their take pile. You can aim a take at one of their face cards instead, and if it reaches the card's value, the card leaves the table.
Clubs guard. A club is laid in front of you as a guard. When a take comes at you, your guards soak it up, oldest first. Every guard that soaks any of it is discarded, and whatever is left over lands.
Hearts win back. A heart takes its value back into your stack, but only out of the other player's take pile. That one condition is what ties the game together. A heart is worth nothing against a player who has taken nothing from you. If their take pile is empty, you draw two cards instead.
Diamonds raise. A diamond is laid beside your board. Raises add up, and their total is always what the cards there show. Your next take, guard or win back adds them all to its lead card, and then they are discarded. Playing another diamond never uses them.
Put together, the suits are an economy. Spades make a pile that hearts are allowed to drain. Clubs stand between a spade and the stack. Diamonds make the next one of the other three bigger.
Face cards stand on the table
A jack, queen or king played on its own goes onto your board and stays there. At the start of each of your turns it does its suit's job, at 3 for a jack, 4 for a queen and 5 for a king. A spade face takes that much. A heart face wins that much back, or draws you a card if there is nothing to win. A diamond face raises this turn's play and is lost if unused. A club face soaks that much from every take against you, before your laid guards, and is never used up.
That is the Magic influence. A face card on the table is a standing piece, a bit like a planeswalker, that acts every turn.
Only one of each rank can be on the table at a time, yours or theirs. When a king comes into play while another king is out, the old one is discarded. That is how a board fight happens. An ace answers it, since an ace played on its own discards one of the other player's face cards. With none to discard, it plays as a 1 of its suit.
Chains
A chain is how you make a big play, and it is where the poker comes in.
Lay cards in a line, at least two, using at least one card from your hold. Each card must match the one before it, by suit or by rank. The first card leads. Take its value, add any raises, and multiply by the number of cards in the line. Its suit does its job with that total. The other cards add only length.
An example from the rules sheet shows how fast it grows. You raised with a 6 of diamonds last turn. Now you cash a 9 of spades, a 9 of hearts and a 4 of hearts. The nine of spades and the nine of hearts match by rank, and the nine and the four of hearts match by suit. The lead is 9, plus the 6 raise, times 3 cards. You take 45 chips from a 50-chip game in one action.
That is why the hold exists. A chain needs cards you have been keeping back, and the other player can see how many you hold but never what. Three face-down cards are a threat they have to read.
A club chain becomes a single guard, stacked together with any raises tucked under, so anyone can work out its value by looking. A diamond chain lies beside your board as one stack, worth its lead times its length.
Breaking through
If your play or chain discards every guard the other player had laid, or knocks a face card off their table, you take another action at once. That action can break through too. You may pass it if you have nothing worth playing. The pass matters more than it sounds, and I will come back to it.
Four rules I wrote wrong
The first draft of the rules was reviewed section by section, and then it was run. Four rules changed after the first engine existed.
A raise used to fold into the next diamond. In the first engine, playing a diamond onto raises merged them, which left one card worth more than the cards on the table showed. That broke the rule that a raise is worth what it shows. Now playing a diamond never uses or folds raises.
Face cards in chains used to come into play. A king could lead a spade chain for 13 times its length, and then stand on the board taking 5 a turn. One card was doing two jobs. The rule now is that no face card in a chain comes into play, in any suit. A face is a choice between a chain now and a board card that works every turn. A face card in a club or diamond chain stays in the guard or the stack, and in a spade or heart chain it is discarded with the rest.
A face card leaving a guard or a stack changed its value. That made a guard or a raise worth more than it showed. Same fix, same reason. A value has to be readable from the table.
Break-through needed a pass. Without it, a break-through with nothing legal to play froze the game.
All four were amended on September 26, the day after the design was written, each with the reason recorded beside it in the design doc. A "three face cards on the board" limit was deleted outright, because the one-of-each-rank rule already allowed only three face cards on the whole table, and the limit could never apply.
What 32,000 games showed
I ran four opponent styles against each other, 2,000 sittings for each of the 16 ordered pairings, on the real engine and the real opponent code. The four styles are deliberately one-note. A Taker goes for the biggest take at your stack, a Turtle wins back and lays guards before it takes, a Builder holds cards and cashes long chains, and a Board player plays face cards and aces and aims takes at yours. The table post has the headline numbers, including how the first rules let the Builder win 84% of its sittings and what fixed that. A few other results are worth saying here.
The shipped rules are 50 chips each, drawing one card a turn, and no face card ever entering play from a chain. At those rules no style dominates. The Builder is the strongest at 58.2%, and the widest pairing is the Builder against the Turtle at 67.1%.
A player who falls 20 chips behind at the end of a round goes on to win 38.7% of the time, up from 32.5% under the first rules. At 50 chips, 20 is two fifths of a stack. Comebacks were one of the three things I wanted the game to guarantee, and this is the number that says they are real.
Dead cards fell from 28.0% of cards entering a hand to 2.6%. The deadest cards under the shipped rules are the low diamonds, at 8.5%.
The guest, who skips the first draw, wins 47.7% of all sittings. Every one of the four mirror matchups leans to the host, at both seeds I tried. Drawing one card a turn makes the guest's skipped draw a whole turn's card. I measured a fix, a first-turn draw for the guest, and did not take it, because it overshot to 53% to 54%.
The median sitting is 15.5 turns each, at the top edge of my 10 to 15 target, with a long tail. The 90th percentile is 39. And the pass rule showed up in the numbers. Under the first rules 2.3% of break-through actions were passed. Now it is 18.7%, because drawing one card a turn leaves a player more often with nothing worth spending.
No sitting stalled and none hit the 1,000-turn cap, across 64,000 sittings in two runs.
There is one honest caveat. Both chairs are bots, and the styles are one-note on purpose, so each number is a statement about two bots. A style's win rate is a lower bound on what a person could do with the same cards.
The table in the game
The wanderer's table is built. You buy it once in the Hoodoo shop for 150 silver dimes, under "For the joint", and it stands at the front of the first act's juke joint. The wanderer deals, and a challenger from the room sits down. Earl plays like a turtle. Hattie Mae Pruitt builds. Pleasant Hawkins works the board. At the joint, chips turn back into gold at the table's rate, which is the buy-in divided by 50 per chip, so a 300 buy-in makes each chip worth 6 gold.
The save records who has sat down at his table and whom he has beaten there. Nothing reads either list yet. They are a hook for lore, since people say different things at the wanderer's own table, and for a future companion.
What nobody has checked
The engine has tests and the simulation has numbers. A person has not played it at the table yet. The design's own plan puts a paper playtest ahead of the rest, and the rules sheet closes with four questions to answer by playing. Does a game last about 10 to 15 turns each? Can you always build a comeback, and does it take planning and not luck? Is anything too strong, a king of spades, a long chain, going first? Are any cards dead in your hand?
The owed checks for the table in the game are listed in the smoke ledger, and nothing in it is discharged by the test suite. The simulation says the rules are balanced between four bots. Whether they are fun is a question for a real deck and a real table.
The knobs are written down for the day they are wrong. They are 50 chips, draw 1, a hand of 7, a hold of 3, face cards at 3, 4 and 5, and a heart's draw of 2.