Tuesday, January 17, 2017

A brief disruption, and a small explanation.

The other morning I went to the beach to walk for a few miles, as per usual, with the minimum accompaniment of my wife, our dog, and my Rubik’s brand cube that only goes to the beach. It’s a newer cube (2013 or later) with plastic tiles and the newer mechanism. This particular cube is rather loose as a fair amount of sand has gotten in it over the past couple of years and worn away at the plastic. Periodically I rinse the cube out, and then re-lubricate it, and it’s OK again.

We meet a lot of people at the beach. Most of them are tourists, but I suppose that there are a fair number of locals. Every once in a while I get to talk to people about the cube, but usually I have to already be stopped by dog socialization or people who need to ask my wife about some dog-related thing. This particular morning I got an unusual request – a kid, I can only assume that he's 10 or so - asked me if he could attempt to solve it. Since I run into other solvers so infrequently, I immediately hand the kid the cube, waiting to see what his ability level is. Disappointingly, he immediately grabbed a corner piece and twisted it in place, which resulted in me asking for the cube back a second later. I untwisted the corner, and ran through a rather clumsy corners-first solve while he watched. When I was down to three pieces left to solve, he asked me if I was still attempting to solve it, and seemed genuinely surprised four moves later (R2 E R2 E’) when I was done.

Our little interchange over, I felt bad as I walked off. Certainly, I could have let him keep going. It’s not like twisting one corner was going to make a big difference in a solution being attempted by a person that decides that twisting a corner is a viable move. Unfortunately, it struck me as a rather familiar scenario – when some people are presented with something complex they may not understand, often disruptive behavior can help them make breakthroughs when a more conventional strategy seems hopeless and time-consuming or analysis seems unnecessary or unwanted. Many a Street Fighter match or a football game has been won by a hare-brained strategy that a reasonable opponent wouldn’t even think to defend against. Our very history as a country in America has been defined, and is still being defined in new ways, by disruptive behavior.

On a small closed group, however, every unconventional disruption has to be undone for the group to return to its natural order. Had the kid managed to get closer to solving the cube, that single corner twist that he did would have to have been reversed at some point in the process. I don't know if he felt like I forced convention on him, or if he even understood the implication of what he did at all. At that moment, I felt like I had to show him that there was a right way, and it didn't take shortcuts. Unfortunately (whether for me or for him will be left as an exercise for the reader) I only could show him by solving the cube, instead of offering up some sort of explanation.
For a moment, let's imagine a rather simple cube. Since we're only concerned about the corner pieces for the purpose of this thought experiment, let's imagine a 2x2x2 cube that only has stickers on the U and D layers. When we talk about orientation, we will say that if it's correct - we'll assign a numerical value of 0 to that. If it's counterclockwise from the correct position, we'll call that -1/3, and if it's clockwise from the correct position, we'll call that 1/3.  If you turn the U or the D layer, no change in orientation has occurred. If you turn F, B, L, or R 90 degrees, what happens is that you get two of the pieces changed by -1/3, and two of the pieces changed by 1/3. Add the numerical values of each piece up and you get 0.

That's not to say that you always get 0 - if you started from the solved state and did the move R' D R you will have three pieces with an orientation of -1/3 and all of the rest of them correct. Add those up and you get -1. If you had done R' D' R you get three pieces with orientation 1/3 which add up to 1. As it turns out, no matter how many moves you do, it will always add up to an integer. 

This lends itself to a basic of cube behavior. Normally when I explain it, I would tell people that a single corner cannot be out of orientation by itself. They can be in opposite pairs (1/3 and -1/3) or all three in the same direction, like in our R' D R example.

If you study the edge pieces on a 3x3x3 in the same way, you discover that edges cannot be individually out of orientation for a similar reason, and you will only find an even number of edges can be out of orientation. If you try the thought experiment for edges out fully, remember an incorrectly oriented edge would have a numerical value of 1/2, since an edge only has two possible positions.

Luckily it is rather difficult to disrupt the orientation of an edge cube by hand due to the way it sits in the mechanism, but it is a concern if someone were to reassemble a cube at random. There is also a possible problem with the parity of the pieces if a 3x3x3 cube is reassembled at random, where you could possibly get to the end of the cube and only have two pieces out of place, which is also not normally possible. You can have a minimum of three pieces out of place, like three corners or three edges, or you can have two corners and two edges for a total of four pieces out of place, but no less.

At a certain point, the only solution for disruption is disassembly and careful reassembly. 

