Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-08-2010, 07:56 PM

What I did with my slide puzzle is I set the moving pieces to one spot and then have them tessellated in a random order. What I have to do now is have a parity function to check if the puzzle is solvable or not.

You could integrate the same thing in the Rubik's cube by using a 3D tessellation method and placing the stickers in a random order then use a function to check if the cube is solvable from that state.

The method would greatly reduce the amount of time it takes to shuffle the cube, but the hard part would be trying to find the algorithm that checks the solvability of the cube (I still haven't found a straight answer to check the slide puzzle's solvability).
   
Reply With Quote
Version 1.4! Now with turbo boost!
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default Version 1.4! Now with turbo boost! - 03-08-2010, 10:08 PM

I will not digress into how i made the changes unless you really want to know but now the shuffling should only take 12 seconds. (And if you desperately can't stand that go change the loop in randomization to a smaller number, say 10)

jediaction, i sped it up on my own by massive coding overhaul.

Dameria, also think i improved the speed of everything. (shuffling under 15 seconds!) I didn't see the bug you mentioned in version 1.4. tell me if you still get it.

Niteshifter, fine idea, but i think i got it under control.

But here is version 1.4! (1.41 just cause I wanted to save it again.)
Attached Files
File Type: a2w rubik'_cube1.41.a2w (1.46 MB, 20 views)

Last edited by Veryuhbull; 03-08-2010 at 11:10 PM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 03-08-2010, 10:48 PM

I raninto the same problem myself with RP2. Good work fixing it up.


(')>
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-10-2010, 09:06 PM

I've improved the speed so it takes about 6 seconds to shuffle.

The amount the loop iterates in randomize was switched from 20 to 5.
The duration the camera turns around the cube was switched from 12 to 6.
Attached Files
File Type: a2w rubik'_cube1.42.a2w (1.47 MB, 12 views)

Last edited by Niteshifter; 03-10-2010 at 09:17 PM.
   
Reply With Quote
Come on Niteshifter
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default Come on Niteshifter - 03-10-2010, 09:20 PM

Are you making a joke? Of course doing the above would cut the time. The randomization is the thing that takes the longest and i wanted to go from version 1.3 to 1.4 without loosing the features 1.3 had. Sure you can lower the shuffler to speed it up. Turn it off to make it go even faster! (Where is the facepalm smily?)

I spent 2 hours recoding the world and cutting code to speed the program up and retain all quailities. Sure you can slash varibles but that is not the point.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-10-2010, 09:20 PM

got it. It works now


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-10-2010, 11:06 PM

Quote:
Originally Posted by Veryuhbull View Post
Are you making a joke? Of course doing the above would cut the time. The randomization is the thing that takes the longest and i wanted to go from version 1.3 to 1.4 without loosing the features 1.3 had. Sure you can lower the shuffler to speed it up. Turn it off to make it go even faster! (Where is the facepalm smily?)

I spent 2 hours recoding the world and cutting code to speed the program up and retain all quailities. Sure you can slash varibles but that is not the point.
I was more going along the lines of removing redundancies. The method was really great and I'm not making fun of it or anything.

I will take care to not improve others work regardless of how it can be done next time.
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 03-11-2010, 09:05 AM

Well i viewed the "redundancy" of the shuffle vital. loop 20 makes 80 twists in the cube and a loop of 10 only does 40. I am no expert on rubik's cubes, but i would think the amount of twists makes a difference. I thought the point where it becomes ointless to add more twists is even higher than 80. and speeding up the camera turn around is not going to change anything unless the shuffle is cut down.

I am sorry I spoke down at you. It appeared that you were boasting or something about how you could "speed my world up" (like some other users were doing).

EDIT: If Dameria is right then have it either way, if those 6 seconds really matter to you take niteshifter's

Last edited by Veryuhbull; 03-11-2010 at 05:11 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-11-2010, 09:35 AM

haha, you said "Rubik's Rubes" funny mistake. I make mistakes like that too so its fine, no bodys laughing, its just amusing


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 03-11-2010, 03:00 PM

Actually, you really only have to turn the cube about 15 times for it to be considered fully shuffled (as long as you don't memorize the order it is shuffled in). If you can have it turn 40 times, that is more than enough, especially if it reduces the time it takes until you can finally move the pieces yourself.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply

Tags
cube, puzzle, rubik, rubik's, rubiks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.