The Calcifer Drive

This is the second post in my blog series about building a real life moving castle. I’ve interwoven this text with videos – they’re there to deepen the subject. The text is written as a standalone, so you can skip them if you like.

Howl’s Moving Castle (the movie) doesn’t have enough room to fully explore the relationship between Calcifer and the castle. The animators at Studio Ghibli treated the castle as a character in its own right, and at the same time Calcifer has some power over its actions – Sophie is let in by Calcifer according to Markl. When it comes to where to walk the castle seem to make its own decisions, mostly strolling around the wilderness outside the cities. Regardless who’s in charge the castle works as an autonomous vehicle, ie. it’s a self-driving car on legs. So the Calcifer drive has to be split up on an AI and a power source.

Howl’s Moving Castle, official trailer – Crunchyroll Store Australia

The Calcifer drive AI

Self-driving cars seem to be a holy grail for the industry. It’s not just Tesla that works on the problem, and given the current development around Twitter and Elon Musk maybe we should be grateful for that. (Disclosure: my father works on self-driving cars. I’ve never asked about his job, partly because it isn’t what we talk about, and mostly because he probably isn’t allowed to say anything substantial. And, while coding is his passion, storytelling is mine, so our background knowledge rarely intersect to make a conversation meaningful.)

On the surface designing an AI driving a vehicle is an easy problem. We already have a gps grid an AI can use for navigation, we have powerful sensors to get the vehicle to see dangers and obstacles, and the mechanics to allow a computer to drive. The problem is that none of it is good enough yet.

Driving is not just about getting a vehicle from point A to point B, it’s also reacting to challenges along the road. Normally those challenges are so small we humans don’t think about them; winds rocking the car ever so slightly out of course, the sun getting into its “eyes”, unfamiliar signs that’s almost but not quite like the ones it’s trained on.

All of this are easy things to humans, hard for machines – especially since we want a short reaction time. Regardless of if it’s a car or a walking castle it’s going to move around subjects that goes crunch when driven over. It’s true that computers calculate some things at warp speed compared to a human mind, but that’s partly because they only calculate those things. A human has a lot of processes going on that we normally don’t think about; breathing, taking in the surroundings through our senses, and at some cases thinking about several things at the same time. If we could peel away all that we’d be faster than the fastest computer. Conversely, when we throw some of that onto an AI it suddenly becomes slow. A good example are the soccer matches between robots at RoboCup (sic!) and Gore. The robots are reacting mostly to known challenges in unknown sequences, yet they often reacts several seconds after the ball has passed them – or just freezes.

Best of Gore 2022 – All Teams. Note: the Nao robots are small and nimble – the bigger the robots the slower the game gets.

Every now and then we’re treated to reports of self-driving cars doing stupid things, like driving in the wrong direction on the road, mistaking the bikelane for the road, and – of most concern to us – not recognising humans walking in their way. My favourite though, is the fact that self-driving cars are trained to not cross white lines. After all that’s what most road markings are made of. While I have a feeling this is corrected now, for a while you could confine the cars by pouring a thick line of salt around them, like they’re some sort of modern day evil spirits.

The sum of this is that a person in a self-driving car can never relax completely – they must always be ready to take over control if something happens. That is far from the trust Howl, Sophie, and Markl are putting in the moving castle. They are staying indoors and mostly let it walk freely – though I suspect it actually gets directions on where to go. And that’s the catch; travelling on something is a different joy from driving something. A big part of the allure with the castle is that you travel with it.

So if you’re a walking castle builder that wants full autonomy from your driving AI you’ll have to wait. Probably not for long since there are several companies and at least two open source projects working on it. This seems to be one of those problems that humanity just can’t leave alone, and the same drive that brought us flying machines, put humans on the moon, and robots on Mars will eventually lead to self-driving vehicles.

If you’re into coding you can join an open source autonomous vehicle project to speed things up. Like I said there are at least two out there, but they are a lot more convoluted to join than, say, Libre Office where translators and other more non-coding positions are open for volunteers. Instead you look up coding projects via GitHub. So if you’re not starting as a coder you should count on a long learning curve. The good news is that the threshold to start coding is low. There are coding languages out there that are beautifully simple to learn, and one that pops up at many places is python. Start there and work upwards.

The solution I opt for in my own project is to reject the full AI and instead have a simpler computer stear the house along a grid. That is; I program the computer to walk the house 200m forward, turn 90degrees right, walk 1000m forward, stop. For this to work I’ll have to cap the house’s speed considerably – I’m counting on 10km/h. That would allow me to overtake the castle in case of emergencies, and the stop jolt will be minor. It may also mean I can rely on a “dumber” image recognition system that can react to generic obstacles on the road instead of having to be trained on specific items (fingers crossed…)

