https://github.com/gbpagano/2048-cli
A small clone of 2048 for terminal, and also the implementation of an A.I.
https://github.com/gbpagano/2048-cli
game python rust terminal
Last synced: 7 days ago
JSON representation
A small clone of 2048 for terminal, and also the implementation of an A.I.
- Host: GitHub
- URL: https://github.com/gbpagano/2048-cli
- Owner: gbPagano
- Created: 2022-04-16T21:42:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T03:52:05.000Z (over 1 year ago)
- Last Synced: 2025-10-05T19:43:03.590Z (8 days ago)
- Topics: game, python, rust, terminal
- Language: Python
- Homepage:
- Size: 28.2 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2048 cli
A small clone of [2048](https://play2048.co/). In it, the player moves numbered blocks in a 4x4 grid, combining them to create a block with the number 2048.
The challenge lies in the strategy to avoid running out of moves possible.
The game ends when the grid is full and there are no more combinations availableIn this project, I also try to develop an A.I. using the Monte Carlo method to try to achieve the best possible score.
## Installation
Install with pip or your favorite PyPI package manager
```bash
$ pipx install 2048-cli
```
Then run the following command in the terminal
```bash
$ 2048-cli
```## Modes
### Single Player
In single player mode, you command the moves with the aim of achieving the highest possible score.
### AI Playing
In AI game mode, moves will be generated using a Monte Carlo search algorithm.