Misc update

I finally booted my laptop back to Linux, and it’s so much more usable now! I’ve been using Windows Vista since Christmas because I was gaming on my laptop and because I got itunes gift cards and I have itunes installed in windows. The problem I had was that I couldn’t access my file server from windows (it’s a linux server). I figured Samba hadn’t started or something last time I took updates and rebooted the server, so I tried SSHing in from my phone, then realized that I could just use my laptop, so I switched it to Ubuntu. Now Firefox is responsive, I don’t get pop-ups from MS Security Essentials, and the screensaver comes on consistently. In other words: this is a major improvement.

I never did figure out why my server wasn’t showing up on the network list in windows. Before my laptop was finished booting I tried typing in the IP address directly in windows explorer and that worked, but the network browser still won’t find it.

I uploaded the last of the rocket videos:

I ended up trimming off all the extra video of it hanging in the tree. There are a couple spots where you can see my dad and I walking around under it, but it was more long and drawn out than interesting.

The other video I produced this week was in skyrim:

I found a dragon that had a ledge behind it, so I snuck on to the ledge and stabbed it with my daggers for the sneak attack bonus. Unfortunately, I hadn’t improved my offhand dagger with blacksmithing so I didn’t actually one-shot the dragon. I finished it off using my bow when it landed – I haven’t fought many dragons as a melee character but I remember my mage getting bitten and killed when I got close.

It took me probably fifteen minutes to get into position for that attack because every time the dragon detected me it would fly up and breathe frost on me so I’d have to reload a save. Also, to get onto the ledge I had to find a spot to climb the mountain so I could jump down on it. This was the dragon on the mountain south of Riften.

I just realized I didn’t have a category for Games: Skyrim. I guess I really haven’t been blogging much since it came out.

Today I finally sat down and timed a solve of my 7-cube: 30 minuntes 56.77 seconds. That beats my previous time of 63 minutes by far, but I need to do a few more solves for a 3 of 5 average (technically they should all be in one sitting, but at 30 min per solve that’s not happening). I also did a few 3-cube solves and managed a 34.99 second solve, which is my new record for the method I’m using to solve it. I was trying to solve my rubik’s cube while on my exercise bike, but I was both slowing down on the bike and messing up algorithms so I gave up. If I’d had better light maybe it would have been an interesting challenge, perhaps tomorrow.

Carbon Monoxide Detector (Again)

Apparently they’re overly sensitive to static. That didn’t occur to me last time since I thought I’d just set my basket of clothes fresh from the dryer under it. This time I went to hang up a shirt that had a towel stuck to it, so I shook the towel off, it hit the detector, and that same whine started up. The expected alarm is a series of beeps separated by a pause, not a constant noise.

I haven’t decided if I’m going to take it by the apartment office or just try to find somewhere to buy them and get my own. If I get a new one it will be going on a different outlet. If only it was attached to the ceiling like the smoke detector this wouldn’t happen.

In other news, I managed to solve the first two layers of my Square-1. I don’t know where to go from there or if solving layer by layer is even reasonable, but that’s arguably progress over just being able to make it a cube.

I also finally got around to looking up how to pay Colorado the $5 I owed on my taxes. Apparently it can be done online, though it cost $0.88 to pay by credit card. That’s almost certainly cheaper than buying envelopes and all I’d need to mail a check, and much easier too. I made sure to save the pdf of the receipt for that.

Rubik’s Cube Simulator

I’m planning to try to write a Rubik’s cube solver, or rather a few tools towards one. One goal is to have a program that can breadth-first search moves from a given arrangement to reach another arrangement. That’ll probably take a significant amount of optimization to allow it to run quickly and efficiently in memory, but to be able to get that working I need a computer model of a Rubik’s cube.

This weekend I put together a Rubik’s cube simulator and a command line interface to allow interaction:
Well, this was supposed to be where I pasted the log of console output of manipulating the cube, but the formatting depends on a uniform-width font and maintaining whitespace, neither of which actually worked when I pasted it. Here’s a screenshot:

It’s still having some issues, but the example sequence I chose doesn’t show them. I also only implemented (almost) the entire set of moves that are valid on a 2-cube, but didn’t try to use any 3-cube specific moves in that sequence. Once I’ve got the last few bugs worked out of that set extending it to n-cube size is just a matter of defining the moves for that size cube puzzle as an extension off the base 2-cube moves. I was planning to have that finished tonight, but I was distracted (see my previous post) and had to settle for just finding the test cases that it fails. Didn’t have time to put them in unit tests, but if they give me enough trouble I might bother with that.

In other news, I wish I’d looked up the problem of representing a Rubik’s cube as an object before I started. I couldn’t think of a way to represent the puzzle in a way that would make manipulating it easy, so I took the approach that I’d store the data in an easily extensible form (arrays of size n*n where n is the size of the cube) and put all the logic to make it work in the code that manipulates the puzzle. This approach (from 1986) flips it around, but the end solution looks a lot simpler than mine. The way I have mine written is easily extensible to larger cubes, but done right I think that approach could be also. Since mine is almost finished I’ll get it working on the 2- and 3-cubes, then I’ll probably put together a 2-cube using that approach and see if it’s actually as simple as it looks (I don’t know APL, but I know what it’s trying to do).

At least my interface is very similar, though there aren’t all that many reasonable ways to represent a cube in ascii, and my input accepts standard cube notation, unlike his. Looking at the other search results it’s surprising that the first Google hit exactly solved one of my problems (that I’d already worked around less elegantly) when all the rest are just software puzzles, not computer science.