2048 Numberwang(louhuang.com) |
2048 Numberwang(louhuang.com) |
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 ;-)
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).
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.
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?
BEST.2048.CLONE.EVER
Just hold down one direction to observe.
Huh?
http://www.bbc.co.uk/programmes/b00lskhg/features/quiz
edit: which they've massively expanded since I last looked, I think they only had about 14 boards, now they have hundreds and seem to allow you to submit your own.
To get close to 952, you can quickly think of 106x9. 106 is easy to obtain and you have a 3. You can get another 3 from 75/25. You're now at 954 with only a 50 left. If you could divide by 25, that would give you the 2 you're missing but you already used the 25, unless you were to divide later. So instead of doing 106x3x(75/25), you do (106x3x75-50)/25.
He could have certainly thought of it another way but based on how players typically play that game, that would be a somewhat logical progression.
He had the numbers 100, 3, 6, 25, 50, 75. 25, 50 and 75 are big and difficult to work with, but 50/25=2 and 75/25=3 are far easier. He could either do it right away, but that gives him either (2 and 75) or (3 and 25) and there's still a large number. (75x ± 50y)/25 on the other hand equals (3x ± 2y) and he's down to nice small numbers.
He always chooses 4 from the top row, so he always gets 25, 50, 75, 100 and the rest are chosen randomly.
Using them in combination he can always trade 25/50 for a "2", 75/25 for a "3" and 100/25 for a "4" if he needs them to get the answer. Rather than work that out on the fly he just remembers it.
Taking it once step further he can do (75x ± 100)/25 and get 3x ± 4, or (75x ± 50) / 25 and get 3x ± 2 if that would be helpful.
One of the other answers points out that he can go further and multiply that 50 or 100 by any of the random numbers he's given, which would be equivalent to multiplying the ± constant by the same amount though he doesn't use that level of complexity in his answer.
So he's basically building a toolbox of potential moves based on knowing that he'll always get those 4 numbers. He doesn't need to do the full calculation each time.
http://en.wikipedia.org/wiki/Mornington_Crescent_(game)
You can tell it's currently morning in the UK and night-time in the USA.