(Don't even get me started on what to do with an older cube whose stickers have been moved around.)

Saturday, November 26, 2016

Information is symmetrically asymmetrical.

Recently where I worked, we had the thumb turn fall off of a relatively new door lock. (The thumb turn is the part on the inside of the door so you can lock a deadbolt from inside without the key.) My first thought was that since it just unthreaded it shouldn't be that hard for me to thread it back in, but it turned out to not be obvious. I was able to get it threaded back in, but I couldn't get the lock mechanism to do what it was supposed to. I felt like that I could have done it given enough time, but it wasn't the sort of thing that I could spent more than ten minutes on without feeling like I had something more important to do.

Later, after we had finished with customers for the day, one of the technicians that work for our locksmith came by to fix the door. He met me at my desk at the counter, noting that I have a few Rubik's cubes there to harass customers with. I assume that he's around my age, since he identified the cubes readily, although he was a little surprised at how shiny the new plastic tile cubes are. We headed over to the offending door, and I handed him a plastic bin with all of the carefully sorted thumb turn pieces. It took him relatively little time to correctly line up all of the pieces of the lock and get it back together. Even though I really tried to watch him, whatever he did was so natural and effortless I didn't really see what he did that was different from what I had done. I tried to ask him what he did differently, but he wasn't able to explain it. While he was looking at the rest of the door to see what might have caused the thumb turn mechanism to come loose, he says "Did you see that thing..." and I stupidly assume he's going to ask "Did you see that thing on America's Got Talent with that guy that does magic tricks with a Rubik's Cube?"

He tells me no, finishes the piece he was screwing back in, and then says "Did you see that thing where a middle school kid took apart a Rubik's Cube and figured out the mathematical formula for it and the Rubik's cube company paid him a whole lot of money to keep it a secret?"

There was an awkward silence while I tried to regain my composure. Meanwhile he found one of the holes at the top of the door where the top bolt was rubbing in a way that it wasn't supposed to and reamed it back out so that the door could lock more smoothly. While he was doing that, my internal dialogue was going full blast.

What was so bad about that? He's just asking a question. Did you see that or not?  Were you listening to the question? Disassembly doesn't inform you about the cube's regular solution, using the phrase "mathematical formula" in this context is nearly meaningless, and the notion of a conspiracy to keep the solution of the world's largest selling and probably most pirated toy a secret is laughable since most of the cubes sold in the last 20 years come with a solution pamphlet right in the package and you can get a solution method from the company's own website.  How would he know? He's busy doing actual work.

When I returned to reality, I explained about how that there had been cube competitions since the 80's, and no conspiracy like that existed that I was aware of. He came back to my desk to write up the bill for his office, and I grabbed a mostly unsolved cube, finished it, and then showed him how a short sequence of moves can move a small predetermined number of cubes around. My go-to routines for this are usually R2 U' S' U2 S U' R2 that moves three U layer edges around, and R' D' R D' R' D2 R D2 that twists some D layer corners and moves some D layer edges around.  The reason for those two particular moves is that I know their inverses as well as the regular moves. I also showed him what happens with the cube mechanism itself, about how better cubes are better able to realign when one face is turned before another face is completely aligned. I thought this concept might appeal to the part of his brain where all of his locksmith information already resided. While he seemed receptive to the idea since I was able to easily show him what I was talking about, I didn't feel sure that I had dissuaded him of his original notion despite being able to solve a cube in front of him. At that point I grabbed my boss since the bill was ready to be signed off and he was done and we said our goodbyes.

The first time that I ran across this sort of thinking was my stepfather, when he rambled on one day at lunch about how the car companies had colluded with the oil companies to keep high MPG engines out of production. This theory didn't really hold any water with me at the time, since my father is a mechanical engineer and was very involved with engine design and I had at least some sense of the math involved. (You can find a much better version of the math here.) But, if you're a person that's sure there's a conspiracy, and there's no obvious way to falsify your hypothesis, and you don't understand the problems of making regular gasoline do what it does, then the thought remains unchecked.

At least for our Rubik's cube conspiracy, I was able to easily falsify part of the hypothesis - I was able to show that it can be solved. (I was going to say that it could be solved by a normal person, but many of you reading this will want to refute this non-trivial assertion.) That might not be enough to prove to the locksmith that there never was a conspiracy, so perhaps that thought will still remain as well.

I wasn't surprised about the idea that people exist that have never seen a Rubik's cube solved in person. I carry a cube around with me every day, and I'm always going to meet someone every once in a while that hasn't seen a cube solved.  What I was surprised about was the harboring of the idea that there was a conspiracy to keep the solution a secret, and what believing in a thing like that does to a person's trust in humanity itself. I can't place the same amount of importance on the solution to the Rubik's Cube, or the details of a magical carburetor that doesn't actually exist, or the nature of how to unlock something that's supposed to stay locked.

I was left with the feeling that maybe me showing people a Rubik's Cube can be solved is more important than I thought. Not just for the thing itself, but to show people the idea that even learning something (anything?) complicated is just part of a process that we go through gradually and that through reflection and observation we refine our abilities. Luckily, this morning in traffic I solved a cube at a stoplight and the person next to us rolled down their window to tell me that it was amazing to watch and that they've been working on cubing for a month and that they were learning. It restored my faith in people again.

Oh, yeah. I was left with a second feeling - if I want to be able to put locks back together I need more practice.

Friday, October 7, 2016

PS4 Upgrade: OK, so the first thing you do is...

The first thing you do when you upgrade the hard drive on a PS4 is - you just snap the cover off of the top of the left side of the console. There aren't any screws to take the cover off - it just slides over. Then you take a Philips screwdriver and take the one screw out with the Playstation symbols on it and then slide out the disk caddy. Swap the drive for a larger one - SATA, at least 5400 RPM. If you have the 500G unit now, a 2TB drive will quardruple your available space. (It may be hard to find one larger than 2TB that meets the criteria of being smaller than 9.5mm high.) Then, all you have to do is reload the Operating System back on to the PS4 from a USB stick (It's only around 1G in size), log back into Playstation Network, and then reload all your save files that you either already have on the cloud if you have Playstation Plus, or you needed to have saved them via USB...

