• Welcome to SpeedSolving.com — the world’s largest puzzle community!

    You’re currently browsing as a guest, which means you have limited access to discussions, resources, member profiles, and community features.

    Join 50,000+ cubers and puzzle enthusiasts from around the world to ask questions, share solves, improve faster, and be part of the community.

    Registration is free, fast, and easy — create your account today.

    Already a member? Log in here to hide this message and start participating.

Prisma Puzzle Timer

Petro Leum, wontolla, it's easy to make Prisma read in those codes.

To make Prisma read in {y,y',y2} I think you change one line in "parsers.RubiksCubeScrambleParser.java":
String face = parser.anyChar("BDFLRU"); =>
String face = parser.anyChar("BDFLRUy");
To add other strings, do accordingly.

I made another change to the parser, I arranged for it to skip over integers. This is so that I can read in a scramble list without having to trim the numbers off of it. That is, the effect in the parser is to read "3. U2 R' L" but to only keep "U2 R' L". With this change, my Rubiks parser is:

if (face != null) {
move += face;
} else {
// Get rid of leading integer numbers like 231. :
String Junk = parser.anyChar("0123456789.");
if (Junk == null) break;
}
// Only add to move list if the face isn't null.
if (face != null) {
String suffix = parser.anyChar("2\'");
if (suffix != null) {
move += suffix;
if (suffix.equals("2")) {
// ignore prime
parser.string("\'");
}
}
moves.add(move);
}

Okay that will read in the scramble, presumably you'd also like it to show the effects (with the ability to click on a button so you can see how the scramble progresses (which I use often enough because I get lost in scrambles regularly)). That's a change in "puzzles.RubiksCube.java". My change was easy because I only added one more transformation, the "y". It's defined as follows:

add the following lines (it will be pretty clear where they go, of course, just look for similar lines):

Plane planey = new Plane(new Vector3(0, -1.0, 0), new Vector3(0, 1, 0)); // This defines a plane that will rotate the whole cube

twists.put("y", new Twist(planey, Math.PI /2)); // And these define how much to rotate by.
twists.put("y2", new Twist(planey, Math.PI));
twists.put("y'", new Twist(planey, -Math.PI /2));

To get "M" to work is going to be a bit harder, my instinct is to generalize the definition of "Twist" so as to include slices. This would mean you'd have to make "graphics.Mesh.java"'s "rotateHalfspace(..)" be able to accept slices as well as rotations. I think this would be a worthy thing to do, it would make the graphics package more natural to how we use twisty puzzles.

To get Prisma to generate "y"s I messed around with "solvers.RubiksCubeSolver.java" and that was most of the effort.


By the way, I just updated the java to make the PLL timing easier to read. The " ` " marks are there to prevent the speedsolving forum from removing white space needed to keep the columns vertical.

When I'm practicing PLL, I keep this screen under the "mainFrame" screen. It shows me what the latest scramble was (i.e. "Gc"), how I did compared to previous Gc solves, and how I did compared to Gc solves with the same U rotation and cube orientation. And it keeps track of my average over all 1152 orientations. I like this because it makes practicing into a "fair competition" with myself. That is, instead of trying to get a new PB for PLL, I'm trying to beat my previous solve time for that exact situation:
N = 1470 ` 1152_Mean ` 1152_Best ` 1152_Worst ` mean_cost ` `Mean ` `Best ` Worst `
OverAll: ` `8.42351 ` ` ` 5.75 ` ` ` `18.86 ` ` ` `100% ` ` `8.41 ` `5.63 ` 20.59 `

` skip ` ` ` `0.72 ` ` ` `0.24 ` ` ` `1.43 ` ` ` ` 0.09 ` ` `0.76 ` `0.24 ` `1.43 `
` `H ` ` ` ` `6.46 ` ` ` `4.92 ` ` ` `7.76 ` ` ` ` 0.77 ` ` `6.49 ` `4.92 ` `7.81 `
` `Ua ` ` ` ` 4.56 ` ` ` `2.43 ` ` ` `9.69 ` ` ` ` 2.17 ` ` `4.55 ` `2.43 ` `9.69 `
` `Ub ` ` ` ` 4.70 ` ` ` `2.85 ` ` ` `11.20 ` ` ` `2.23 ` ` `4.77 ` `2.77 ` 11.20 `
` `Z ` ` ` ` `8.89 ` ` ` `6.44 ` ` ` `24.21 ` ` ` `2.11 ` ` `8.58 ` `5.19 ` 24.21 `
` `Aa ` ` ` ` 4.37 ` ` ` `3.05 ` ` ` `7.05 ` ` ` ` 2.07 ` ` `4.30 ` `3.05 ` `7.05 `
` `Ab ` ` ` `10.73 ` ` ` `3.97 ` ` ` `21.46 ` ` ` `5.09 ` ` 10.84 ` `3.97 ` 21.46 `
` `E ` ` ` ` 10.35 ` ` ` `5.60 ` ` ` `26.62 ` ` ` `2.46 ` ` `9.60 ` `4.96 ` 26.62 `
` `F ` ` ` ` 11.53 ` ` ` `8.39 ` ` ` `23.51 ` ` ` `5.48 ` ` 11.39 ` `8.39 ` 23.51 `
` `Ga ` ` ` ` 7.90 ` ` ` `5.99 ` ` ` `11.88 ` ` ` `3.75 ` ` `7.87 ` `5.99 ` 11.88 `
` `Gb ` ` ` ` 8.85 ` ` ` `5.86 ` ` ` `44.08 ` ` ` `4.20 ` ` `9.46 ` `5.63 ` 67.78 `
` `Gc ` ` ` ` 7.82 ` ` ` `5.03 ` ` ` `18.37 ` ` ` `3.71 ` ` `7.74 ` `5.03 ` 18.37 `
` `Gd ` ` ` ` 7.01 ` ` ` `5.39 ` ` ` `9.36 ` ` ` ` 3.33 ` ` `7.02 ` `5.39 ` `9.36 `
` `Ja ` ` ` ` 7.86 ` ` ` `4.60 ` ` ` `19.50 ` ` ` `3.73 ` ` `8.01 ` `4.60 ` 22.33 `
` `Jb ` ` ` ` 8.06 ` ` ` `5.92 ` ` ` `22.38 ` ` ` `3.83 ` ` `7.94 ` `5.92 ` 22.38 `
` `Na ` ` ` `14.55 ` ` ` 11.73 ` ` ` `19.68 ` ` ` `1.73 ` ` 14.41 ` 11.73 ` 19.68 `
` `Nb ` ` ` `14.48 ` ` ` 12.09 ` ` ` `27.64 ` ` ` `1.72 ` ` 14.14 ` 11.59 ` 27.64 `
` `Ra ` ` ` ` 8.67 ` ` ` `5.75 ` ` ` `15.78 ` ` ` `4.12 ` ` `8.62 ` `5.75 ` 15.78 `
` `Rb ` ` ` ` 7.65 ` ` ` `6.03 ` ` ` `11.63 ` ` ` `3.63 ` ` `7.61 ` `5.66 ` 11.63 `
` `T ` ` ` ` 12.13 ` ` ` `8.43 ` ` ` `37.89 ` ` ` `5.76 ` ` 12.02 ` `8.43 ` 37.89 `
` `V ` ` ` ` 10.04 ` ` ` `7.95 ` ` ` `13.16 ` ` ` `4.77 ` ` 10.19 ` `7.84 ` 17.89 `
` `Y ` ` ` ` 11.10 ` ` ` `8.62 ` ` ` `22.91 ` ` ` `5.27 ` ` 10.94 ` `8.22 ` 22.91 `

` ` ` `Gd `7.76 ` Best,Mean,Worst (this PLL): `5.39 `7.02 ` 9.36 ` `Last 6 exact: `7.36, 7.76,
` ` ` `Y ` 8.89 ` Best,Mean,Worst (this PLL): `8.22 `10.94 ` 22.91 ` `Last 6 exact: `9.85, 8.89,
` ` ` `F ` 9.76 ` Best,Mean,Worst (this PLL): `8.39 `11.39 ` 23.51 ` `Last 6 exact: `13.96, 9.76,
` ` ` `Rb `6.72 ` Best,Mean,Worst (this PLL): `5.66 `7.61 ` 11.63 ` `Last 6 exact: `7.71, 6.72,
` ` ` `Gb `9.96 ` Best,Mean,Worst (this PLL): `5.63 `9.46 ` 67.78 ` `Last 6 exact: `9.61, 9.96,
Latest: F ` 8.93 ` Best,Mean,Worst (this PLL): `8.39 `11.39 ` 23.51 ` `Last 6 exact: `11.18, 8.93,
 
I hate to break this to you Petro, but I'm a complete m*o*r*o*n at java. Messing around with prisma made me know this better than anything. If the sofware guys see the way I butcher code they laugh/cry. It takes me hours to make tiny changes so I barely have time to make the change I want to use. And what's more, I don't have a V3 timer. :(

My advice is to get the code and start messing with it. Keep an original so when you get it totally hosed you can get back to where it was good. And don't expect to be doing something useful or expect to get where you're going. Instead, just expect that you're going to learn something about software and play around. Have fun! It's not unlikely that you will eventually surprise yourself. Isn't this about how you got good with the cube?

Also, I add huge numbers of write statements into the code so I can try and figure out what it's doing. These are things like:
System.out.println(" Running at scrambler line 55, I,J,K = "+I+" "+J+" "+K);

So at first, just add statements like that and see if you can get something to print when you do something with V3. Once you've got it to be detected, you've made substantial progress and you can sure that eventually you'll get it working.

Do this kind of stuff when your fingers need a break from cubing.
 
Last edited:
I hate to break this to you Petro, but I'm a complete m*o*r*o*n at java. Messing around with prisma made me know this better than anything. If the sofware guys see the way I butcher code they laugh/cry. It takes me hours to make tiny changes so I barely have time to make the change I want to use. And what's more, I don't have a V3 timer. :(

My advice is to get the code and start messing with it. Keep an original so when you get it totally hosed you can get back to where it was good. And don't expect to be doing something useful or expect to get where you're going. Instead, just expect that you're going to learn something about software and play around. Have fun! It's not unlikely that you will eventually surprise yourself. Isn't this about how you got good with the cube?

Also, I add huge numbers of write statements into the code so I can try and figure out what it's doing. These are things like:
System.out.println(" Running at scrambler line 55, I,J,K = "+I+" "+J+" "+K);

So at first, just add statements like that and see if you can get something to print when you do something with V3. Once you've got it to be detected, you've made substantial progress and you can sure that eventually you'll get it working.

Do this kind of stuff when your fingers need a break from cubing.

thanks, i will do this when my brain needs a break from school work :D
 
I would really like to see a new version with QJ V3 working on it =(
 
Is there a way for this timer to import scrambles with M/M'/M2?

I changed the code so Prisma could read those letters, but I couldn't generate a runnable jar file. Hopefully someone else can do it.


Petro Leum, wontolla, it's easy to make Prisma read in those codes.

To make Prisma read in {y,y',y2} I think you change one line in "parsers.RubiksCubeScrambleParser.java":
String face = parser.anyChar("BDFLRU"); =>
String face = parser.anyChar("BDFLRUy");
To add other strings, do accordingly.

I made another change to the parser, I arranged for it to skip over integers. This is so that I can read in a scramble list without having to trim the numbers off of it. That is, the effect in the parser is to read "3. U2 R' L" but to only keep "U2 R' L". With this change, my Rubiks parser is:

if (face != null) {
move += face;
} else {
// Get rid of leading integer numbers like 231. :
String Junk = parser.anyChar("0123456789.");
if (Junk == null) break;
}
// Only add to move list if the face isn't null.
if (face != null) {
String suffix = parser.anyChar("2\'");
if (suffix != null) {
move += suffix;
if (suffix.equals("2")) {
// ignore prime
parser.string("\'");
}
}
moves.add(move);
}

Okay that will read in the scramble, presumably you'd also like it to show the effects (with the ability to click on a button so you can see how the scramble progresses (which I use often enough because I get lost in scrambles regularly)). That's a change in "puzzles.RubiksCube.java". My change was easy because I only added one more transformation, the "y". It's defined as follows:

add the following lines (it will be pretty clear where they go, of course, just look for similar lines):

Plane planey = new Plane(new Vector3(0, -1.0, 0), new Vector3(0, 1, 0)); // This defines a plane that will rotate the whole cube

twists.put("y", new Twist(planey, Math.PI /2)); // And these define how much to rotate by.
twists.put("y2", new Twist(planey, Math.PI));
twists.put("y'", new Twist(planey, -Math.PI /2));

To get "M" to work is going to be a bit harder, my instinct is to generalize the definition of "Twist" so as to include slices. This would mean you'd have to make "graphics.Mesh.java"'s "rotateHalfspace(..)" be able to accept slices as well as rotations. I think this would be a worthy thing to do, it would make the graphics package more natural to how we use twisty puzzles.

To get Prisma to generate "y"s I messed around with "solvers.RubiksCubeSolver.java" and that was most of the effort.


By the way, I just updated the java to make the PLL timing easier to read. The " ` " marks are there to prevent the speedsolving forum from removing white space needed to keep the columns vertical.

When I'm practicing PLL, I keep this screen under the "mainFrame" screen. It shows me what the latest scramble was (i.e. "Gc"), how I did compared to previous Gc solves, and how I did compared to Gc solves with the same U rotation and cube orientation. And it keeps track of my average over all 1152 orientations. I like this because it makes practicing into a "fair competition" with myself. That is, instead of trying to get a new PB for PLL, I'm trying to beat my previous solve time for that exact situation:
N = 1470 ` 1152_Mean ` 1152_Best ` 1152_Worst ` mean_cost ` `Mean ` `Best ` Worst `
OverAll: ` `8.42351 ` ` ` 5.75 ` ` ` `18.86 ` ` ` `100% ` ` `8.41 ` `5.63 ` 20.59 `

` skip ` ` ` `0.72 ` ` ` `0.24 ` ` ` `1.43 ` ` ` ` 0.09 ` ` `0.76 ` `0.24 ` `1.43 `
` `H ` ` ` ` `6.46 ` ` ` `4.92 ` ` ` `7.76 ` ` ` ` 0.77 ` ` `6.49 ` `4.92 ` `7.81 `
` `Ua ` ` ` ` 4.56 ` ` ` `2.43 ` ` ` `9.69 ` ` ` ` 2.17 ` ` `4.55 ` `2.43 ` `9.69 `
` `Ub ` ` ` ` 4.70 ` ` ` `2.85 ` ` ` `11.20 ` ` ` `2.23 ` ` `4.77 ` `2.77 ` 11.20 `
` `Z ` ` ` ` `8.89 ` ` ` `6.44 ` ` ` `24.21 ` ` ` `2.11 ` ` `8.58 ` `5.19 ` 24.21 `
` `Aa ` ` ` ` 4.37 ` ` ` `3.05 ` ` ` `7.05 ` ` ` ` 2.07 ` ` `4.30 ` `3.05 ` `7.05 `
` `Ab ` ` ` `10.73 ` ` ` `3.97 ` ` ` `21.46 ` ` ` `5.09 ` ` 10.84 ` `3.97 ` 21.46 `
` `E ` ` ` ` 10.35 ` ` ` `5.60 ` ` ` `26.62 ` ` ` `2.46 ` ` `9.60 ` `4.96 ` 26.62 `
` `F ` ` ` ` 11.53 ` ` ` `8.39 ` ` ` `23.51 ` ` ` `5.48 ` ` 11.39 ` `8.39 ` 23.51 `
` `Ga ` ` ` ` 7.90 ` ` ` `5.99 ` ` ` `11.88 ` ` ` `3.75 ` ` `7.87 ` `5.99 ` 11.88 `
` `Gb ` ` ` ` 8.85 ` ` ` `5.86 ` ` ` `44.08 ` ` ` `4.20 ` ` `9.46 ` `5.63 ` 67.78 `
` `Gc ` ` ` ` 7.82 ` ` ` `5.03 ` ` ` `18.37 ` ` ` `3.71 ` ` `7.74 ` `5.03 ` 18.37 `
` `Gd ` ` ` ` 7.01 ` ` ` `5.39 ` ` ` `9.36 ` ` ` ` 3.33 ` ` `7.02 ` `5.39 ` `9.36 `
` `Ja ` ` ` ` 7.86 ` ` ` `4.60 ` ` ` `19.50 ` ` ` `3.73 ` ` `8.01 ` `4.60 ` 22.33 `
` `Jb ` ` ` ` 8.06 ` ` ` `5.92 ` ` ` `22.38 ` ` ` `3.83 ` ` `7.94 ` `5.92 ` 22.38 `
` `Na ` ` ` `14.55 ` ` ` 11.73 ` ` ` `19.68 ` ` ` `1.73 ` ` 14.41 ` 11.73 ` 19.68 `
` `Nb ` ` ` `14.48 ` ` ` 12.09 ` ` ` `27.64 ` ` ` `1.72 ` ` 14.14 ` 11.59 ` 27.64 `
` `Ra ` ` ` ` 8.67 ` ` ` `5.75 ` ` ` `15.78 ` ` ` `4.12 ` ` `8.62 ` `5.75 ` 15.78 `
` `Rb ` ` ` ` 7.65 ` ` ` `6.03 ` ` ` `11.63 ` ` ` `3.63 ` ` `7.61 ` `5.66 ` 11.63 `
` `T ` ` ` ` 12.13 ` ` ` `8.43 ` ` ` `37.89 ` ` ` `5.76 ` ` 12.02 ` `8.43 ` 37.89 `
` `V ` ` ` ` 10.04 ` ` ` `7.95 ` ` ` `13.16 ` ` ` `4.77 ` ` 10.19 ` `7.84 ` 17.89 `
` `Y ` ` ` ` 11.10 ` ` ` `8.62 ` ` ` `22.91 ` ` ` `5.27 ` ` 10.94 ` `8.22 ` 22.91 `

` ` ` `Gd `7.76 ` Best,Mean,Worst (this PLL): `5.39 `7.02 ` 9.36 ` `Last 6 exact: `7.36, 7.76,
` ` ` `Y ` 8.89 ` Best,Mean,Worst (this PLL): `8.22 `10.94 ` 22.91 ` `Last 6 exact: `9.85, 8.89,
` ` ` `F ` 9.76 ` Best,Mean,Worst (this PLL): `8.39 `11.39 ` 23.51 ` `Last 6 exact: `13.96, 9.76,
` ` ` `Rb `6.72 ` Best,Mean,Worst (this PLL): `5.66 `7.61 ` 11.63 ` `Last 6 exact: `7.71, 6.72,
` ` ` `Gb `9.96 ` Best,Mean,Worst (this PLL): `5.63 `9.46 ` 67.78 ` `Last 6 exact: `9.61, 9.96,
Latest: F ` 8.93 ` Best,Mean,Worst (this PLL): `8.39 `11.39 ` 23.51 ` `Last 6 exact: `11.18, 8.93,
 
I changed the code so Prisma could read those letters, but I couldn't generate a runnable jar file. Hopefully someone else can do it.

Give this a try:
http://brannenworks.com/Gravity/CarlPLL.jar

I added the ability to parse strings with:
M, E, S,
r, l, u, d, f, b
x, y, z
as well as the 's and 2s, as in {M, M', M2, ..., z, z', z2}

I also added graphics for everything but "x" and "z".

Also the "tip" thingy isn't going to work until I get around to figuring out what the cube numbering scheme is. This is because the scrambler won't actually follow moves like "M" correctly. Of course the x and z commands are ignored by the solver so shouldn't cause any great problem.

It's kind of late. I haven't tested this, but figured you'd be willing to guinea-pig it in return for the jar file. Do complain if there's anything wrong (and there probably will be, I'm quite bad at software).

Wow, that only took an hour. It was easier to get the slices to work than I figured. It's quite possible I've got the slice moves in the wrong direction. Do give it a try.
 
I get a "Could not find the main class: com.puzzletimer.Main. Program will exit." error when trying to open the jar.
 
Yes that worked. I noticed just now that there are multiple scramblers for different method sub-steps, but not Roux. Would it be difficult to add an <M, U> scrambler now that it seems to support M turns?
 
Yes that worked. I noticed just now that there are multiple scramblers for different method sub-steps, but not Roux. Would it be difficult to add an <M, U> scrambler now that it seems to support M turns?
You have 3 solutions:
1) take the <R, U> scrambler and just treat R as M (in your mind).
2) Modify the source code to add another scrambler (just copy the R U one and turn it into M U one)
3) Modify the R U one into a M U one completely which should be easier than adding another one.
 
Back
Top