# Reactor ## Introduction Reactor is a system (currently!) only for three player consisting of two types of clues: - [Referential Sieve](https://hackmd.io/@timotree3/ref_sieve) clues to the next player needing a safe action (the *reacter*) - Reactive clues to the other player (the *reciever*) The Referential Sieve clues tell the reacter about their hand, while the reactive clues provide a safe action action to both players. Reactive color clues provide a play and a discard. Reactive rank clues provide two plays. ## The Reacter For the purpose of a reactive clue, the first player to take an action indicated by the clue is called the *reacter*. The team (usually) all need be synced about who is Alice's reacter. The reacter is the player with fewest pending (signaled or good touched) plays. If Bob and Cathy have the same number of pending plays, Bob is the reacter. **For the rest of this document, unless otherwise specified, when we say Bob we mean the reacter and when we say Cathy we mean the receiver.** ## Referential Sieve Clues When Alice clues Bob, it is (almost always) just as in Referential Sieve. With Bob unloaded, the clue is a sign Alice is worried about his chop and is giving him alternate action instruction. However, unlike in 2P referential sieve, if an unloaded rank clue touches the rightmost previously-unclued card, Bob is locked. He should not discard unless he gets another clue indicating it. This is desirable because if we really wanted Bob to discard something, we would often have ways of signaling that with a reactive clue instead. ## Reactive Clues Clues to Cathy are reactive. Each reactive clue promises two safe actions: one in Bob's hand and one in Cathy's hand. - Rank clues get two plays. - Color clues get a play and a discard in some order. To give a reactive clue, add together the slots of the two actions you're signaling, and give a clue to Cathy focusing that slot number (mod 5). The focus is defined in the same way as referential play clues, except that the whole hand is treated as unclued: the focus is the leftmost (not necessarily newly) touched card, except that slot 1 has the lowest precedence. For example, to get Bob to play slot 2 and Cathy to play slot 3, Alice would clue number focusing Cathy's slot 5 (because 2 + 3 = 5) As a trickier example, to get Bob to play slot 3 and Cathy to play slot 3, Alice would clue number focusing Cathy's slot 1 (because 3 + 3 = 1 (mod 5)). Another way of thinking of this is that "slot 6 wraps around to slot 1". Alice and Bob must agree about what action in Cathy's hand a hat guessing clue is getting. To do this, they use the following priority list: 1) Play the leftmost playable card that does not already have a play signal on it. 2) Discard the leftmost bad-touched card that needs a fix to discard (color clues only). 3) Discard the leftmost unknown trash (color clues only). 4) Play the leftmost one-way-from-playable (rank clues only). TODO: explain what this means for Bob and Cathy TODO: should fix an impending bomb be the highest priority? ## Good Touch Principle If a card by empathy can only be playable or trash, it is considered a queued play. It can be fixed by a fill-in clue, a reactive clue telling it to discard, or another reactive or RS clue providing empathy of it being trash (these retain their reactive / RS interpretations). While we follow good touch principle, we typically do not overly worry about bad touching. Often, reactive clues that appear to bad touch do not due to Cathy making inferences about her hand given the targetting priority chosen. ## Locked Players If a player is locked, they can give true referential sieve clues much more often. This includes: - To Cathy any time Bob has ptd or kt. - To either player any time both players are loaded ## Pinkish and Rainbowy Our reactive clue values change to be based on what clue is given rather than what cards it touches. Pinkish variants impact the reactive rank clues, while rainbowy variants impact the reactive color clues. ## Response Inversion When Alice gives Bob a clue, he should expect to interpret it as a Referential Sieve clue. If Cathy sees the clue is a bad referential sieve clue, it is actually a reactive clue where she is the reactor. Cathy should react to the clue before Bob has the chance to respond to the RS interpretation. This can work any time the player after Alice has pending plays. ## Philosophy Key ideas: - In Hat Guessing, every single clue will be interpreted as giving an action to both players, so it's really important that the clue that gets the correct combination of actions is available, otherwise your clues will result in bombs. This forces you to create redundancy where multiple clues would mean the same thing, so that it's more likely that one is available. In Reactor, we don't need a reactive clue to be available, so we can have our reactive clues be much more diverse; every possible clue in Cathy's hand means a different thing. - By splitting the information in a clue into two parts (the sum of slots and the type of actions), we enable finesses. The tedious part of Hat Guessing is having to look at a document on every turn to determine the value of a clue. If we split actions by categories, we don't actually need to use a table. The tedious parts of hat are actually having to look at a table on every turn and do modular arithmetic mod N > 5. - Motivation for using value of clue vs focus of clue: value is more flexible if there are pink or rainbow cards. focus is more biased which can help if our hat encodings are also biased towards likely combinations - We prioritize getting actions ASAP. Info about good unplayables can be given later. Getting actions sooner means learning about the deck sooner, meaning clues can be more valuable since hands contain more entropy. Maximizing actions now also helps keep teammates unlocked, since we often play into each others hands. - Prioritizing fixes means we get to have the Good Touch Principle. ## Replays The first games of Reactor are in! [No Variant](https://hanab.live/replay/897482) [Dark Pink](https://hanab.live/replay/896817) [No Variant](https://hanab.live/replay/897259) (recovered from mistake on t32) ## Other Iterations of Reactor - What if Alice to Cathy is RS and Alice to Bob is hat? - What if finesses are done with color? We wouldn't have play into discard as a hat option anymore and instead color would mean play into play-one-away. Then we can add back discard into discard as a rank option if desired. - What if action/clue values (the mod formula) were done differently? - What if no clues were assumed to be reactive unless they had bad RS interpretation? - Targetting can be improved. Prioritize discards of Cathy's good dupes over random trash to get elim at no hand distribution cost. ## 4P ideas What if Alice clues to Bob were RS, Alice to Cathy were hat-guesses between Bob and Cathy, Alice to Donald were hat-guesses on all three of them? In 4p, we probably still want (play slot 1 + play slot 1 + play slot 1 = focus slot 2), so we could go back to an older way of explaining the system where play slot 1 and focus slot 2 both corresponded to the number 0. To elaborate: - We give each card in Cathy's hand a focus label: from left-to-right they are 4, 0, 1, 2, 3. The value of a hat-guessing clue is the smallest focus label of any card it touches. - We give each card an action label: from left-to-right they are 0, 1, 2, 3, 4. The value of an action is the action label of the card it involves. |Slot|Focus Label|Action Label| |-|-|-| |1|4|0| |2|0|1| |3|1|2| |4|2|3| |5|3|4| (This is equivalent in 3p because each player's action value is the slot - 1, and the clue value is the focus slot - 2, and -1 * 2 = -2 with 2 other players) ## Other names Currently named "Reactor" with the idea that Bob is always reacting. Old name was Half-Guessing. ## TODO Fix this whole Bob/Cathy/First Responder/Second Responder notational nightmare. One option is to name the responders something else. Taking F + S intials from the Wikipeda [cryptography character list](https://en.wikipedia.org/wiki/Alice_and_Bob) yields Frank and Sybil, but the canonical characters don't exactly fit the roles. Another option is to call the First Responder simply the Responder and the Second Responder the Receiver, but it's nice to use human names if possible. ## Advanced/Experimental Conventions ### Ignored clues Bob usually must react to a hat clue immediately to demonstrate his safe action. If Bob gives a clue instead, then Cathy might have no way of being certain what actions were intended from the clue. In this situation, Alice's original hat clue is almost entirely "called off", and the action that the hat clue was supposed to give Cathy is ignored by the team. Alice and Bob still know what action Bob was given though, and Cathy does still know the Bob has a safe action *somewhere*. Bob's action does not count as "queued"; if a hat clue is given before Bob has a chance to demonstrate it, Bob should respond to the new hat clue first. Example: https://hanab.live/replay/896831#8 titaniumexcess could clue blue to sodiumdebt as a referential play clue on g2. This would be referential because Libster can play a 1 from good touch, so is the second responder. TODO: What if Cathy wants to give a hat clue later, but is uncertain about Bob's action? Maybe this just won't happen because Bob will still play promptly? TODO: After Bob goes back and demonstrates his action, should Cathy go back and take hers as well? TODO: What if Bob ignores it ### Dedupe Clues If a color clue is given to Cathy but she has no trash or immediately playable cards, there's no way for it to be a hat clue; no matter what slot Bob plays or discards, Cathy will bomb or discard something important. Instead a color in this situation is a way for Alice to tell Cathy to discard something that's duplicated in Bob's hand. This is called a Dedupe Clue. Specifically, it tells Cathy to discard the card to the left of the focus. After Alice gives a Dedupe Clue, Bob must give a clue or discard already known trash on his trash to prove that it is not a hat clue. If Bob does not have any known trash, he is in a kind of stalling situation. It doesn't really make sense for him to be able to give hat clues in this situation, because it's been established that Cathy does not have any safe actions anyway. Instead, a clue from Bob to Alice will be treated as a ref sieve clue and a clue to Cathy will be ignored and treated as a stall. ### Tweaks to play targeting To preserve good touch, a playable card in Cathy's hand can not be targeted by a play signal if it is a duplicate of an already clued card in her hand. Instead, the leftmost other playable will be targeted by a hat clue. Example: - On [this turn](https://hanab.live/replay/897598#21), assume that no cards in sodiumdebt or SHINee's hands are queued to play - timotree wants to get g2 and p2 to play, but which copy of g2 will be targeted by a hat clue? - With this convention, the unclued copy can never be targeted, so SHINee will be told to play slot 4. - timotree clues 3 to SHINee, getting 4 + 4 = 3 ### Change to finesse targeting Instead of targeting the leftmost one-away card in Cathy's hand for a finesse, Bob picks the one-away target that would result in him playing the leftmost card. TODO: Should this also include something like prompts? TODO: Should this actually not be leftmost but instead be slot 1 then right-to-left like RS finesse positions? TODO: Does this introduce redundancy if there's duplicate one-away cards in Cathy's hand? ### Reactive lock signals (conflicts with Dedupe Clues) If a color reactive clue gets Bob to play and Cathy to discard her chop, was it really worth it? We could've just given a referential clue to get Bob to play and let Cathy discard naturally. Instead, we say if Cathy is told to discard her chop from a color reactive clue, it is actually a signal to *lock* and not discard anything. As a consequence, if Cathy has trash in slot 1 and elsewhere, Bob should prioritize signaling the trash elsewhere, because a discard of slot 1 cannot actually be signaled; it would look like a lock. ### Predictable play targeting (idea) Instead of targeting the leftmost playable card, we could have slot 1 have the lowest priority. That would have the benefit that a playable card drawn on slot 1 never messes up a planned reactive clue. It would have the downside that our clues are more often adding up to a big slot number which is impossible to focus. ### Ref-Sieve style reactice clue focus (idea) Instead of ignoring clued cards for determining the focus if reactive clues, we could take them into account. One way of doing this would be to say the value of the clue is (1 + the slot that it would mean to play if it was a referential sieve color clue). For example if slot 2 and 4 are already clued (rows in descending order of focus priority): | Slot Touched | Slot Targeted by RS Color | Clue Value | Focus Priority | |--------------|----------------------------|------------|----------------| | 3 | 1 | 2 | highest | | 2 | 2 | 3 | | | 5 | 3 | 4 | | | 4 | 4 | 5 | | | 1 | 5 | 1 | lowest | Benefits: - Commonly given clue values (like 2 = 1 + 1) give information on new cards instead of just recluing slot 2 - Means that reactive clues are more of a generalization of referential clues; a working referential color clue to Cathy always gets a slot 1 discard from Bob Downsides: - More complex - If the slot targeted by RS color skips past cards that have been called to blindplay, then this can be a source of compounding desync ### Special suit target priority In pinkish/rainbowish variants, we have a lot more clues available when there are such cards in the hand. To preserve these clues, we could target non-pinkish/non-rainbowish cards first so that they stay in the hand longer. Similarly, in null/brown/white, we could target those cards with priority so they leave the hand and more clues become available. # Remaking Reactor Reactor currently has a significant problem: While Bob can generally agree with Alice about Cathy's best next play, Bob cannot always recognize when Alice would like Cathy to discard a duplicate of a card in Bob's hand. Therefore, it many hands makes sense to allow Alice to provide discard signals to Cathy and not expect Bob to react for them. ## ### A new hat table | Clue type on Receiver's hand | Reaction from Reactor | Action from Receiver | |:----------------------------:|:-------------------------------------- |:-----------------------------------:| | Color | Play | Play 0-away | | Color | Play connector | Play 1-away | | Rank | Discard unexpected | Play 0-away | | Rank | Play | Discard Trash | | Rank | Discard expected (chop or rightmost kt)| Discard duplicate of card Bob holds | ### Finesse finding Bob finds the leftmost possible location in his hand for a connecting card to make the reactor true work. ### Finesse finding Bob finds the newest possible finesse: this means he should either: 1) Play his slot 1. 2) Play on top of a recently-changed pile. 2) Play into Cathy's newly-drawn 1-away. ### Slot + Slot = Slot Yes