Skip to main content

A small clone of 2048 for terminal, and also the implementation of an A.I. for it

Project description

2048 cli

A small clone of 2048. 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 available

In 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

$ pipx install 2048-cli

Then run the following command in the terminal

$ 2048-cli

Modes

Single Player

In single player mode, you command the moves with the aim of achieving the highest possible score.

menu

AI Playing

In AI game mode, moves will be generated using a Monte Carlo search algorithm.

montecarlo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

2048_cli-1.0.3.tar.gz (59.3 kB view hashes)

Uploaded Source

Built Distribution

2048_cli-1.0.3-cp312-cp312-manylinux_2_34_x86_64.whl (229.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page