# BLD execution trainer



## adimare (Apr 26, 2015)

*ScramBLD* ("scrambled" or "scram BLD" if you're mad at BLD after a few DNFs)

Hello, ScramBLD is a web app that can be used to practice BLD execution. Cubers new to BLD can also use it to help them figure out how Speffz letter pairs can be selected to solve scrambles. 

- You can input a scramble and the Speffz letter pairs for UBL and DF buffer solutions will be generated for you, including edge flips and corner twists.
- A proposed solution will also be generated, using either 3-style or M2/OP.
- The scramble button will generate and provide the BLD solution for a random state scramble.

Caveats:
- Parity is always solved by swapping UB and UL in edge memo.
- Corner twist and edge flip solutions are overly simplified (each piece is oriented one by one against the buffer piece).

Acknowledgements:
- To generate the random state scrambles I used Lucas Garron's js conversion of Shuang Chen's implementation of Herbert Kociemba's two-phase algorithm for solving the cube.
- I used Riffz BLD edge algs and Noahaha's BLD corner algs for 3-style solutions as starting points, but ended up changing a couple hundred algorithms.
- I also used a few 3-style algs from the BLD example solve thread, mainly from bobthegiraffemonkey, Ollie, and suushiemaniac.

If you come across a solution for a letter pair that you think could be improved upon, please let me know!


----------



## lejitcuber (Apr 26, 2015)

I am pretty much a bld newb and I average about 2:30 but I think that having an always correct memo is a good idea as it means I can practice actual memorisation and I will probably use it a lot.


----------



## adimare (Apr 27, 2015)

Made a couple of changes:

- Removed the "Solve" button, the letter pairs and BLD solution are generated as you type the scramble.
- Added a button that displays the solution in alg.cubing.net.


----------



## suushiemaniac (Apr 27, 2015)

adimare said:


> *ScramBLD* ("scrambled" or "scram BLD" if you're mad at BLD after a few DNFs)
> 
> Hello, ScramBLD is a web app that can be used to practice BLD execution. Cubers new to BLD can also use it to help them figure out how Speffz letter pairs can be selected to solve scrambles.
> [...]
> ...



Amazing!  Very GJ for writing this. Also, I feel kind of honoured that some of my algs got implemented 

My two (or maybe three) cents:

Are you willing to share the source code? I'm fine with PM or any kind of Git / BitBucket repository
How does the program handle breaking in to a new cycle? As far as I can see, it just takes the first unsolved piece as new target, maybe include an option to use "standard break-ins"?
Why are slice moves (and therefor also wide moves) not included? I'm especially thinking of TNoodle-like random orientation scrambles...
What about using one's own algorithms? I could well imagine to implement my BLD-database format into this applet, if you want to


----------



## adimare (Apr 27, 2015)

suushiemaniac said:


> [*]Are you willing to share the source code? I'm fine with PM or any kind of Git / BitBucket repository


Of course. I haven't uploaded it to github because I wanted to refactor it a bit before doing so. At first I just wanted to write a program that would generate the letter pairs for a scramble, then I added the little cube display, when that was done I thought it wouldn't be too hard to also display M2 and OP solutions (just need to write down the setup for each piece and display [setup: M2]), etc... so if you look at the code you'll notice that there's hundreds of algs in the ui.js file, which at first was only meant to handle button clicks and relay the work to cube.js! It's 100% javascript tho, and I didn't obfuscate it in any way, so you can just download the files straight from the source. 



suushiemaniac said:


> [*]How does the program handle breaking in to a new cycle? As far as I can see, it just takes the first unsolved piece as new target, maybe include an option to use "standard break-ins"?


Wasn't aware of standard break-ins, I'll look that up. All the code does is grab the next available non-solved target, I placed them in an order I consider the easiest in most cases (for edges UB will always be selected if its not yet solved, for instance). This is the way I'd like to do it:
- Order all letter pairs by easiest to execute to most difficult (for edges AC and CA would probably be in the top 2 spots, after that it gets a bit subjective).
- When a cycle-break is needed, grab the easiest available letter pair available based on that order.
That first step seemed like too much work tho.



suushiemaniac said:


> [*]Why are slice moves (and therefor also wide moves) not included? I'm especially thinking of TNoodle-like random orientation scrambles...


At first all I wanted to do was a tool that would generate the letter pairs for qqtimer scrambles so I could practice execution without having to figure out the letter pairs. Since those scrambles don't have rotations or slice moves, I wrote the program making the assumption that I wouldn't need to deal with those moves. They could be added, of course.



suushiemaniac said:


> [*]What about using one's own algorithms? I could well imagine to implement my BLD-database format into this applet, if you want to


It'd be great to improve the algs! I added many of my own which I know are a bit weird for must cubers (I notice no one likes to use E slice exchanges like I do).


----------



## suushiemaniac (Apr 27, 2015)

adimare said:


> Wasn't aware of standard break-ins, I'll look that up. All the code does is grab the next available non-solved target, I placed them in an order I consider the easiest in most cases (for edges UB will always be selected if its not yet solved, for instance). This is the way I'd like to do it:
> - Order all letter pairs by easiest to execute to most difficult (for edges AC and CA would probably be in the top 2 spots, after that it gets a bit subjective).
> - When a cycle-break is needed, grab the easiest available letter pair available based on that order.
> That first step seemed like too much work tho..



The idea is great, actually! Two ideas to narrow down the sorting problems:
1. Fully develop the commutator and count moves
2. Create movesets for each commutator
You could then order the list by most frequently used movegroups, and by # of moves (which sometimes is inefficient, I know. That's why the movegroup is also included.)



adimare said:


> At first all I wanted to do was a tool that would generate the letter pairs for qqtimer scrambles so I could practice execution without having to figure out the letter pairs. Since those scrambles don't have rotations or slice moves, I wrote the program making the assumption that I wouldn't need to deal with those moves. They could be added, of course.



Well, since the WCA uses wide moves to randomly orient puzzles, it's definitely worth implementing imo.



adimare said:


> It'd be great to improve the algs! I added many of my own which I know are a bit weird for must cubers (I notice no one likes to use E slice exchanges like I do).



The idea I have is that people who have lists of their algorithms can implement them in a database and then upload/open the database in your applet. Because as you mentioned there is not "the one" 3-style alg for each case so showing one alg for everyone is kinda inefficient. And with the database thing, everyone would see their own algorithms


----------



## adimare (Apr 28, 2015)

suushiemaniac said:


> The idea is great, actually! Two ideas to narrow down the sorting problems:
> 1. Fully develop the commutator and count moves
> 2. Create movesets for each commutator
> You could then order the list by most frequently used movegroups, and by # of moves (which sometimes is inefficient, I know. That's why the movegroup is also included.)


That sounds like a good start, but I think there's still a lot to take into account to come up with a good enough order. If I'm solving corners, for instance, and my first target is B and it turns out to be the buffer piece, I would instinctively choose C as the next target, because I can solve it very rapidly using my A-Perm alg, which on paper looks much worse than any of the available targets that could be solved with an 8 move pure commutator but in practice will be much faster for me (I wouldn't be surprised if this is true for a ton of BLD solvers out there, maybe even the majority).




suushiemaniac said:


> The idea I have is that people who have lists of their algorithms can implement them in a database and then upload/open the database in your applet. Because as you mentioned there is not "the one" 3-style alg for each case so showing one alg for everyone is kinda inefficient. And with the database thing, everyone would see their own algorithms


I see this as a useful tool for someone that's having trouble figuring out how to choose the letter pairs for a scramble, and for someone that's having trouble figuring out a commutator for a letter pair once it's been chosen. Because of that, I tried to go with algs that are easy to understand, and hopefully easy to execute. I'm thinking that someone that has compiled a large list of algs he likes to use for certain cases won't really be looking a lot at the part of the tool that displays the solution.


----------



## suushiemaniac (Apr 28, 2015)

adimare said:


> That sounds like a good start, but I think there's still a lot to take into account to come up with a good enough order. If I'm solving corners, for instance, and my first target is B and it turns out to be the buffer piece, I would instinctively choose C as the next target, because I can solve it very rapidly using my A-Perm alg, which on paper looks much worse than any of the available targets that could be solved with an 8 move pure commutator but in practice will be much faster for me (I wouldn't be surprised if this is true for a ton of BLD solvers out there, maybe even the majority).



Yeah, and that's why choosing appropriate algorithms and breaking-in pieces is not so easy indeed. Hope for some input from other 3-style users maybe?



adimare said:


> I see this as a useful tool for someone that's having trouble figuring out how to choose the letter pairs for a scramble, and for someone that's having trouble figuring out a commutator for a letter pair once it's been chosen. Because of that, I tried to go with algs that are easy to understand, and hopefully easy to execute. I'm thinking that someone that has compiled a large list of algs he likes to use for certain cases won't really be looking a lot at the part of the tool that displays the solution.



Good point. I didn't really think that far ahead :'D


----------



## sk8erman41 (Apr 28, 2015)

This is FANTASTIC! Thank you.


----------



## Lucas Garron (Apr 29, 2015)

This looks awesome!
I've always wanted to use something like this, but haven't time to build it.

Some things:
- A few of your algs don't have spaces after the comma/colon in the commutator. If you add a space, the alg is considered perfectly formatted in alg.cubing.net (instead of showing the "Moves" as yellow).
- Let me know if you want github.com/cubing/scrambld and/or scrambld.cubing.net


----------



## adimare (Apr 30, 2015)

Lucas Garron said:


> This looks awesome!
> I've always wanted to use something like this, but haven't time to build it.


Thanks!



Lucas Garron said:


> - A few of your algs don't have spaces after the comma/colon in the commutator. If you add a space, the alg is considered perfectly formatted in alg.cubing.net (instead of showing the "Moves" as yellow).


Nice catch, fixed.



Lucas Garron said:


> - Let me know if you want github.com/cubing/scrambld and/or scrambld.cubing.net


Both would be great. I just created a non-work-stuff github user, username is aledimare, email [email protected]
Thank you!


----------



## sk8erman41 (May 2, 2015)

How does the selection of the next target work to start a new cycle? Is it just a random unused target or is there a certain selection process built in? This is really great, enjoying it a lot. Very useful practice tool for lots of different uses. Thanks again!


----------



## adimare (May 4, 2015)

sk8erman41 said:


> How does the selection of the next target work to start a new cycle? Is it just a random unused target or is there a certain selection process built in? This is really great, enjoying it a lot. Very useful practice tool for lots of different uses. Thanks again!



Take a look at post #5. It's not random (solutions to scrambles are deterministic, meaning you'll always get the same solution of you input the same scramble), but it's not too elaborate. It just grabs the next unsolved target ordered in what I considered to be easiest to hardest in most cases. Ie: if UB is unsolved the *A* target will always be selected. *A* is usually the easiest target, but not always: if the target when the cycle breaks is *D*, for instance, I'd choose *C* as the next target since DC can be solved in 5 moves, but the program will always go for *A*.

Good to know you find it useful!


----------



## MarcelP (May 4, 2015)

Pretty amazing piece of work. Very good job!


----------



## FailCuber (May 4, 2015)

This is awesome!! Can you add OP edges too if possible?


----------



## sk8erman41 (May 4, 2015)

adimare said:


> Take a look at post #5. It's not random (solutions to scrambles are deterministic, meaning you'll always get the same solution of you input the same scramble), but it's not too elaborate. It just grabs the next unsolved target ordered in what I considered to be easiest to hardest in most cases. Ie: if UB is unsolved the *A* target will always be selected. *A* is usually the easiest target, but not always: if the target when the cycle breaks is *D*, for instance, I'd choose *C* as the next target since DC can be solved in 5 moves, but the program will always go for *A*.
> 
> Good to know you find it useful!


Got it, sorry I missed that part.


----------



## Jugurtha (May 4, 2015)

Hi! Amazing training tool, I'm very impressed 

Just a few suggestions if you don't mind:

- possibility to change one's solving orientation : even if I use the "official" scrambling orientation - green front & white top, I'm not sure that everybody does
(or maybe add the possibility to change one's orientation using x, y, z added in the scramble?)

- possibility to use one's letter scheme:
(Just to give an idea, I use letters for corners in a different scheme than yours, and letters + numbers for edges)
This would definitely help the understanding behind the resolution IMO

Don't know how hard it can be for you, sorry 
But great tool anyway, thanks again


----------



## sk8erman41 (May 4, 2015)

Jugurtha said:


> - possibility to change one's solving orientation : even if I use the "official" scrambling orientation - green front & white top, I'm not sure that everybody does
> (or maybe add the possibility to change one's orientation using x, y, z added in the scramble?)



just scramble in your solving orientation


----------



## adimare (May 5, 2015)

Jugurtha said:


> Hi! Amazing training tool, I'm very impressed



Thanks!



Jugurtha said:


> - possibility to change one's solving orientation : even if I use the "official" scrambling orientation - green front & white top, I'm not sure that everybody does
> (or maybe add the possibility to change one's orientation using x, y, z added in the scramble?)


I actually use a different orientation from the one you see in scrambld.cubing.net, so I did set it up to make it easy to change from one to another (green top white front ftw).



Jugurtha said:


> - possibility to use one's letter scheme


Shouldn't take too long, the displayed letters are just an array which wouldn't be difficult to allow the user to modify. There's only 2 things I'd need to do for both of these requests:
- Add the UI so you can manipulate the orientation/lettering scheme.
- Store any changes in a cookie so you won't have to input your lettering scheme every time you reload the page.

I'm a bit busy with work stuff right now, but I'll get to those two soon.


----------



## adimare (May 30, 2015)

A couple of updates:

Added slice moves, cube rotations, and double-layer turns, so the following scramble is now valid:
z2 x u l f S E M2 S' b' d' r y M' b x2 l r2

Also, as you can see from that link, it is now possible to share scrambles using similar urls to the one posted above (as you input moves the url is updated with the resulting scramble).

Still unsure about a good way to do a UI that allows users to modify the letter pairs.


----------



## geocine (Jun 15, 2015)

Thank you for this great tool. I just want to ask how do you execute this?



> [x': [U' L U, M]]



Is *x'* the setup move how about *U' L U* . May you please explain how to execute this.


----------



## tseitsei (Jun 15, 2015)

geocine said:


> Thank you for this great tool. I just want to ask how do you execute this?
> 
> 
> 
> Is *x'* the setup move how about *U' L U* . May you please explain how to execute this.



It's commutator notation.

[A:[B, C]] = A B C B' C' A'

So in this case A = x' , B = U' L U and C = M

So you do ( x' ) ( U' L U ) ( M ) ( U' L' U ) ( M' ) ( x )


----------



## geocine (Jun 15, 2015)

tseitsei said:


> It's commutator notation.
> 
> [A:[B, C]] = A B C B' C' A'
> 
> ...



Thank you! sorry I am new to this


----------



## Lucas Garron (Jun 15, 2015)

tseitsei said:


> It's commutator notation.
> 
> [A:[B, C]] = A B C B' C' A'
> 
> ...



It's probably worth expanding in two stages:


```
[A: [B, C]] 
= [A: B C B' C']     (because [B, C] = B C B' C')
= A (B C B' C') A'
```

Try experimenting with the "Expand" button at [x': [U' L U, M]].


----------



## geocine (Jun 15, 2015)

Lucas Garron said:


> It's probably worth expanding in two stages:
> 
> 
> ```
> ...



Thanks you sir


----------



## geocine (Jun 15, 2015)

Scramble with parity

Is this using the parity fix mentioned by Zane on one of his videos. That is why I goes to E instead of A and H goes to A instead of D ?



> memo edges last, then execute them first.
> 
> After you've memorised the corners you'll know whether you have parity or not. If you have parity, while you memorise the edges treat the piece that belongs at UL as if it's the piece that belongs at UB (and vice-versa). If done correctly, after you've executed the edges UB and UL will be swapped. The odd number of Y-perms used to solve the corners will swap these edges back - and thus solve the cube.


----------



## geocine (Jun 17, 2015)

@adimare 

I sent a pull request , I transformed individual corner and edge solutions to link to alg.cubing.net so that we could visualize how the algorithms are executed.

https://github.com/cubing/ScramBLD/pull/2


----------



## adimare (Jun 17, 2015)

geocine said:


> Scramble with parity
> 
> Is this using the parity fix mentioned by Zane on one of his videos. That is why I goes to E instead of A and H goes to A instead of D ?



Exactly, I consider this to be the best generic way to deal with parity in 3BLD so I used it for the generated solutions.



geocine said:


> I sent a pull request , I transformed individual corner and edge solutions to link to alg.cubing.net so that we could visualize how the algorithms are executed.


Cool! Merged. I made some changes to use your code to generate the url for the main solution as well. I'll upload it to scrambld.cubing.net later today.
Thanks for the contribution!


----------



## geocine (Jun 18, 2015)

adimare said:


> Cool! Merged. I made some changes to use your code to generate the url for the main solution as well. I'll upload it to scrambld.cubing.net later today.
> Thanks for the contribution!



Thanks. I also saw Lucas Garron submitted a pull request, just letting you know in case you didn't see that

I also sent a new pull request with the following changes:

```
- Down button on orientation control is not centered , fixed
- Removed individual margins and paddings from elements, added padding to parent section
- Got rid of margins used to position the orientation controls
- Used DIV and LI instead of H3's and BR's . Modified js, css and markup to accomplish this
- Add style to input text
```


----------



## suushiemaniac (Jul 26, 2015)

I've ported my Java BLDAnalyzer library (which is based on this project) back to JavaScript. It's linked at the OP in it's own thread so if there's request for 4x4 and 5x5 BLD support feel free to use and maybe modify/adapt my code 
No Pull request because I'm a GitHub noob xD


----------



## oskarinmix (Sep 27, 2015)

hey great tool. i would to know if possible how can i modify the letters on my own scheme ?


----------



## Lazy Einstein (Jul 2, 2016)

adimare said:


> A couple of updates:
> 
> Added slice moves, cube rotations, and double-layer turns, so the following scramble is now valid:
> z2 x u l f S E M2 S' b' d' r y M' b x2 l r2
> ...



Hopefully someone can help with that. I was about to ask if you had considered this. Nice work with everything else so far.


----------



## Llalundo (Sep 7, 2018)

It's a great tool. Thanks for this. One question: I downloaded a copy from Github and would like to disable the flips. As I am just starting with 3bld I would like to solve corners and edges that have to be flipped as 2 letters (= like normal). Is that an easy edit?


----------



## adimare (Sep 7, 2018)

Llalundo said:


> It's a great tool. Thanks for this. One question: I downloaded a copy from Github and would like to disable the flips. As I am just starting with 3bld I would like to solve corners and edges that have to be flipped as 2 letters (= like normal). Is that an easy edit?



Depends on your programming experience, but it shouldn't be too much trouble. Instead of solving the last piece (without counting the flipped ones) you'd have to swap it with a flipped piece and resume the solving alg from there.


----------



## Llalundo (Sep 7, 2018)

adimare said:


> Depends on your programming experience, but it shouldn't be too much trouble. Instead of solving the last piece (without counting the flipped ones) you'd have to swap it with a flipp



Thanks. I guess I will just stick to how it currently is.


----------



## adimare (Sep 8, 2018)

Llalundo said:


> Thanks. I guess I will just stick to how it currently is.


I'll try to get to it. I coded this awhile ago and never really maintained it. There's even been changes in the way ppl do BLD that might warrant changes to the app, here's a few things that might be useful:

1. Allow changing letter scheme from Speffz to anything the user wants.
2. Add options to deal with parity in different ways (right now it always swaps UB with UL).
3. Allow using different buffers/targets (DF and UBL are not universally used anymore).
4. Add option to use swaps to deal with edge/corner twists.


----------



## Llalundo (Sep 8, 2018)

adimare said:


> I'll try to get to it. I coded this awhile ago and never really maintained it. There's even been changes in the way ppl do BLD that might warrant changes to the app, here's a few things that might be useful:
> 
> 1. Allow changing letter scheme from Speffz to anything the user wants.
> 2. Add options to deal with parity in different ways (right now it always swaps UB with UL).
> ...



Nice. I'd have one more suggestion: Possibility to edit an ordered list of start points for new cycles. I assume everyone has his/her own habits and favourites here.


----------



## teehee_elan (Jun 1, 2020)

Is there any way to put my own algs there. I have different algs for certain cases, and I was wondering if I could specify this website to my needs


----------

