Join five



Join five (also known as morpion solitaire, cross 'n' lines or line game) is a paper and pencil game for one or two players, played on a plus-shaped grid of dots. The origins of the game are probably in northern Europe. References to the game first appeared in French publications in the 1970s. In addition to being played recreationally, the game has been the subject of theoretical studies and computer searches for solutions.

How to play
An initial grid of dots are drawn; a square of 4x4 dots, with a rectangle of 4x3 added to each side. The initial cross is outlined in some versions of the game.

During each turn, draw a straight line that is exactly five "dots" long, such that:


 * No part of the new line can retrace any portion of a previously drawn line. In the outlined version, the line can continue an existing line (they must not overlap).
 * Exactly one of the five dots covered by the new line is missing from the grid before the line is drawn. This missing dot (which can be at either end of the new line, or somewhere in the middle) is also drawn during the turn.
 * In the only outlined version, if no new dot is needed when drawing the line, the dot may be saved and can be used in later turns.

In other words, make a five-segment line from four dots, and draw in the fifth (unless it is saved to draw two dots in later turns).

Scoring
The game ends when no more segments can be drawn on the grid.

In the two player version, the last player to draw a line segment is the winner. In the single player version, scoring is accomplished by counting the number of segments drawn, or by calculating the total area of the grid at the end of play.

In the outlined version, the number of accomplished turns is the score. This is usually kept in check by using tally marks. It is unknown if this can be continued indefinitely, but the game becomes progressively more difficult (up to a point?) once the initial grid has been used completely.

Strategy
Strategy differs according to whether the game is played alone or against an opponent. In the first case, moves are optimized for the maximum number of possible turns; in the second case, the goal is to be "inefficient" with move selection to restrict the opponent's available moves.

Variations
The rules may be varied by requiring lines of 4 marked points in a row rather than 5, with a reduced starting configuration. Also, the "disjoint" variation of the game does not allow two parallel lines to share an endpoint, whereas the standard "touching" version does allow this.

Records and computer searches
For the "touching" version of the game with lines consisting of 5 marked points, the present record of 178 lines was established on 2011 August 12, using a Monte-Carlo search by algorithmist Christopher Rosin. This is eight moves more than the previous 1976 record of 170 lines. The 1976 record was done by hand, and computer searches had not been able to approach this record despite substantial progress, until August 2010 when Christopher Rosin used a Monte-Carlo search to obtain a result of 172 moves, exceeding the 1976 record, and 178 moves one year later.

For the "disjoint" version of the game with lines consisting of 5 marked points, the record of 82 lines has been obtained by computer search, also found by Christopher Rosin. Previous 80 lines record was found in 2008 by Tristan Cazenave. A 67-step solution was found in 2020 using an AlphaZero-like approach.

Theory
Generalized morpion solitaire, in which the starting configuration may be any finite set of marked points, is a member of the NP-hard class of problems for which no efficient computational method for finding an optimal solution is known. Even the problem of finding an approximately optimal solution for generalized morpion solitaire is NP-hard.

For the standard versions of morpion solitaire, infinitely large solutions do not exist; upper bounds have been proven on the maximum number of lines that can be obtained.