Rubik's cube challenge
Well, I thought about coding up a timed challenge that would require you to solve a rubik's cube. Before I go and spend the time coding this I wanted to get some feedback from the community on whatever comments or concerns you have about it.
Even if you normally can't solve a cube you would be able to use other various methods such as sending the puzzle to a external source, which is still practice though not nearly as fun as solving it yourself you get some practice at curl .
Thoughts, comments, opinions?
We recently had a similar project in school. We were supposed to code a server and a client that would solve a soma cube. There you have to rotate each part and fit in. It was pretty hard but not impossible.
As for representation, it's probably best if you send it in text. Saying what color a certain bit is on the cube. Sending it in some special java thing will make it harder for people to use other languages.
c4p_sl0ck wrote: As for representation, it's probably best if you send it in text. Saying what color a certain bit is on the cube. Sending it in some special java thing will make it harder for people to use other languages.
This. You send us the colours for each square on the cube, and then we send back the list of rotations needed to complete the cube, which the server then executes to validate.
I'd be up for it, a challenge is always good. Does sound insanely difficult though.. cURL does sound like the way to go on this one, although I'm not too sure how you would present the "cube data" because it has 6-dimensions (6 sides) which are all affected by movement. Difficult to write the challenge and difficult to complete it… sounds good :D
yours31f wrote: The only thing about it is there is a move you can do that will solve a rubix cube in anywhere from 150-350 moves just by repeating it. i belive its
Yeah, that's true.. as long as they didn't get points as soon as it was complete.. they have to submit a value when they have completed it? And just for fun, only let them submit this once ;) which means they will have to check themselves that the cube is complete, still some problems though
backslash wrote: Yeah, that's true.. as long as they didn't get points as soon as it was complete.. they have to submit a value when they have completed it? And just for fun, only let them submit this once ;) which means they will have to check themselves that the cube is complete, still some problems though
Just once seems a little drastic, but one time per hour or something might be more realistic.
backslash wrote: Yeah, definitely needs a time delay anyway. Which means they would need to parse the cube themselves to see if it was complete or not. I'm assuming the cube would start in a random position each time?
Yeah I agree with the random position each time. However, just once per [time delay] would be pretty crap if this is going to be a timed challenge. Especially to those who're not fully experienced with their programming.. as a lot of the attempts may just be trying to get their code right.
Also, instead of doing the cube in 3D, if it would be difficult.. you could just do 2d displays of each individual face. I'm not sure if you already mentioned that, but I figured I would just incase.
Well thus far, based on the opinions I have seen these will be the following (rough estimate of features) -2D cube(the original plan) -I will randomize the cube based on the md5 hash of the time and a random number -A 2-5 min delay between attempts to reduce flooding -HTML based cube representation
If I missed anything in that list or you think I should add something lemme know ASAP :)
I am using a multi dimensional array, it seems like a decent concept so far. The way I set up the array move horizontal rows in one swap, vertical are a bit more complicated but still not that bad. I will be using a session to store cube details so no mysql queries are needed.
Here is the key I will be using: ( the input for solving will be separated with a ';' ) C = clockwise CC = counterClockwise
'f' = front C 'fi' = front CC 'b' = back C 'bi' = back CC 'l' = left C 'li' = left CC 'r', = right C 'ri' = right CC 'u' = up C 'ui' = up CC 'd' = down C 'di' = down CC 'v' = vertical C 'vi' = vertical CC 'h' = horizontal C 'hi' = horizontal CC
The reason I choose 'i' was for inverted. If anybody disagrees with the key now would be the best time to speak. there are a total of 16 valid spins.
Hey, I just figured Id give you guys a brief update…
The project is near completion but there is a glitch somewhere causing inconstancies, so if anybody is good with PHP and knows how a rubiks cube works(not necessarily solve, just how it turns) contact via aim or msn (p4plus2, p4plus2 [at] hotmail [dot] com)
Would appreciate it, if another person were to take a look at my source see if I overlooked an obvious flaw. After these flaws are tracked down it is practically finished!