How the Grinch Stole Summer

A classic tale that I’ve rewritten for those, like me, who actually like Christmas, but hate the heat.
———————————-
All the Whos down in Whoville liked summer a lot.
The Grinch, who lived just north of Whoville did not.

The Grinch hated summer, the whole summer season.
Now please don’t ask why, no one quite knows the reason.
It could be his shoes made his feet get too hot.
Or his need to wear suncream when he’d rather he not.
But I think that the reason will probably prove,
To be that in summer it’s too hot to move.

Whatever the reason, the cream or his shoes,
He spent his bank holiday hating the Whos.
Staring down from his cave with a sour, Grinchy frown,
At the wide open windows below in their town.
For he knew every Who that lived round and about,
Was busy now, getting their barbecues out.

“And they’re setting out deck chairs!” he snarled with a sneer,
“Those stripey, cliche ones, I see them from here!”
Then he growled, with his Grinch fingers nervously drumming,
“I MUST find some way to stop summer from coming!”
For shortly, he knew, in each town and each street,
The Whos would emerge with their flip-flopping feet,
And then they would all start enjoying the heat.
That’s one thing he hated! The HEAT!
HEAT! HEAT! HEAT!

And the more the Grinch thought of this Who summer fun,
The more the Grinch thought, “I must stop everyone!”
“Why, for thirty-five years I’ve put up with it now!”
“I MUST stop this summer from coming! But HOW?”
Then he got an idea! An awful idea!
THE GRINCH GOT A WONDERFUL, AWFUL IDEA!
“I know just what to do!” The Grinch merrily brayed.
And he started to build an enormous sun shade.
And he chuckled, and clucked, “Now it’s my turn for fun!”
“With this massive obstruction, I’ll block out the sun!
(And because it will be on a hill to the east,
I can skip all the stuff down in Whoville, at least.)”

It was quarter past dawn… All the Whos, still a-bed,
All the Whos, still asnooze, when he quitted his shed,
Packed the shade on a truck, with its struts and its beams.
Bags of bolts, nuts and rivets, bursting all at the seams.
Three thousand feet up! Up the side of Mount Cildit!
He rode with his load and he started to build it.

“PoohPooh to the Whos!” he was grinchishly humming.
“They’re about to find out that no summer is coming!”
“They’re just waking up! I know just what they’ll do!”
“Their mouths will hang open a minute or two,
Then the Whos down in Whoville will all cry BooHoo!”
“That’s a noise,” grinned the Grinch, “That I simply MUST hear!”
So he paused. And the Grinch put his hand to his ear.

And he did hear a sound in the dim morning light,
With the shade in its place, the sun no longer bright.
But the sound wasn’t sad! Why, this sound sounded merry!
It couldn’t be so! But it WAS merry! VERY!
He stared down at Whoville! The Grinch popped his eyes!
Then he shook! What he saw was a shocking surprise!
Every Who down in Whoville, the tall and the small.
Was still having fun with no sunscreen at all.
He HADN’T stopped summer from coming! IT CAME!
Somehow or other, it came just the same!

And the Grinch, with his grinch-feet surprisingly cool,
Stood puzzling and puzzling: “Was he such a fool?”
And he puzzled three hours, till his puzzler was sore.
Then the Grinch thought of something he hadn’t before!
He made a connection, not previously made…
“If I don’t like the sun, I can sit in the shade.”
And what happened then? Well, he tore down his build,
And the valley below was with bright sunlight filled!
For the Grinch had at last found his own summer groove.
He sits square in the shade and he tries not to move.

Advertisements
Posted in Fiction, writing | Tagged , , , | Leave a comment

Machine rolling – Using machine learning to roll D&D ability scores

I’ve been looking into machine learning recently, partly for my own interest and partly because I suspect it will see a lot of use in my industry in the coming years. There are a couple of decent resources that I’ve been using to get started. There are free Alison courses on data science and machine learning that I am working my way through – I’ve found these good as an introduction to the general theory of machine learning, though the couple I’ve gone through haven’t had much in the way of practical examples. However, on the practical side, this page – Your First Machine Learning Project in Python Step-By-Step – is a great tutorial on running your first machine learning algorithm in Python. It’s very quick (it took me longer to track down the module versions I needed than it did to work through the code) and gives a nice introduction to some basic tools. Having worked through the tutorial just mentioned, I wanted to try it with some different data in order to play around with it. However, real world data, in an appropriate format for machine learning, is not something you just find sitting around, so I invented a problem that didn’t really exist – rolling an acceptable set of D&D ability scores.

