To tie back full circle [1], if anyone hasn't seen it there's a great UK show called Only Connect. It may appeal to people on here as it's a fiendishly difficult pattern matching game.
https://www.youtube.com/watch?v=0AB31ymF8zA
[1] The hostess (Victoria Coren) recently married David Mitchell - the co-creator of the numberwang sketch
Googling around finds the exact question on Programmers SE (https://programmers.stackexchange.com/questions/213924/name-...) but no answer.
C:\> TWENTY48
Loading...
Ready.
You are in a darkened room. On the floor in front of
you are sixteen tiles, arranged in a grid. The tiles
are labelled A1, A2, A3, A4, B1 and so on up to D4.
There is a two here, on tile A1.
There is a two here, on tile D3.
> GET ALL
The numbers appear too strongly glued to the tiles.
> INVENTORY
You have a copy of On Lisp by Paul Graham, a thing your
Aunt gave you that you don't know what it is, and a
small leaflet.
> READ ON LISP
Time passes. You have a profound enlightenment experience.
Sadly, this does not help you win the game.
> READ LEAFLET
"WELCOME TO TWENTYFORTYEIGHT!
TWENTYFORTYEIGHT is a game of numbers, addition and high
bits. In it you will explore some of the most tedious
territory ever seen by Hacker News readers. No computer
will be without one!"
> GO LEFT
Some numbers move, and a new number appears!
There is a two here, on tile A1.
There is a two here, on tile C1.
There is a two here, on tile D1. [Footnote 6]
> FOOTNOTE 6
There are no footnotes.
> GO UP
Some numbers move, some change, and some new numbers
appear!
There is a four here, on tile A1.
There is a two here, on tile B1.
There is a two here, on tile D4.
>GO DOWN
Some numbers move, and a new number appears!
There is a four here, on tile C1.
There is a two here, on tile C4.
There is a two here, on tile D4.
There is a two here, on tile D1.
>PANIC
Not surprised.
>QUIT
Amazed you survived this long.
Your score is 4, out of a possible umpty squillion and six.
Good bye!
C:\>
C:\>
C:\> DEL TWENTY48.EXE
C:\>And it's evil to use A-D and 1-4 with "up" and "left" commands ... and not telling us which side is labelled with letters and which with numbers.
Makes me wonder what TWENTY EIGHTY-FOUR would look like ;-)
I thought it played normally, and it does for a while, but it always eventually seems to randomly revert your high tiles (I verified that I had at least 1024 by checking the debugger).
[edit:] Ah, I found the code. It's possible to win but you have to survive the small chance that it will perform a random merge and destroy your tile:
// 0.005% percent chance that we will merge a cell anyway
if (next && Math.random() > 0.995) {
next.value = tile.value;
}I'll get my coat
But this was great. I managed to get 11032 before I lost. Just making a rules engine that could deduce Numberwang along is an incredible accomplishment.
the only thing randomized is the numbers on the tiles
Is there going to be a Wangernumb mode too?
After 8 steps, I "won" after reaching the following configuration (all on the edges, from top-left clockwise):
16, 584, 26, 6, 18, and 7
That's not numberwang, according to the official definition [1]
[1] D. Mitchell, B. Russell, A. Turing, and R. Webb. Numberwang determination and the Entscheidungsproblem. Principles of Mathematics and Computation, 1944. Cambridge Press 14(2).
Just hold down one direction to observe.
Huh?
BEST.2048.CLONE.EVER