OK, wait. The first thing you need to do when you upgrade the hard drive on a PS4 is to back up all of your save games to a USB drive. You need to be logged in as each user before you do that, and all your save games will take under a gig even if you have save files for a dozen games or so. If you have users like your kids that don't have a PSN accounts, then you will have to make them a PSN account...

OK, now really, the first thing you need to do when you upgrade the hard drive on a PS4 is to make sure all your users have their own PSN account. You need a unique email address and a password...

Now what do you mean you have kids in the house that don't have their own email addresses? OK, so then the first thing you need to do is make sure all of your users have email addresses, since after they sign up for PSN they're going to have to verify their accounts.

Also, if they're a minor, it's going to take a while to set up that email account since you have to verify them and give permission for them to use certain services.

It's OK. I can wait.

Sunday, October 2, 2016

If you're going to get mad, maybe try being more involved.

My older son and I went over to my local Gamestop the other day, thinking that we were going to get the code for the new Pokémon character Volcanion.  Usually you either get handed a card with a code on it, and redeem the code in the game in the "Mystery Gift" section on the main screen, or sometimes it works by connecting to the Wifi at certain places and then going in the same part of the game. (McDonalds did that recently when the character Hoopa came out. Oddly, for that one you could just change the SSID of your own router to "McDonalds Free WiFi" and it would still work.) As we discovered later, Volcanion is not available in the US until October 10th.

There were a lot of people there trying to do trade-ins and other things, so we hung back while my son tried to go into the Mystery Gift section to see if it would work that way. After a while, we decided we were just going to wait in line, and we also noticed that they got in some of the new Lego Dimensions level packs and grabbed the Adventure Time level pack. (I would have gotten the Mission Impossible one instead if there was a Simon Pegg minifig.) They also had a Harry Potter Team Pack, the new Ghostbusters 2016 Story Pack, and some other team packs.

So, just as I'm about to be called up to the counter, a grumpy mom holding an Xbox One game, a receipt, and the arm of a not-quite-a-teenager walks in, and interrupts everybody to ask the clerk if there is anyone else working. He says no, but mentions there is someone else that is there, but on break. After a second or two, I recognize the kid as someone who was one of the people doing a trade-in while we hung back in the back of the store.  The mom is mad that her kid had just a few minutes before traded in NBA2K16, which he just got recently, and only got two bucks trade-in value for it. Moreover, he traded it in to get NBA2K17, which apparently nobody mentioned to him was just about to come out when he was buying NBA2K16, which is why he wanted to return NBA2K16. She left in a huff, presumably to get satisfaction in some other way. So, let's go over the problems with this scenario.

1) The kid's copy of NBA2K16 had been opened. For the most part, no retailers will do a return for open new software. Gamestop does do returns for used software because sometimes you end up with a bad disk here and there, or maybe you just don't like it. The kid could have just walked away with his copy of NBA2K16, told his mom that they wouldn't return it (and she could have still rolled in the store grumpy the same way that she did).

2) Knowing that the kid really wanted the new version, the store employee talked him into a trade-in just so the old version wasn't "collecting dust and taking up space". Some people do that, so I don't know how to speak to that. I'm not sure if Gamestop has a policy about minors doing trade-ins.

3) I didn't remember if the kid had had anybody with him when he came in the first time - Grumpy Mom was definitely not there the first time, though. I wouldn't send one of my kids in to try to do a return on anything by themselves just yet, even with a receipt, just because in most cases it's not exactly as simple as ordering something, and often you get asked for ID, or have to sign stuff.