A quick primer for non-D&D players:
When creating a character in D&D you roll six ability scores between 3 and 18. In early editions, this was done by rolling three six-sided dice and adding them together, then repeating that five more times – generally in early editions, the results did not have a huge effect on the game, so it didn’t matter if you didn’t roll particularly well. In later editions, having a couple of high scores became a lot more important and most groups switched to rolling four dice and dropping the lowest, to generate slightly better scores. There is also a general understanding that a legitimately bad set of scores can be re-rolled, though where people draw the line on a “bad set” will vary a lot.

So… could I use a machine learning algorithm to teach my computer what a bad/good set of D&D attributes looks like, so that it can then roll random sets of scores, until it gets one that is acceptable? Short answer, yes; long answer… keep reading.

First, I needed a training set, so I generated 1000 random sets of ability scores (using Python, but you could probably do it in Excel easily enough), ordering each one from highest to lowest (both to help the machine learning and to help me evaluate them). I then went through all of them and classified them as either acceptable or not acceptable. I weeded out the obviously useless sets with a bit of filtering (sets with nothing higher than a 13 or with multiple very low sores), but then I just went through and assigned each one a classification. This did take a little time, but not as long as you’d assume – I was very much going on an instant gut feeling for each one, proven by the fact that there were a handful of cases where I classified the same set of ability scores as both acceptable and unacceptable at different points in the list.


(1 for acceptable, -1 for no good)

With my training set in place, I ran through much of the same code as in the tutorial mentioned above, obviously tweaking for the fact that I have six variables, rather than four. Unlike the tutorial, the SVC algorithm showed the best potential accuracy (I don’t know what SVC is… that’s something I hope to discover at some point) and when I ran it against the testing set, it got a 93% overall accuracy score.

From the point of view of my ultimate goal, the precision on the acceptable results is the most interesting item here. If the algorithm misses some acceptable sets (the recall score), I’ll never see them anyway – the important number is the probability that the set of results it does spit out is an acceptable one. 86% is not as good as 93%, but is certainly better than a straight up random set, which has at least a 20% chance of being no good, just based on having a max score of 13 or at least one score of 5 or less. It’s also likely that the sets being miscategorised are the borderline cases that aren’t too terrible, just not inspiring.
Having taught it to recognise acceptable sets of ability scores, the final step is simple enough; a little bit of Python to generate random sets of ability scores, test them using the machine learning algorithm and then print out the first that passes.


(A rather good set of scores there)

I’m not going to bog this post down with syntax… post a comment if you have questions on my specific code implementation.

A couple of final points…
As a test, I produced a stripped down training set, with only the highest two scores and the lowest. I then classified them with a simple rule that a set was acceptable if both the highest two were at least 16 and the lowest was no less than 8. Interestingly, despite the fact that I could write a simple if/then clause that could categorise the sets perfectly, only one of the various machine learning algorithms mapped the training set with 100% accuracy, while a couple of others got very high 90s. The LR algorithm (whatever that is) only hit 88% accuracy, which seems very poor under the circumstances. Clearly some of these algorithms are not designed to identify something so clean cut, but presumably do very well on dirtier data.

Lastly, despite the theory that the program will generate a set of ability scores that should be acceptable to me, there is nothing stopping me from rejecting the result and just running it again. With this in mind, I did consider adding a random seed, based on the date, that would mean if I ran it multiple times on the same day, I’d always get the same result. However, at this point I really am creating issues that don’t exist, so I think we’ll finish here.

Posted in Roleplaying games, Technology | Tagged , , | Leave a comment

Famous poems as haiku

Today is haiku poetry day (not sure who actually decides these things). For reasons unrelated to this blog, I rewrote a few famous poems into haiku and, not one to let such things go to waste, I figured I might as well pop them on here too. Enjoy. (Or don’t… it’s entirely up to you… art!)

irritating bird
disturbs man’s contemplation
and then it won’t leave

companions on beach
they make a bunch of new friends
and then they eat them

Mongol emperor
builds a fabulous palace
I forget the rest

a bird and feline
embark upon sea voyage
and then they marry

six hundred go in
cannons to the left and right
and then there were none

I shot a large bird
now damned for eternity
who you calling old?

Bonus:
man from Nantucket
not suitable for posting
(don’t include this one)

Posted in Fiction, writing | Tagged , | Leave a comment

Lost in Transit – A short story

[Transcript of laboratory 15 voice recorder during first human teleportation trial]

