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 choice-free 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 likely 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.

Beggar-my-neighbor appears as a children's game in 19th-century British novels such as Charles Dickens's Great Expectations (1861).

Play
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.

Game theory
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, such as Camicia, 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.

A non-terminating game was first found by Brayden Casella and reported on 10 February 2024. The cyclic game begins ---K---Q-KQAJ-AAJ--J-- and --QKQ-J-KA. The longest terminating game known is 1164 tricks / 8344 cards, found by Reed Nessler.

There are $$\approx6.54\cdot10^{20}$$ possible combinations of beggar-my-neighbour.

In popular culture
In the 1854 novel Hide and Seek by Wilkie Collins, Zach Thorpe and Matthew Grice kill time by playing beggar-my-neighbor "for sixpence a time."

In Charles Dickens' 1861 novel Great Expectations, the game is the only one known by the boy protagonist (Pip) as a child.