4) As far as not knowing when the new one was going to come out, that's kind of a head-scratcher. From the Gamestop employee's view, they would be ecstatic to be able to sell a new copy of NBA2K16 right before NBA2K17 comes out, so I really can't blame them for not saying anything. If the kid had asked them, they would have told him, though. Moreover, the series has put out a new version every fall for longer than that kid has been alive, and the last 10 versions have all been between mid-September and the first week of October. Despite how easy the Internet has made it to look things like this up, not everybody is going to know, or even think to check.  What I'm really wondering is if when the kid bought NBA2K16, if the Gamestop employee asked if he wanted to preorder NBA2K17. My guess is that if they did, the kid said "no" by reflex and didn't give it another thought.

5) Sports games, especially ones that get released every year, have had historically bad trade-in value, so that's a non-surprise to me that it was only a $2 trade-in value. Of course, if Grumpy Mom was expecting a real return to have transpired, this wasn't even a thing that would have been considered beforehand.

I would have been a little bit more impressed with Gamestop had the employee offered to negotiate with Grumpy Mom, but I think that Grumpy Mom had already decided that leaving and taking it up with someone else was preferable to being in the store for even one more second. Clearly Grumpy Mom didn't want to go in the store in the first place, or she would have been present for the discussion about the trade-in, or perhaps she might have figured out about the new version had she been present for the original purchase.

So, what did we learn? If your kids are playing games, even a little bit of involvement will save you a lot of aggravation later.

Saturday, October 1, 2016

An odd bit of computing.

On my Ubuntu desktop machine I had finally gotten over the fact that every time a semi-large update comes across I have to type:

sudo make install 
sudo modprobe 8812au

to reinstall my wifi driver, because I picked a Wifi device that isn't well supported. 
If the update is _really_ big, I have to type:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

to clean up the OS because the /boot partition is just that - a partition with limited space. 
If it really bothered me, I could just save all my documents and wipe the drive and reinstall the 16.04.1 LTR from scratch, and I don't think the boot sector nonsense would be as much of a problem, but then the OS wouldn't ever properly clean up after itself and would slowly grow larger over time unchecked.

What really fries my bacon is that the Espon printer driver quietly failed while I'm busy doing the other stuff. So, I will have to hijack one of my kids' Windows 7 machines to print something. And, no I didn't make them upgrade to Windows 10 even though it was free.

(I suspect that a portion of my readers aren't laughing or amused because printing stuff is like, so ten years ago.)

Friday, September 23, 2016

Cubing Tips Part 3 - I'm still talking about practice.

I really wanted to wax philosophical about practice, but I think it's more important to nail down some specific things that will help people practice speedcubing more effectively. This will mostly be aimed at CFOP solvers, but I will try to add comments for Roux.

1) Slow, untimed solves. This is effective regardless of the method used. Work on consistency of steps, looking ahead, not turning the whole cube very much, and turning smoothly. If you wanted to take this idea to the next step, then start solving with a metronome dictating your speed, and then gradually increasing the speed while maintaining smoothness.

2) Work on your first four edges as an automatic reaction to what you see during inspection. Lots of random scrambles done slowly may start to get you familiar with what you have to do to keep your movecount down and cube turns to a minimum. Not everybody is going to start color neutral, so maybe at first you're just going to look at your target center and the four edge pieces that go with it for a lot of scrambles and see what the easiest way there is. However, some of them are not intuitive at first, and you might gain that knowledge by watching some machine solved cases. One of the extra features of the Android app Twisty Timer is that when it generates a scramble for 3x3x3, you can press the "Hint" button and it offers optimal solves for the first four edges for any of the six colors. Once you think that you can formulate a good plan, the next thing to do is to figure out if you can execute the plan without having to look at those pieces, because you need to start looking for what's next - the first corner/edge pair. For Roux solvers, apply this to the first block, and start looking for the second block.

3) As you execute the moves for each corner/edge pair to build the F2L, you need to locate the next pair of pieces for the next corner/edge pair. If you can see farther ahead than that, that's great. If you feel you're not doing something smoothly, look up a couple of different algorithms for that case and see what feels good. While the F2L should be done intuitively much like the first four pieces, it still may be helpful to learn some algorithms for the more difficult cases.  For Roux, the next step is the U layer corners, and is its own very difficult subset of algorithms, nearly as difficult as the last layer algorithms in CFOP, and probably will get accomplished using the main feature of item #4 below.

4)  For the last layer, my suggestion is drill, drill, drill.
Once you learn an algorithm, go on youtube and watch a couple of different people do the moves to look at move groupings and hand positions.
While the OLL is done before the PLL, and it might make sense to learn things in order, it's more important to learn the PLL first.  Early on you will only make use of only three or four of the OLL cases, having to use them in combination and even multiple times in some cases.

Once you feel like you have enough moves put together to finish the last layer, use the qqtimer subset feature to generate scrambles for the last layer.

For Roux, there is a different subset you can use that just scrambles the last six edges - it's labeled "Roux-generator ".

Don't forget, there's always more to practice (and not just at cubing).