[Doctor James Hanover] Ok, Mister Johnson, please have a seat here, while the technicians get things finalised.
[Harry Johnson] No problem.
[Hanover] While they’re getting ready, let me just run through the procedure again. I know you signed the consent documents, but just to cover the main points…
[Johnson] Sure thing.
[Hanover] Great. So, when we pull the switch, a 3D scan will be taken of your full atomic structure. Your body will then be atomised and a perfect copy created in the chair that you can see on the other side of the laboratory.
[Johnson] You won’t forget that second part, will you?
[Hanover] *laughs* I assure you, we won’t. We have had hundreds of successful trials with rats, dogs… even a gorilla. All came through perfectly fine.
[Sally Jenkins] Everything is prepped Doctor Hanover.
[Hanover] Thanks, Sally. Now, just to be clear, Mister Johnson, the copy that appears at the other end won’t technically be you. It will be identical to you… not even your mother would be able to tell the difference…
[Johnson] What about my wife?
[Hanover] Or her. I just want to be sure you fully understand the implications.
[Johnson] Look, Doc, I was never one for weird metaphysical debates… you’re paying me well, I’m going to be the first man to ever teleport… as long as I can go back to my family afterwards, we’re good.
[Hanover] Super. In that case, just sit back, relax and we’ll see you again in a few moments. Sally, start the process.
[Jenkins] Process started. 3D scan compiling now.
[Barry Smith] Power levels nominal, no spikes.
[Jenkins] Scan compiled. Proceeding.
* Audible popping noise, caused by disintegration of Harry Johnson. *
[Smith] All levels still optimal.
[Hanover] *inaudible muttering*
[Jenkins] Production of subject copy beginning. He’s looking good… and… process complete.
* Cheers and general shouting from laboratory staff.*
[Hanover] Congratulations, Mister Johnson, you’ve just made history. How are you feeling?
[Hanover] Mister Johnson?
* Sounds of rapid movement and equipment being shifted *
[Jenkins] Breathing and pulse normal… blood pressure one ten over seventy.
[Smith] Starting atomic scan for comparison.
[Hanover] There must be something we’ve missed.
* More sounds of equiment use *
[Jenkins] EEG shows normal brain activity. Nervous system and reflex responses are as expected.
[Smith] Atomic scan shows a match, pre and post transfer. Differences are easily within expected limits for the time passed.
[Jenkins] There’s nothing wrong with him, Doctor Hanover… he’s just not doing anything.
[Hanover] Well, shit.

Posted in Fiction, writing | Tagged , , | Leave a comment

How to make a magnetic hourglass

I was in Waterstones over Christmas and in their gifty section, they had a magnetic hourglass that looked pretty cool; essentially, a regular hourglass with some sort of ferrous “sand” and a magnetic in the base. However, it was £20, which seemed kind of expensive for something that would just sit on my desk, so I decided to make my own for far less cost.

I went through a few iterations before I found something that worked reasonably well. I initially tried using plastic champagne flutes from poundland (the ones with the detachable bases). I figured I could drill a hole through the stems of two flutes, attached them together and just cap the ends. However, the stems were too thin to get a firm (or straight) join, so I abandoned that plan pretty quickly.

Next (and this is where I started taking pictures), I tried a couple of small jars, separated by a disc with a hole in it. (The disc was just laminated card – nothing special.)
I didn’t really expect this to be a great solution, but I wanted proof that the iron filings I got off eBay and the magnet I got off the fridge would produce the intended effect.

It actually wasn’t a terrible result. The biggest issue was that the join was too wide and flat – I had to overload the hourglass to ensure that enough filings would fall through and there was a lot left in the top bulb. Still, the principle was sound.

My next thought was to use small cones in the join, instead of a flat disc. However, joining them presented similar issues to joining the champagne flutes (not straight, not stable) and I also wasn’t sure that they would bear the weight of the upper bulb.

I then went back to my previous version, but using vessels with much narrower necks. I settled on some plastic bottles for holding bath products (80p each in the supermarket), joined with a much smaller disc. (I just glued the bottles onto the disc one at a time – it’s fairly sturdy.)
This works pretty well – almost all the filings fall through and a quick shake before turning sends the rest down.

To create a base, I simply melted a couple of tea lights into a tealight holder and pressed a fridge magnet into it.

The final result is a neat little craft project, which cost about £4, plus a couple of things that were lying around the house.
Take that Waterstones!

Posted in Experiments | Tagged , | 3 Comments

Bacon? Bac-off!

