2048 is an interesting game, why not make our own?!
- Generate an initial board with a random number of
2s at random cells, e.g.:
[
[2, null, 2, null],
[null, 2, null, 2],
[2, null, 2, null],
[null, 2, null, 2]
]- Support Merge Left on the board. E.g.:
Before:
[
[null, 8, 2, 2],
[4, 2, null, 2],
[null, null, null, null],
[null, null, null, 2]
]After Merge Left:
[
[8, 4, null, null],
[4, 4, null, null],
[null, null, null, null],
[2, null, null, null]
]- Support Merge Right. E.g.:
Before:
[
[null, 8, 2, 2],
[4, 2, null, 2],
[null, null, null, null],
[null, null, null, 2]
]After Merge Right:
[
[null, null, 8, 4],
[null, null, 4, 4],
[null, null, null, null],
[null, null, null, 2]
]- Support Merge Up and Merge Down. E.g.:
Before:
[
[null, 8, 2, 2],
[4, 2, null, 2],
[null, null, null, null],
[null, null, null, 2]
]After Merge Up:
[
[4, 8, 2, 4],
[null, 2, null, 2],
[null, null, null, null],
[null, null, null, null]
]- Generate a
2or4at random empty spaces after each merge. E.g.:
Before:
[
[null, 8, 2, 2],
[4, 2, null, 2],
[null, null, null, null],
[null, null, null, 2]
]After Merge Up and adding a new 2 or 4:
[
[4, 8, 2, 4],
[null, 2, null, 2],
[null, null, null, null],
[2, null, null, null]
]- Determine endgame. E.g.:
No more moves:
[
[2,4,2,4],
[4,2,4,2],
[2,4,2,4],
[4,2,4,2]
]Or, we've reached the goal of 2048 as a winner:
[
[4, null, null, 2],
[2048, null, null, null],
[4, 2, null, null],
[4, null, null, null]
]- AI Suggestion. During a gameplay, allow players to ask for the best possible move from an AI model to avoid gameover and maximize the chance of winning the game. You can use an offline AI model or connect with a remote AI server. Please do not submit with any credentials.