Starting out with a new project, SynapSteward (working title which my local LLM helped me come up with, and then congratulated me most heartily as if I had come up with it all by myself). The idea is to explore creating a home automation platform using LLMs with a model based on how the human nervous system works.
It started out during one of the weekend North Downs walks that my partner and I love. It was a cold winter morning, and of course, our noses were running. We ended up discussing why and how this happens. The “why” was easy to answer (to keep the air we breathe moist and warm), but the “how” was a bit more complex. It led to a bunch of things about how the sympathetic and parasympathetic nervous systems work, and how they control the various functions of the body.
Turns out the response to cold weather is a combination of multiple systems. The sympathetic (“fight or flight”) system constricts blood vessels, activates muscle contractions leading to shivering, and increases the heart rate. The parasympathetic (“rest and digest”) system increases mucous production and stimulates lacrimal glands leading to tears. In addition, there are lower-level physiological responses that are entirely independent of the nervous system—local vasoconstriction (blood vessesls in the skin constricting to reduce heat loss), and piloerection (goosebumps) which traps air to provide insulation (though most of us don’t have enough fur for this to be effective).
Inputs to the nervous system come from various sensors in the body, like the internal thermoreceptors which monitor the core internal body temperature, and the external thermoreceptors which monitor the skin temperature. The hypothalamus, the control center for the autonomic nervous system, processes these inputs and directs the sympathetic and parasympathetic systems to respond accordingly.
The cerebral cortex, the “thinking” part of the brain, is almost entirely uninvoled in the whole process. It’s only after the response has been initiated that the cortex gets involved, and we start to feel cold and decide to put on a jacket. And of course, the cortex is involved in the higher-level decision making, like deciding to wear a jacket before going out in the first place.
Anyway, the point of all this is that the human body is a complex system with multiple interacting subsystems, each with its own set of sensors and actuators. And these subsystems work together to maintain homeostasis, the body’s ability to maintain a stable internal environment despite external changes.
One way to think about home automation is as a similar system. The house is the body that needs to maintain a stable internal environment (temperature, humidity, lighting, etc.) despite external changes (weather, time of day, etc.). The house has its own set of sensors (thermostats, humidity sensors, light sensors, etc.) and actuators (heaters, air conditioners, lights, etc.) which need to work together to maintain homeostasis.
The conventional approach to home automation is to treat each sensor and actuator as a separate entity, controlled by a central hub. This is like the cerebral cortex controlling each muscle and gland in the body individually. Even if it works, it’s not very efficient or elegant. What if we could create a home automation platform that works more like the human nervous system, with multiple interacting subsystems working together to maintain homeostasis?
That’s the idea behind SynapSteward. Instead of a central hub controlling everything, SynapSteward will have a hierarchy of modules all hooked up to a common communication bus. The lowest level modules will be responsible for reading sensor data and controlling actuators, just like the internal and external thermoreceptors in the body. These modules will have a limited set of functions and will communicate with higher level modules to coordinate their actions. The higher level modules will be responsible for processing the data from the lower level modules and making decisions about how to respond, like the hypothalamus in the body. And the highest level module will be responsible for coordinating the actions of the lower level modules to maintain homeostasis.
The lowest level modules will be autonomous and will be able to function even if the higher level modules are offline. Simple rules will be programmed into these modules to allow them to respond to sensor data without needing input from the higher level modules. These modules will also bubble up important information to the higher level modules, like if the temperature is too high or too low, and the higher level modules will decide how to respond. The higher level modules can be small local LLMs which have a greater degree of autonomy. The highest level module could be a cloud-based LLM which will only be involved in exceptional circumstances.
Anyway, that’s the basic idea. Will be posting more about this as I make progress. Given how I work, there will almost certainly be long gaps between posts, and even longer digressions into unrelated topics. But that’s the fun of it, isn’t it?