Just a short post this week, as I have a lot of other stuff on my plate.
A while back, I planned to do a Great British Bacon, where I would try different bacon recipes over a ten week period. Then I got busy and became a vegetarian, so it didn’t happen.
However, I don’t want to entirely waste the planning I put into it, so here are a couple of the things I was intending to make… in case anyone wants to try them and let me know what I’m missing out on.

Bacon and cheese scones:
This was essentially going to be adding crispy bacon pieces into a standard cheese scone recipe. I’m pretty sure that the flavour combination would have worked, plus it would have added pleasing crunchy bits to the scone texture.

Bacon pancakes:
Americans eat bacon with their pancakes, so why not bacon *in* pancakes? I figured that I would make up some thick pancake batter (American pancakes, not English), fry up some bacon bits, collect them into little piles in the frying pan, then add the pancake batter directly to the piles, letting it cook in the bacon fat. Serve with maple syrup… in theory, delicious.

Unnamed halloumi and bacon combination:
Unnamed because I couldn’t come up with a decent pun on “pigs in blankets”. Chunks of halloumi, wrapped in streaky bacon and then cooked in the oven – if I ever find a decent vegetarian bacon that crisps up properly (recommendations welcome), this is the one that I will probably still try at some point.

Posted in Experiments, Food | Tagged , | Leave a comment

Campaign setting – The World’s Most Interesting Fast Food Restaurant

This is a silly idea that suddenly came to me. It is a short roleplaying campaign (I suspect 6-8 sessions before it gets boring) that could be played in most systems, with a bit of adjustment.

Basic concept:
The players are all ordinary people, working in a fast food restaurant, which just happens to be the most interesting fast food restaurant in the world. Each session basically involves them dealing with some problem or situation, while still trying to do their jobs.

System/Character creation:
You could run this in most systems, but you need to strip out anything that doesn’t fit with the characters being regular people. In d20 systems, it’s probably a skill cap of 14 and no magic or anything; in Savage Worlds, edges are out, combat skills are out and characters probably have less skill points than normal; in Cypher System, you’d just keep pools, edge and training… maybe descriptors. The point is that these are genuinely ordinary folk.
However, each player may choose a single “roleplaying-y” skill for their character. This might be bolted on at the end or done during creation, depending on the system and the skill. This is the only opportunity for a character to have any combat ability (and it has to be specific; if the character is a black belt, they have no skill in firearms). Alternatively, it could be something more esoteric; the character is a chemistry major and can cook up also sorts of weird stuff in the kitchen; the character knows a lot of people and can acquire anything, given some time; the character is an absolute charmer and can wrap people around their little finger… obviously, if the character has one of these, they have no combat abilities whatsoever.

Setting:
Your characters all work in a fast food joint. It could be any sort of fast food – I’m picturing burgers personally, but pizza, sushi, whatever… The restaurant should be large enough that there is room for interesting things to happen, but not so large that your players are only a tiny part of the work force – your adventures should ideally take place on the graveyard shift or when the restaurant is short staffed, so that your players are the majority of the employees on site, with only a couple of interesting NPC employees to assist them.
Flesh out the restaurant a little, so that you know what areas it has. Is there one of those windows, so you can see into the kitchen? Is the office at the back or is there an upstairs? Does the restaurant have a basement? However, don’t map every inch of the restaurant, as you want some flexibility during play.

Adventures:
Each games session should cover one shift – any players who can’t make a session are simply not working that day. Every shift, something goes wrong in the restaurant:
The FBI are using it for a sting operation, but they’re short staffed themselves, so some of the characters will need to wear wires.
Two mafia dons have brought their grandchildren in for a treat and mustn’t be allowed to see each other.
Some criminals, fleeing the police, choose your restaurant to hole up and take hostages.
The owner of the company is visiting the restaurant for a surprise inspection, but he’s a bit of a recluse, so no one knows what he looks like… or even if he is definitely a he.
Some guys are filming a documentary about the Indian burial ground underneath the parking lot (this could be a campaign finale, explaining why the restaurant is such a weirdness magnet).

The players have to figure out how to resolve the situation (or just survive it), while still broadly operating as a restaurant (because they need their jobs). This should never be played as a serious campaign, but you’ll still need to agree where you are on a sliding scale of realism; you could play it that the characters need to obey the law, keep the restaurant intact, etc.. or you could play a much more slapstick version where the restaurant is pretty much destroyed at the end of every session, but happily gets rebuilt before the next shift.

Posted in Roleplaying games | Tagged , | Leave a comment