CodingTrain / CodingTrain/Suggestion-Box
The L Game (simple strategy game to understand, hard to master, VSauce video included)
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
**Wiki Pages:**
https://en.wikipedia.org/wiki/L_game
https://en.wikipedia.org/wiki/Edward_de_Bono
**VSauce2 video about it:**
https://www.youtube.com/watch?v=64pA31_WJa0
**Description:**
"Edward Charles Francis Publius de Bono (19 May 1933 – 9 June 2021) was a Maltese physician, psychologist, author, inventor and philosopher. He originated the term lateral thinking, wrote the book Six Thinking Hats, and was a proponent of the teaching of thinking as a subject in schools." (Wikipedia)
He introduced the "L game" in a book called "The Five-Day Course in Thinking" published in 1968. It's a game that's played on a 4x4 square grid with only 4 pieces. Two of the pieces are "tetrominoes", as in, an L-shaped piece that consists of 3 "spaces" in one direction and another one attached at one end perpendicularly (literally an "L"), totalling 4 spaces occuppied at any given moment on the grid. The other 2 pieces are refered as "neutral" pieces that are just two basic circles with a dimension so that it fits inside any one square of the grid.
The game starts with the 2 neutral pieces in opposite corners of the board, the top left and bottom right. The two "tetrominoes" (L-shaped pieces) start in the center of the board, interlocked and mirrored from each other.
**The rules of the game are:**
Each player must move their L-shaped piece every turn in such a way that the new position is valid. Valid positions are those where the piece is completely contained inside the 4x4 square grid, with no rotation allowed**¹**. So, the piece can't be partially off-the board, even by 1 space. Also, the new position can't be the same as the old one, meaning, you must MOVE the piece by at least one square in any direction/translation/mirror/rotation. In other words, at least (but not limited to) one of the squares of the piece must move to a new spot in the grid.
After the move with the L-piece, each player can CHOOSE (it's completely optional) to move (or do nothing) one of the neutral pieces (the circles) into any other grid square that's not occupied by any other piece. Also, to move the neutral piece, you **MUST** have moved the L-shaped piece **BEFORE**. You **can't** move a neutral piece before the L-shaped piece has made a valid move.
Then, it's pretty simple. A turn is comprised of at least one (the obligatory valid L-shaped piece move) and a maximum of two moves (if the player also decides to move the neutral piece). Players take turns until one of them can't make a valid move with their L-shaped piece anymore. Then, the game is over.
It's very easy to understand but very hard to master (watch the VSauce2 video linked in the beginning for more info). I think it could be a very fun Coding Challenge, if not a little series of them (#1, #2, etc). The hard part is to pick the BEST move (many times there are many moves available but only ONE that's the best) and the way you sort through the options available, categorizing them according to the possible new moves that this "new" board state gives (score, maybe?).
@shiffman take a look!
**¹** "no rotation allowed" here only means that each square of the piece must be completely inside a square of the grid, not at an angle of say 45º or something like that. The piece must go into the grid so that it's sides are exactly adjacent to the grid's lines. Which basically means you can only rotate it by 90º, not any angle in between, assuming a starting position that is equally a whole multiple of 90º: 0º, 90º, 180º, 270º (or 90º, 180º, 270º, 360º, "same thing").
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.