HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
GregoryCannon
StackRabbit
C++2021–2021
GregoryCannon / StackRabbit

StackRabbit

An AI for playing NES Tetris at a high level. Based primarily on search & heuristic, with high quality board evaluation through value iteration.

2Distinct people
2Mentions
0Explicit recommenders
466GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An AI for playing NES Tetris at a high level. Based primarily on search & heuristic, with high quality board evaluation through value iteration.

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, 1:49:46 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 hour2 dated mentions

Observed mentions: 2021-11-27 16:19:42 UTC to 2021-11-27 19:41:57 UTC.

012021-11-27 16:00:00 UTC to 2021-11-27 17:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 27, 16:002021-11-27 17:00:00 UTC to 2021-11-27 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 27, 17:002021-11-27 18:00:00 UTC to 2021-11-27 19:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-27 19:00:00 UTC to 2021-11-27 20:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 27, 19:00

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
Nov 27, 16:002021-11-27 16:00:00 UTC2021-11-27 17:00:00 UTC101
Nov 27, 17:002021-11-27 17:00:00 UTC2021-11-27 18:00:00 UTC000
Nov 27, 18:002021-11-27 18:00:00 UTC2021-11-27 19:00:00 UTC000
Nov 27, 19:002021-11-27 19:00:00 UTC2021-11-27 20:00:00 UTC101

What Hacker News says

2 sources
I wondered if this was using a machine-learning style AI and it was, among other things, learning the state of the random number generator so it could predict pieces accurately more than one turn out? (And if not, how would you prove that it wasn't? Perhaps tweak the game RNG and see if the AI performs badly?) Looking at the github repo, it looks like it's actually more of a classical AI doing traditional game tree search. There is some interesting code around the RNG, though: apparently the RNG does make certain piece sequences more likely than others, and there's a lookup table for the probability of the next piece given the current piece: https://github.com/GregoryCannon/StackRabbit/blob/master/src... I suppose one could extend this to be a 3-dimensional lookup table with the probabilities of the next pieces given the last two piece
Read the rest
s, or to extend it to 4 or 5 or (if you had infinite resources) 100. At some point you'd know enough to be able to predict the next piece with 100% accuracy.
In NES Tetris AI hits 102M points and level 237

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.