Beggar-my-neighbour
Beggar-my-neighbour, also known as Strip Jack naked, Beat your neighbour out of doors, or Beat Jack out of doors, or Beat Your Neighbour is a simple card game. It is somewhat similar in nature to the children's card game War, and has spawned a more complicated variant, Egyptian Ratscrew. Origins. The game was probably invented in Great Britain and has been known there since at least the 1840s. It may be the same as Beat the Knave out of Doors or Knave out o' Doors, in which case it is much older as this  game is mentioned as early as 1755. It appears in Charles Dickens's 1861 novel "Great Expectations," as the only card game Pip, the book's protagonist, seems to know how to play as a child. Gameplay. A standard 52-card deck is divided equally between two players, and the two stacks of cards are placed on the table face down. The first player lays down their top card face up to start a central pile, and the opponent plays their top card, also face up, on it, and this goes on alternately as long as no Ace or court  card (King, Queen, or Jack) appears. These cards are called "penalty cards". If either player turns up such a card, their opponent has to pay a penalty: four cards for an Ace, three for a King, two for a Queen, or one for a Jack. They do this playing the required number of cards to the central pile. When they have done so, if all the cards are numerals, the player of the penalty card wins the hand, takes all the cards in the pile and places them under their pack. The game continues in the same fashion, the winner  having the advantage of placing the first card. However, if the second player turns up another Ace or court card in the course of paying to the original penalty card, their payment ceases and the first player must pay to this new card. This changing of penalisation can continue indefinitely. When a single player has all of the cards in the deck in their stack, they have won. For more than two players, play proceeds clockwise. If a player reveals a new penalty card while paying their penalty, the next player around pays the tax. Relation to mathematics. A longstanding  question in combinatorial game theory asks whether there is a game of beggar-my-neighbour that goes on forever. This can happen only if the game is eventually periodic—that is, if it eventually reaches some state it has been in before. Some smaller decks of cards have infinite games, while others do not. John Conway once listed this among his anti-Hilbert problems, open questions whose pursuit should emphatically "not" drive the future of mathematical research. The search for a non-terminating game has resulted in "longest known games" of increasing length.