An experiment in teaching computers to socialise
For me, it all started with Halo. A hugely popular sci-fi game released all the way back in 2001 featuring a highly sophisticated artificial intelligence named Cortana. Ever since I first played Halo, artificial intelligence has fascinated me. Is it possible to create an AI on par with the ones in the Halo universe? Ones that are essentially the same as human minds but with improvements to multi-threading, I/O interactions and beyond? One day for certain, much more than that even. But we aren’t there yet. Although I find the subject fascinating, I have not done much research into AI. Until recently.
Roughly a year ago I was reading through Hackaday articles, specifically ones about the Atmel ATTiny range of microprocessors. When I stumbled across this competition entry (See the overview below for a brief description). I was quite disappointed to find that after failing to progress to the next stage of the competition the author decided not to continue with the project. Giving some thought to the concept I forgot about it entirely.
I’m not sure what reminded me about it, but for whatever reason, I once again dug up the article a few months ago and thought seriously about expanding upon it. After filling up a few pages of my notebook with maniacal ramblings and ideas I decided to follow it through and see what interesting challenges and results arise. I plan to write a series of posts about my progress with the goal of keeping myself motivated, sharing the project with those interested and hopefully hone my thoughts and ideas! In this initial post, I’m going to outline my thoughts and development plan (on second thought the development plan will have to wait, this post is long enough!). Later posts will cover the hardware and software in more detail. I also plan to release everything I do in this project as open source on GitHub.
Overview
In the Hackaday competition project, the user “shlonkin” created a network of tiny little computers, the size of a car key, and placed them around a room; calling it “a social network of virtual pets”. They utilised inexpensive hardware to record light and temperature in the room, having the nodes interact and discuss this information.
In my version of this, I will be increasing the complexity of this project, using slightly more expensive hardware in order to handle more complexity in the code.
Making sense of my notes
Where to begin manipulating the social interaction of these little computers? The wealth of options available is almost daunting. Perhaps I will tackle a large amount of them at some point but, as this is just an experiment I’m doing by myself, for fun, I’m going to keep it simple to start with. So, what should the nodes “have” in terms of characteristics and “thoughts”? I came up with five main areas for initial implementation.
- Comfort
- Wealth
- Relationships
- Emotions
- Socialising
What do they mean? How can a computer have any of those? Well, let me explain.
Comfort
The initial prototype will use a photoresistor and a thermistor to sense light and temperature at the node’s location. I am entertaining the thought of including more environmental input in future; I’m not quite sure what else could be added, perhaps humidity, motion, noise or colours around it? Although those would be interesting how much value would they add? For now, I will be sticking to light and temperature as the “The society of things” project did. How will these affect comfort you ask? In the inspiration project, the light level and temperature were purely used as “talking points” between nodes, in which the creator allowed the node to decide if it was going to lie about the values it was reading, when asked by another node. In this project, I want to use them for more than that. During the creation process, a node will be assigned random characteristics, some of these are used to determine if a node is comfortable. A good example, for this, is temperature range. A node can be assigned a comfortable temperature range, within a range. What I mean by this is: there will be an overall minimum and maximum value that can be given to a node, as obviously going too far to either extreme will damage or destroy the node. Within this safe range, they will be assigned a smaller range randomly. This might not coincide with their placement. For example, if a node is placed in a greenhouse it has the potential to get very warm. During creation, the node might have been assigned a comfortable range of -5c to 10c. It won’t be very comfortable in the greenhouse! How does it improve this? It can’t move to a different location (although mounting one of these on some kind of robot sounds like a very interesting expansion project!) so it’s a bit stuck. Well, not exactly. As I will talk about in the next section, wealth, the node can buy things from its peers to increase its comfort; these could include temperature, light or comfort itself.
Wealth
I thought about using the level of light as a form of currency, increasing a nodes credits at a rate correlated to the amount of light it is receiving. Not very exciting, so I went looking for alternatives. In real life, there are many things that affect the amount of “credit” we have. We use our skills to do things that in turn we are given money for. We can invest the money in stocks, shares, and bonds, and we can create things that generate passive income. Of course, these can’t be quite directly applied to this experiment and shouldn’t be! I don’t want to replicate humanity exactly, I want to exploit the key features of computers. However, these thoughts did make me consider that multiple “credit” sources could and should be built. However, there still needs to be a base. I don’t want to have the nodes spend forever thinking about what they want to do for a living. If we start going that deep it will take a very long time to build and there won’t be an end to the things we could add! Therefore I came up with the following, which ties in with comfort. When created, the nodes are given randomised characteristics. These are used to determine their comfort level, as we looked at already. In the emotions section, I will go over how the comfort level of a node affects its attitude. As the nodes will be placed randomly, this will affect the amount of light they receive and the temperature around them. This would mean that some nodes may be more comfortable than others, in turn, this affects how they socialise. Why not give them the ability to trade light, temperature or comfort? I’m curious to see how this will be implemented, it should be quite interesting.
A lot of the ideas in my notes relate to this section. Including economy, types of work activity and using a distributed ledger (blockchain) to monitor transactions. I want to keep the initial system simple and get something working before expanding on my ideas. In the following posts, I will outline my development plans and write up more of my notes on wealth and other areas. For now, let us continue.
Relationships
Human relationships are highly complex, way too complex to really go deep into and implement into an experiment like this, right of the bat at least. For the initial development, the relationships have been kept basic and are used, in part, to determine how nodes interact. Relationships between nodes can be one of five different states and directly relates to another node:
- Neutral – Default state, no affection
- Acquaintances – Slight positive affection
- Friends – High positive affection
- Unfriendly – Slight negative affection
- Enemies – High negative affection
What is affection? Simply, affection is a value that determines how one node feels about another. This is represented by a positive or negative number. Again, I’m keeping this simple and very far from human relationships. In my notes, I wrote: “Friends – High affection (mutual), requested by first with the highest affection.” However, I am in two minds about this. In a computer-thinking-for-itself kind of way having them request friendship makes sense. In a social way, and in terms of this experiment, it would make sense to have them not know what the others think about them. At least not by saying “Shall we be friends?”, “Yes/No”. Then again a node doesn’t have to tell the truth when answering, or asking for that matter! There could be a lot of amusement watching them trying to work out if the other node considers it a friend. Add more layers of complexity and you could introduce frustration. But trust is a good start, more on that in emotions. Relationships aren’t completely necessary but are a part of socialisation that is not overly complex at the base level. It gives a good foundation to expand upon with later developments. For example, something a good friend suggested “Randomly limit the number of friends a node can have”, this made me think that instead of limiting the number of friends, assign a minimum and maximum preferred amount of friends allowing the nodes to exceed these. If they exceed them then we introduce erratic behavior. Instead of just going from one to the other, we could instead introduce a stress variable that is affected by multiple different things. This, in turn, would have an effect on the behavior of the node. Thanks Calvin!
Emotions
Let’s take a look at how I’ve outlined the emotions in my notes before we break them down further.
- Happiness – On a scale between -10 and 10
- Confidence – Affected by various things, higher confidence increases the likelihood the node will start conversations.
- Honesty – Likelihood a node will tell the truth
- Desire – How much a node wants something, for example, wealth or social interaction.
- Affection – How one node feels towards another.
- Trust – How trusting a node is, will also be applied directly to relationships between nodes.
Emotions will play a large part in how the nodes socialise with each other; if they feel like socialising at all. So far, I have only expanded upon happiness and desire, purposefully leaving a page blank to add any notes on the rest. Largely these emotions will simply be given a number, most likely out of 100. Some, namely confidence and desire, will definitely require a lot more thought. Happiness will be affected, and will, in turn, affect, interactions with other nodes. Additionally, it is affected by comfort. I have for the moment decided against letting wealth affect happiness directly, although it may end up indirectly affecting it based on desire and how the two emotions interplay. Let’s start with interactions and their effects.
- Good interactions will increase happiness.
- Being ignored decreases happiness. This happens when a node has no conversations in a set period of time. Perhaps this time period could be random, introducing extroversion and introversion?
- Being comfortable increases happiness over time.
- Being uncomfortable decreases happiness over time.
- Being wealthy does not directly affect happiness
- Being poor does not directly affect happiness
- Being in debt decreases happiness based on the amount of debt the node has.
Before continuing, you may have noticed I mentioned debt in the last point. Debt is part of the economic ideas I have; I will expand upon this in a follow-up post.
Quite straightforward for the moment. I’m sure I will add onto that, but any of those additions will need to wait for version 2 or beyond.
Confidence I have found tricky to come up with a definition for. Achieving desires, happiness and friends I would think to be the most obvious factors. A randomly assigned initial confidence value is a must, in order to get nodes socialising at the start.
Desire, what could we have a node desire? Well, pretty much anything that it can get its grubby little circuits on!
- Power
- Wealth
- To be friends with every node
- To be left completely alone
- To be comfortable
- Have it’s preferred light level and/or temperature
I can imagine interesting things beginning to happen when we have nodes do whatever they can to achieve their desires. As with other areas, I think that nodes should be able to focus on multiple tasks (achieving desires, socialising, increasing wealth) at the same time. Seeing as multitasking is a major benefit of computing!
Socialising
Somehow I managed to miss the actual socialising of the nodes in my initial notes. I’m not too bothered as everything I have written up so far is essential, as it is the foundation of the social interactions. Having covered a lot in this first R&D Log, I will save socialising for the next post. As the key component of this whole experiment, I would like to be able to go into it in great detail without worrying about pushing the word count too high here!
[…] that we have an understanding of the goal of the experiment, lets take a look at the […]