2048 in 4D
huonw.github.io
huonw.github.io
Very creative, well done!
"4D 2048? Well, I beat regular 2048 and I'm only like 97% totally addicted to that. I'll try 4D out for a few minutes"
hours pass
twitch... twitch
Addendum: the shear force of combining two 1024's into a 2048 would send the bird straight into orbit, at which point the game would transition into Flappy Space Program (http://corpsmoderne.itch.io/flappy-space-program)
(ETA: Sorry, no how-to details. I didn't work on that part of the code.)
"No gambling here. Bingo only, because little old ladies will vote against us in droves if we ban it too." "Ok, can we do a video bingo game?" "Sure. It's bingo." "Can we line up five bingo cards at once?" "Sure. It's bingo." "Can we add up corresponding cells and display those?" "Uh...sure. It's bingo...ish." "Can we display just the first line of that summation grid?" "Yea....ah. It's still...uh...bingo." "Numbers are just arbitrary-shape symbols; can we display whatever icons we want in place of those numbers?" "Uh...yeah...kinda odd, but don't see why not." "OK, here's our game. Take a look." "Hey! That's poker! That's illegal!" "No, it's bingo. It just looks like poker after every step YOU approved."
You just construct an artificial mapping between losing and winning positions in both games, the rest is cosmetics. You can have an "opponent hand" that is revealed afterwards or deal out "your hand" to you as in hold-em poker - it doesn't mean that the cards need to be "dealt" fairly; they are just illustration for a pregenerated loss/win/bigwin decision.
Try it out with a friend. You will gradually realize that it it seems surprisingly familiar...
8 3 4
1 5 9
6 7 2Sounds like BIT.TRIP Runner.
It's awesome, highly recommend.
https://news.ycombinator.com/item?id=7407510
Alternatively, to move a given tile you have to flap a bird through a number of pipes equal to its value (or maybe a little more sanely, its logarithm.)
Does that mean I've formed 4D intuition? I think this just happens to be in a class of 4D mechanics that's isomorphic to 2D variants, so the answer would be no. If so, how many such 2D variants are there?
For those interested, 4d rubick's cube:
(Continuous shapes, like solid hypercubes, are tricker ;)
I think my intuitions for the discrete and continuous are similar for 2D and 3D. Are they fundamentally similar? How do they differ, even if only a little? It seems that discrete 4D intuition should somehow help with continuous 4D intuition.
In 2d there are still restrictions though, mainly the "3 utilities problem" https://en.wikipedia.org/wiki/3_utilities_problem But in 3d, you don't have restrictions on connections anymore. You can always weave a new connection around the existing ones.
In a square, each corner is connected to 2 neighbors. In a cube, each corner has 3 connections. In a 4d hypercube, the corners have 4 connections. So to make a "4d" hypercube in 3d, just draw 4 connections between corners :) https://en.wikipedia.org/wiki/File:Hypercube.svg Some supercomputers have nodes connected in a hyper-torus configuration. It doesn't matter how you arrange the nodes physically, they just run cables around to recreate the interconnections that would exist in a 4d torus.
For 4d, it's easy enough to do the corners. Each one has 4 connections - one each for up/down dimension, left/right, forward/back, and... +W/-W direction. You can see this in the game. Each corner can move two directions in its own square, or to two other squares, total of 4 directions. If you want to do more than just corners though, it gets more complex. Think of a 3d cube http://joppi.github.io/2048-3D/?utm_source=hn A piece on the edge can move to two corners, or the center of two faces. Actually, it's easier to think of it as lots of little cubes, stuck together so you only have corners :) A 3x3x3 cube is really 8 2x2x2 cubes that share some nodes. So the block in the very center has lots of options. Up, down, left, right, forward, or backward - 6 options. That's twice as many as the corners! That's because the corners are as far as you can go in one direction, so they can only move back the other way. Pieces in the middle can move either way - exactly twice as many options.
Let's make an even bigger hypercube, 3x3x3x3. That's 64 little 2x2x2x2 cubes stacked in 4d. That's 8 3x3x3 cubes that make up the "faces" of the hypercube, and each cube has 8 2x2x2 smaller cubes in it. But remember most of those nodes are shared by more than one cube/hypercube. So the corners of our hypercube can only move to 4 other spaces. A piece in an edge can move to either corner, or into one of the 3 faces. (Look again if you can't imagine all 3 faces https://en.wikipedia.org/wiki/File:Hypercube.svg) So that's 5 options for a piece on the edge. The middle of a face can move (say) up and down and left and right, as well as into the middle of either cube that it's on. For a space on a face, that image is actually awful. Remember, that outer cube is a whole other cube, it's overlapping all the other cubes in that picture. Try this page http://eusebeia.dyndns.org/4d/8-cell.html Anyway, a piece in the middle of a face can move (say) up, down, left, right, or into the center of either of the two cubes that it's on - one in the forward direction, the other in the +W direction. Try visualizing this for several different faces until your intuition kicks in :) Finally, the piece in the very center can move either direction in each dimension, for a total of 8 directions, exactly twice as many as the corners. It will always end up in the center of a face, because those are the only pieces it's connected to.
Yeah, when I first went to the page, I expected the numbers to start changing on their own, but I do like this version very much.
Your far, far, FAR bigger problem is UI. :) Again, you need not display all dimensions at once, so you can treat it as an n-dimensional problem, but that still calls for some crazy UI pretty quickly.
Still, it wouldn't have to. Since most arrays would have pieces with lower numbers( 2,4,8 ) you could very efficiently compress the data.
At some point you would run out of memory but it would be playable. Just like those Game of Life implementations with seemingly infinite grid.
BTW you are right about compressing: you could store the initial state very efficiently, and probably even play the to the end without trouble.
Still countable. [/troll]
(in response to https://news.ycombinator.com/item?id=7417294)
There's another thing. It can take more moves to put a tile next to another tile in the 2x2x2x2 game because of these degrees of freedom.
It's not clear to me how this shakes out with gameplay, and I've already wasted enough time on the 4x4 game that I'm scared to try the 4D game to find out!
Time for the 3x3x3x3 game. The board would look like a Sudoku grid.
So you would have to match up this puzzle with one being worked on by someone yesterday.
Anything can technically be the fourth dimension. The thing about dimensions is that they are open to be defined as needed. You can have four spatial dimensions, you can have ten spatial dimensions. You can have ten spatial dimensions and time being an 11th dimension. Its all up to whoever is defining the model being, well, modeled.
http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-t...
If it was possible to double-hit the up/down/left/right arrows (i.e. twice in succession quickly) to move between dimensions, then I could use it with one hand.
Potentially transformable into a really cool learning tool
Now someone do one based on taste and smell.
Any strategies you guys want to share?
edit: wow! Ive only been using half of the keys! 836 booya!
For me, its all about looking at all three panels and making moves in the other ones that will not affect the two.
That is, if I have a choice to move up or down an the other 2 panels can only move down, I would choose up. Then I can score another 4, 8, 16 or so points without changing much of the board.
It is interesting. The best way to solve it is to forget about dimensions and just learn the rules of what key does what in terms of piece movement.
In the 3D version I noticed it worked with WASD(QE). The arrow keys still mapped to WASD.
This version separates WASD from the arrow keys, they now control completely different movement dimensions.
I had to read the instructions a few times before it clicked that I had two use WASD and the arrows for two different tasks.
This means that the sum of the top-left square is strictly increasing, and so "eventually" you'll win (assuming you don't fill up the rest of the board before that).
^In this case a "square" seems like it can just be one of the 2x2 ones, but in the original 2D case, this strategy has focus on building up just a single tile (one of the corners), or it doesn't work.
I like it.