Input, control and automation

Saturday, 9 January 2016

Building a Home AI, Part 2: Specifications

02:05 Posted by Roxton , No comments
Having decided to build a cyber-valet, it's probably a good idea to think about what such an assistant would be - which, in the case of something that is entirely servile, is probably synonymous with what it does. Zuck's Facebook post mentions a few things:
  • Controlling the lights and temperature in his house
  • Watching his daughter’s room for hazards
  • Admitting guests based on facial recognition.
The first and last of these are relatively simple goals; so much so that there are already off-the-shelf products that have achieved them. The second is rather more challenging – object recognition is a really tough problem, especially when you’re trying to look for lots of different objects at once – and, as I don’t currently have any children, is something I might put aside for the moment.

Let’s add a few more things our valet should be able to do:
  • Run a bath
  • Make a pot of tea
  • Create, manage and remind me of appointments
  • Know my schedule and make recommendations for clothing, travel routes, etc.
  • Handle quotidian correspondence
  • Play and discover music, videos, etc.
  • Draw the curtains
  • Watering plants
  • Track groceries/household goods
  • Know when you’ve put something in the oven and when it’s done
  • Answer trivia questions and source quotations
  • Resolve intricate domestic dramas
  • Read Spinoza.
Maybe not those last two. Not yet, anyway.

What you’ll notice from that little list, which is really just an expanded version of Zuck’s, is that there a lots of different problems to be solved. I think the best way to group these problems is as follows:
  • Input
    • Verbal commands
    • Internet data
    • Sensor readings (light, heat, moisture, etc).
  • Processing
  • Output
    • Software
      • Booking an appointment online
      • Sending an email
    • Hardware
      • Running a bath
      • Making toast
Input problems tend to be either trivial (sensor readings) or fantastically difficult (speech recognition).  In both cases I’m happy to let someone else solve the problem for now. In fact, because wiring my entire house with microphones and/or buying and hacking a dozen Amazon Echos is a pretty extreme starting step, I’m going to pass all input to Mervyn (oh, I’m calling it Mervyn for now, because I’m terrible at names) in text form through a console, with various tags (sensor, speech, etc.) to simulate different types of input. The point is that input solutions should really be plug-and-play, and aren’t particularly relevant to the ‘core’ problem of having an AI that can actually understand what it’s receiving.

The same can be said for many of the output problems, particularly those that rely more heavily on hardware. It shouldn’t matter exactly which brand of computer-linked thermostat I have, or whether I’ve built my own; Mervyn should be able to handle it. If the other man can do it better, let him.
The place to start, then, is on that un-expanded ‘Processing’ step in the middle. Which is of course rather obvious. Some of this can be outsourced as well, of course: there’s no need to build a trivia engine when Google search will do it for you; a combination of Tensor Flow and Google Inbox can be used to generate email replies. Mervyn doesn’t need to have a massively deep neural network; it just needs to access them from time to time.

So far I’ve mostly talked about what Mervyn won’t be. It will, of course, change over time, but for now I’m anticipating two main components. The first will be a rather messy flowchart – basically a collection of rules and procedures for handling various types of input. For example, if I ask whether or not I need an umbrella, Mervyn should look up where I’m going in the near future, check that against weather reports, and reply.

The second component will be a large, loosely structured database containing all the information that Mervyn needs to do its job. This should include big chains of relationships between items, as well as previous instructions, modifications to those instructions and so on. This database would be the thing that really made Mervyn a personal assistant, and would be different for each installation. Because it would inevitably include a fair amount of personal information, it’s important to state straight away that I would never, ever want this database to be accessible over the internet or shared with anyone. If you want to take Mervyn with you, you can clone it to a memory stick or load it onto your phone. Maybe, if I were absolutely sure I had the encryption nailed down properly, you could have remote access. But there’d never be any kind of corporate exploitation of that data – it would be entirely local and under the control of the user.

So, what next? Let’s start with the little things:
  • Build the interface (a basic command line will do for now).
  • Accessing, storing and interpreting weather data.
  • Using that data to respond to weather queries.
This shouldn’t be particularly difficult (famous last words), and opens up nice avenues for further development – location tracking, scheduling, and so on.

Tuesday, 5 January 2016

Building a home AI: Introduction

00:14 Posted by Roxton , , No comments
Another year, another press release from Mark Zuckerberg's PR team, this time listing his New Year's resolutions. One of these is to build "a simple AI" to run his home and help with his work, à la Jarvis from Iron Man. Being fantastically lazy myself, I have often wished for such an assistant, digital or otherwise, and I thought that a pleasant project for this year might be to attempt its creation, mirroring Zuck's progress.

Of course, I'm going to be facing slightly different challenges. Zuckerberg has several billion dollars; I have a student loan. He has hundreds of the brightest minds in AI research; I have a cat. On the other hand, I don't need to 'visualise data in VR' or find new ways to extort value from the harvested data of a billion users.

Next time, I'll run through some of the specifications and requirements of the proposed system, but until then I'll be working on the hardest part of any new project: naming it. In keeping with the robo-butler theme, here are some ideas:
  • Jarvis (getting the obvious out of the way)
  • Jeeves (actually a valet, and also terribly obvious)
  • Beach
  • Bunter
    • Mervyn
  • Kyrano
  • Merridew
  • Seppings
  • Butterfield
  • Oakshott
  • Wodehouse.
What's that, Verity? Using the names of fictional servants is forbidden (and possibly in violation of copyright law)? Bah. If anyone reading this is capable of original thought (I'm not, clearly), shove your ideas below.