Using simpler code is also to keep control over my castle. Current AIs are rather dumb, yet so complicated that an everyday coder can’t get through them. This and the trust put in them opens a backdoor for third party interference. I’m not talking Evil Hackers here (it happens, but is rare), I’m talking tiresome corporation buzz. That buzz that makes your software suddenly pop up a message advertising a new product, or change the start screen on your computer, or suddenly price hike their subscription based product. Little things that grates your nerves after a few years. Imagine that for a self-driving AI; suddenly the car won’t drive unless you agree to pass McDonalds – you’ll get a discount once there, but you can’t opt out because the way to do so is buried under loads of sub-menues.

I’m a reluctant coder even at the best of days, but programming six legs to move is within reach of school children, so that I can manage. And that means I can understand the code and check what’s happening within the castle’s heart. This is also the closest I can come to the relationship between Howl, the castle, and Calcifer. They are interconnected through a spell and rely on each others’ self preservation to not do certain thing (like walking straight off a cliff or fail to let in the weathered old lady who suddenly knocks on the door). I have to connect by create the castle’s mind.

The Calcifer drive – power source

This is the point where I got most surprised while writing this blog post. While I return to the subject of building a walking castle every other year I’m usually pre-occupied with the castlewalk, and I haven’t given much thought to the castle’s power source. It’s easy to think it would need a humongous amount of energy and thus a swimming pool (not a tub) of diesel needed a place in the planning. Diesel is usually what drives large vehicles, and has a place among some of my friends as being “macho”.

Big Muskie – The Largest Walking Machine Ever Built. This is a clip from History Channel. Handle accordingly, but at least they don’t blame aliens.

But the walking houses that exists are powered by electricity. Indeed, the huge walking excavator Big Muskie was, though as most dragline excavators she was permanently hooked to the power grid through a cable (impressive machines and true black holes of energy consumption). Anything goes when it comes to fuel – unless we’re talking dragline excavators walking doesn’t take as much power as I thought it would. The smaller, denser and more lightweight the better, of course, but an ordinary diesel motor plus fuel tank for large vehicles is powerful enough.

The backside to diesel is that it stinks and is gooey to handle, so I’d rather use a closet full of batteries. I’ll put them under the floor for even weight distribution, but you hopefully get the amount right. You can see in the video about the XBUS Camper that the place for batteries is about as large as an ordinary chest of drawers. Here, again, I haven’t done the math, but say three times as many batteries as for an XBUS would probably be able to power something rather large. The nice thing about a DIY walking castle is that you can build it light, and – more importantly – you can build it ‘large’, so you have the space.

XBUS Camper First Look! 2023 Electric camper van walkaround & features. From Crown Motors UK

As for where the batteries would get their power I’ll probably hook the castle to a charging point and combine with solar panels to extend the times between charges. Most energy vehicles I look at have solar in some shape or form. As in the case of my project they’re mostly there to give a top up. I need to say that as for the electricity you get from a charging point it can come from wherever, from the dirtiest coal plant to the most pristine solar facility. A direct power source gets you much more control over your environmental impact. Of the ‘clean’ ones solar is the one easiest to get – you can buy panels at almost any hardware store, they’re easy to handle, and as a bonus a serious accident still have extremely limited impact on the surroundings (the worst thing that can happen is probably that a heavy panel falls on someone). But will it ever be possible to only use solar for a walking house?

I’m not sure. When I started to keep track (years ago) photovoltaics needed to extract 12.5% of the power of sunlight to be commercially viable. That milestone is long time passed. Currently normal solar panels is on an efficiency between 15 – 20%, which I know says zilch if one’s not deep nerding on the stuff. A better picture is perhaps that Disney uses solar, and is able to completely power one, almost two of the parks at Disney World Orlando. That includes the rides swinging heavy gondolas and their passengers over tracks or in slings at high speed.

Harnessing The Sun To Power Disney Parks Around The World | Disney Parks. From Disney Parks

I mention Disney because they are steel toothed capitalist sharks. If they’d only used solar to pick political points they’d use small visible things in their parks – like solar lanterns – and scream about it. Instead they’ve built several solar facilities, which is much less visible, and use it for their ordinary stuff. They wouldn’t do that if there wasn’t a buck to be made (as you can see, though, they still brag about it). And who can blame them – it’s literally power raining from the sky. This is also what makes solar interesting for my build. While I can’t use panels to fully charge the castle I can use them to increase my range and my self-sufficiency. After all, Howl’s moving castle can walk forever, and given their ease of use solar panels are the closest we come to something similar.

Next week I’ll write about the castlewalk – a few things about how to build legs for a machine and have it keep its balance while it walks. If you want to support my texts on random things, like this series about building a real life moving castle, you can do so on Ko-Fi. See you next Friday!

Kommentarer

Lämna ett svar

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *