The popular 2048 game has been implemented here:

http://gabrielecirulli.github.io/2048/

Given the board like this:

[2 4 8 0
 4 0 0 0
 2 0 0 0
 2 0 4 0]

You give the direction

1 (left) 2 (up) 3 (right) 4 (down)

The system here will keep calling your solver. Score for each board is the biggest tile achieved. The Cody score is the maximum board score plus the average score across all 200 boards.

Solution Stats

63 Solutions

13 Solvers

Last Solution submitted on May 24, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers13

Suggested Problems

More from this Author51

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!