HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nneonneo
2048-ai
Python2016–2025
nneonneo / 2048-ai

2048-ai

AI for the 2048 game

3Distinct people
5Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

AI for the 2048 game

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2016-03-20 11:13:57 UTC to 2025-06-22 20:09:24 UTC.

0122016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

5 sources
Cool! I used a similar trick in my 2048 AI: https://github.com/nneonneo/2048-ai. In my case I allow the tiles to go all the way up to 32768, so I just have one tile per nybble. Using this representation is great: it lets me pack a whole gameboard into a single machine register, which makes it super efficient. In this case I see that you’re able to pack in a seed value to enable replayability - neat!
In 2048 with only 64 bits of state
Thank you for building this game, Gabriele! I very much enjoyed playing the game - and later, building what was (at that time) the best AI for the game while procrastinating on my PhD! (https://github.com/nneonneo/2048-ai, https://stackoverflow.com/a/22498940/1204143) I'd actually built an AI for Threes some time earlier (https://github.com/nneonneo/threes-ai), although (perhaps unsurprisingly) the 2048 AI turned out to be a lot more popular. The timing is pretty funny too - I was on a flight just two weeks ago that featured 2048 as one of the in-flight games, so I played it myself for a bit, got to 2048, then got my AI to get me to 4096 - and promptly crashed the whole app! Your implementation, even though it took just five days, was remarkably robust and fast and has held up really well all these years - real props to the great job you
Read the rest
did. I guess now I'll have to update my AI for all the powerups you've added to the game :^)
In Show HN: 2048 turned 10 this year, I built an updated version to celebrate
Well done! I wonder if you can get better speeds by implementing the search in C/C++ - I did so with my 2048 bot (https://github.com/nneonneo/2048-ai) and was able to go from a few hundred thousand moves per second with Python, up to 10,000,000 moves per second with C++. I'm curious to know what happens at 1000 moves. I'd play the game myself but I'm worried about dropping into a productivity black hole - as evidenced by my previous experience with 2048!
In Brute SPL-T

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.