(no subject)
I left work at about 16:15 today, due to a crippling network outage which the sysadmins couldn't even provide an estimated fix time for. I decided that meant it was futile to hang about and hope it got fixed, so I came home. Hopefully it'll be sorted out by tomorrow.
(Of course I don't doubt it will actually turn out to have been sorted out five minutes after I left; that'd be just Murphy's style.)
Anyway, I put the time to good use. I came home and finished work on a ludicrously clever idea I'd had yesterday, to ensure that puzzles generated by my ‘Rectangles’ program have unique solutions. To my surprise and delight, it worked, and worked nearly first time, in spite of being a pretty outlandish blue-sky sort of idea.
(If that ‘ludicrously clever’ sounds rather self-congratulatory compared to my usual tone of ‘people might conceivably be interested in…’, then this is my diary so tough. It is pretty rare in computing – in fact, it's pretty rare at all – that I do something so impressive that it makes me want to bounce around the room shouting ‘WOOHOO’ and ‘HOW COOL IS THAT?’ and ‘DO I ****ING RULE OR WHAT?’, but this is such a thing. I am excessively pleased with myself for what I've just accomplished.)
In other news, twenty-four hours of watching my electricity meter has re-convinced me that I am right and British Gas is wrong. The reading marked ‘normal’, which I claimed was daytime and they claimed was night, moves only during the day. The reading marked ‘low’, which I claimed was night-time and they claimed was day, moves only during the night. Now all I need to do is convince them of this…
no subject
And it was indeed all working again when I got home...
no subject
no subject
no subject
To begin with, I smear each number throughout the whole of its containing rectangle. The solver deduces as much as it can under those conditions (by ruling out as many possible-rectangle-placements as possible), and then gives up. When it gives up, its next step is to narrow down the possible positions of one of the numbers in such a way as to make an additional deduction possible. Then it deduces as much as it can again, and repeats. Eventually it reaches a point where it's able to fully deduce the position of every rectangle in the grid despite some of the numbers still having uncertainty in their position. Then I can choose randomly from the possible positions for any number that's still uncertain.
The upshot of all this is that I get to do a single solving pass and place all the numbers sensibly. All the other approaches I could think of involved having to solve the grid multiple times, adjusting the number positions each time to try to get closer to uniqueness. Or, even worse, the complete bogo-sort approach of repeatedly generating an entire grid and seeing if it ended up unique (which scales extremely badly, since as far as I can tell ambiguous sections crop up at a roughly constant rate per unit of grid area, so the larger the grid the longer you'll have to keep doing this for before getting a sensible puzzle).
The solver does get hung up some of the time and have to abandon the grid and start again, but even at the largest default setting it does that under 50% of the time so it's not too bad.
no subject
no subject
no subject
It is indeed very satisfying to code a solution that you can be that proud of. Lots and lots of 'go you'.
Good luck explaining reality to British Gas. I had fun with them when I moved out of my house in MK - they started billing the new tenant (my sister), kept billing me too, then tried to take me to court despite the fact that she'd paid all the bills.
no subject
no subject
You could always invite British Gas to take you to court. Though I guess they might cut off your supply in the meantime.
no subject
no subject
no subject
British Gas will ahve to take your word if you send it them in writing, won't they?