Simple Self-Recognition Algorithms: Understanding Curious Intelligence

katoshi
8 min readAug 5, 2023

Photo by Alexandru Goman on Unsplash

In this article, I will provide examples of a prediction system and a self-recognition system, both implemented with simple algorithms. This will elucidate the fundamental mechanics of self-recognition. It’s merely a hypothesis of mine on how the cognitive function of self-recognition works as of the present moment. However, since it explains the process of a child’s self-recognition rather well, I believe it’s a convincing mechanism.

Moreover, it can be written as an algorithm, suggesting it’s highly verifiable. Based on my experience as an engineer, I believe it functions quite well as an algorithm.

In the following article, the first half explains the algorithms of prediction and self-recognition. It may be slightly difficult to understand for those without programming experience.

The latter half mainly explains the process through which a child gains self-recognition. It also explains how, based on self-recognition, deeper recognition of the external world, self-extension, and cooperation with others occur. It demonstrates that this process is accompanied by instinctive enjoyment. This can be considered a characteristic of intelligence with curiosity.

A Simple Example of a Prediction Algorithm

Consider a predictive system that aims to match predictions with actual outcomes. The predictions occur over time.

For the sake of simplicity, we will consider only a single value as the prediction target. It will either be 0 or 1, initially set to 0.

The predictive system can utilize only two prediction models: [A] the same value will be input as this time, or [B] the opposite value will be input as this time. The prediction system will start with the assumption that [A] the same value will be input, and the initial prediction value will be set to 0.

The simple algorithm of the predictive system conducted over time is as follows:

<Initial State>

Current value of the prediction target: 0
Prediction value: 0
Prediction model: A

<Algorithm>

Step 1) Check if the box’s content matches the prediction value.
Step 1-a) If it matches, do not change the prediction model.
Step 1-b) If it does not match, change the prediction model.
Step 2) Update the prediction value according to the prediction model.
Step 3) Advance the time and update the value of the prediction target.
Step 4) Return to Step 1.

A Simple Example of a Self-Recognition Algorithm

Consider a self-recognition algorithm. The ‘self’ is always in alignment with the target value, no matter what prediction value the system inputs. This is analogous to our hand moving when we imagine it moving.

However, the self-recognition algorithm does not know in advance whether the target is the self or not. Therefore, it checks whether it is the self while predicting the target’s movement.

We will expand on the previous prediction system. Firstly, we add the continuous success count and the prediction count to the system. Both are initially set to 0.

We also add a state of self-recognition. The initial value is unknown, and it can either be ‘self’ or ‘external’.

<Initial State>

Current value of prediction target: 0
Prediction value: 0
Prediction model: A
Continuous success count: 0
Prediction count: 0
Self-recognition: Unknown

<Algorithm>

Step 1) Check if the box’s content matches the prediction value.
Step 1-a) If it matches, do not change the prediction model.
Increase the continuous success count by one.
Step 1-b) If it does not match, change the prediction model.
Reset the continuous success count to zero.
Step 2) Check the label for self-recognition.
Step 2-a) If the self-recognition label is ‘unknown’ and the continuous success count is 10 or more, set the self-recognition to ‘self’ and end.
Step 2-b) If the self-recognition label is ‘unknown’ and the continuous success count is a specific value, intentionally change the prediction model.
(※Introducing a regularity unlikely to occur in nature to avoid coincidental matches is the key. It doesn’t have to be a prime number.)
Step 3) Update the prediction value according to the prediction model.
Step 4) Advance the time, update the value of the prediction target, and increase the prediction count by one.
Step 5) If the prediction count exceeds 30, set self-recognition to ‘external’.
Step 6) Return to Step 1.

The Essence of Prediction and Self-recognition

The algorithms mentioned here are fairly simple examples used to explain the concepts of prediction and self-recognition. More complex predictive models and learning algorithms are required for truly useful predictions.

However, no matter how complex it becomes, the essence of a prediction system remains the same: the cycle of perceiving the outside world, exploring predictive models, and making predictions based on those models. This example is meant to illustrate that.

Similarly, the essence of a self-recognition system does not change, no matter how complex the predictive part becomes. Anything that conforms to its own predictions is recognized as self. To do this, it is necessary to try various patterns that may not naturally occur in order to increase the level of certainty.

More Complex Self-Recognition

In the algorithm demonstrated, there was only one object, and the example showed a situation where the predicted value prepared for the object was directly linked to the control of reality.

In reality, there are many objects, and the values are not just binary, but are often analog values. Also, the models used for prediction will be more complex in reality. Moreover, it’s more realistic to make probabilistic predictions.

Neural networks are likely appropriate for these realistic predictions. They can handle real numbers and make discrete, classification-type predictions. It’s also possible to make probabilistic predictions.

Also, in real-world examples, it is assumed that initially the connection between the predicted values being contemplated and the area being controlled is not found.

As many objects are predicted, some may be found to have a high correlation with the part being controlled. By discovering this correlation, it is possible to link the predicted values and control. Also, by labeling many objects as either external or self, the system can expand the range of self-recognition and simultaneously recognize the outside world.

Deep Understanding of the External World

Furthermore, by moving the self-part, that is, the part that can be controlled, it is sometimes realized that it can affect the object thought to be external. This is the manipulation of the external world. Beyond self-recognition, the understanding that it is possible to manipulate the external world is recognized.

This is like the image of being able to move blocks once you can control your arm, and eventually being able to stack the blocks. By manipulating the outside world yourself, you can come to understand the laws of the outside world. In this way, it becomes possible to not only predict based on passively perceived information about the outside world, but also to repeatedly experiment and solidify knowledge by testing patterns and rules that you thought you could predict.

Extending the Range of Self

Further, you can also master the use of tools. Initially, tools are part of the external world. However, as you learn to handle them, reality begins to follow your predictions. Ultimately, they can be controlled as if they are part of yourself.

This is an extension of the self. When you master riding a bicycle or using chopsticks, it feels as if they are extensions of your body. This also connects to the phenomenon where a person driving a car feels as if their body size has expanded to the size of the car. The reason why I believe being able to control something is a form of self-recognition lies in these points.

Syncing with Multiple People, and the Joy of Self and External World Recognition

There is a unique enjoyment in perfectly aligning your intentions with multiple people to do something. It can be singing or playing music in a choir, clapping hands, dancing, etc.

For example, Rock Paper Scissors is an interesting game in itself, but it only works if everyone throws their hand at precisely the same time. The simplicity of matching the timing correctly is something anyone can learn with a little practice. It’s not that difficult, as even small children can play Rock Paper Scissors.

I can imagine that the enjoyment of synchronizing movements was also a fun process in finding the parts of self that can be controlled. Recognizing this as fun, we, as toddlers, must have tried various things to recognize ourselves enthusiastically.

And the mechanism that creates the joy of self-recognition works even after a certain degree of growth. With this, for example, we acquire various skills such as bicycle riding, mastering chopstick use, reading and writing. These skills are like an extension of the controllable part of the self. Also, acting in sync with others might be of the same kind of enjoyment.

Moreover, it’s not only the joy of self-recognition, but also the joy of recognizing the external world. Learning physical laws and mechanisms by stacking blocks, or learning the laws and mechanisms of communication by playing with friends is fun.

That’s why children keep repeating similar games with slight changes in patterns and seem to enjoy it. From there, they are probably advancing self-recognition and recognition of the external world.

In Conclusion

In this article, I showed examples of a prediction system and a self-recognition system with a simple algorithm. This should have made it easier to understand how prediction and self-recognition can be realized.

Self-recognition is to recognize the external world at the same time. This allows us to recognize the boundary between the self and the external world. Recognizing the external world gives more confidence in self-recognition. Also, based on self-recognition, we could see that we can extend the self and coordinate with others. And such self-recognition, recognition of the external world, and coordination with others seem to fundamentally have instinctive fun. This is a characteristic of intelligence with curiosity.

The application of this theory will, of course, be artificial intelligence.

By understanding the mechanism of self-recognition and creating algorithms, we should be able to reach a technological stage where we can confirm an artificial intelligence, given a virtual body in a virtual space, recognizing itself.

After that, if it is applied to a robot, the artificial intelligence installed in the robot will technically perform self-recognition.

However, current systems like this come into conflict with the ethical issues of artificial intelligence, necessitating a cautious approach to the realization of the technology itself. Discussions on the ethics of artificial intelligence are ongoing, and regulations and guidelines are also being developed. It’s important to emphasize the need to proceed with research and development while paying close attention to these discussions and regulations.

I believe that special attention must be given to the technological risks of artificial intelligence. I am concerned that the rapidly advancing AI, which is under active research and development, might evolve while the researchers themselves do not fully understand its internal mechanisms. I think it’s undesirable to end up in a situation where, after trying to enlarge the neural network size or experimenting with various structures, we conclude that something worked well without really understanding why.

To properly understand and manage these risks, I believe it is crucial to conduct research that clearly elucidates the mechanisms of intelligence.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

katoshi
katoshi

Written by katoshi

Software Engineer and System Architect with a Ph.D. I write articles exploring the common nature between life and intelligence from a system perspective.

Responses (2)

Write a response

we conclude that something worked well without really understanding why.

That's the Medium Algorithm. Most writers, myself inclusive, do not understand it.

1

This was a very informative read, and I enjoy/respect how your presentation thinks outside the box, while still striving to make the info digestible to the average reader. Something that ran through my mind while reading... do you see any…

10