I believe it will end up... where the solution lies!
Compression is the very key to consciousness. There's a video in another
thread. If I remember correctly, the guy explains how compression fits in the system they built.
Here is how I see things:
Imagining, perceiving and acting rely on the same "summarizing" engine.
When you learn how to drive a car, you first have to be really focused on what to do, because nothing is automated yet.
But after repeating the same small actions again and again together, these low-level actions get summarized by a single higher-level action, or rather several higher-level configurable actions, that can be run autonomously. It's like functions definition, really.
Then when you're used to drive, you can drive and talk to someone at the same time, because the driving engine is almost entirely autonomous. Only willingness and unexpected events will draw attention back to the road, with heavy focus.
While multiple tasks are running, focus often switch from one to another, not to act at low-level, but to pilot the acting engine, which is like modifying the parameters you give to a function.
Wikipedia, as always, is a good resource on the topic.
I was using the word "summarize", and I now I use "compress", but it's the same idea.
Say you have a conscious program. You save a snapshot of it, so you can resume execution later, or on another machine. The whole program's mind, in its state, is contained in 1 file. If the program is conscious, it means that one part of its mind contains a representation of its own state. In other words, the state contains the state. The only way you can do this is by compressing the state, to obtain some sort of fractal structure. It's like looking in a mirror when you're between two mirrors, you know, when you see your image reproduced infinitely.
Concretely, pattern learning and compression are two sides of the same coin. If you learn a pattern, then you create a minified version of this pattern, like "is a car" meaning both "is a" and "car".
Imagine the base of a pyramid. You have "instances" that can happen: stimuli, events, states, whatever. These instances "bubble" up: when an instance exists, every pattern this instance is a part of is "excited", and gets its internal counter incremented by one. When a pattern is fully excited (for example "is a car" got incremented twice, one for "is a" and one for "car") it outputs an instance of it. This process builds a second level to the pyramid, with instances of simple patterns. Then a third level, and so on.
The shape of the current pyramid is the program's interpretation of the current situation. This current situation probably leads to an obvious action (even if this action is "wondering what to do", it's still an obvious action). This action is summarized (example: I need to eat now), symbolized. We now have something new
at the top of our pyramid. Since actions are done but also sensed, they're compressed just like any other situation (it's the idea of acting = sensing). So we're able to decompose the top-level action representation into its lower-level components, until things get doable (move arms, ...etc.).
I hope I'm being clear, my english is not accurate.
Ed:
When does consciousness pops up?
You remember this:
function log(x) { console.log(JSON.stringify(x)); }
var entity = {};
entity.externalSensors = [0, 0, 0, 0, 0, 0, 0, 0];
entity.externalActuators = [0, 0, 0, 0];
entity.internalSensors = [0, 0, 0, 0];
entity.instantMemory = [
[0, 4, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
];
entity.target = [18, 1, 2, 3];
entity.behavior = {
3: [0, 2, 3, 0],
5: [0, 1, 0, 0],
8: [1, 0, 2, 0]
}
entity.setActuator = function(actuatorId, newValue) {
entity.externalActuators[actuatorId] = newValue;
entity.internalSensors = [0, actuatorId, newValue, 0];
}
entity.refreshInstantMemory = function() {
entity.instantMemory.push(
entity.externalSensors
.concat(entity.internalSensors)
.concat(entity.externalActuators)
);
entity.instantMemory.shift();
}
entity.logInstantMemory = function() {
for (var i=0; i<entity.instantMemory.length; i++)
console.log(JSON.stringify(entity.instantMemory[i]));
console.log();
}
entity.setTarget = function(targetSlot, newAddress) {
entity.target[targetSlot] = newAddress;
entity.internalSensors = [1, targetSlot, newAddress, 0];
}
entity.xy = function(n) { return { x: n%16, y: Math.floor(n/16) }; }
entity.fetch = function() {
var values = [];
for (var t=0; t<4; t++) {
var addr = entity.xy(entity.target[t]);
values.push(entity.instantMemory[addr.y][addr.x]);
}
return values
}
entity.interpret = function(values) {
var candidate = 0;
for (var i1=0; i1<3; i1++) {
for (var i2=i1+1; i2<4; i2++) {
if ((values[i1]==values[i2]) && (values[i1]>candidate))
candidate = values[i1];
}
}
return candidate*2;
}
entity.do = function(action) {
if (action[0]==0) setActuator(action[1], action[2]);
if (action[0]==1) setTarget(action[1], action[2]);
}
entity.run = function() {
while (1) {
entity.refreshInstantMemory();
entity.do(
entity.behavior[
entity.interpret(
entity.fetch())]);
}
}
entity.run();
It's rather easy to follow, even though it's not meant to be used as is, since the entity isn't connected to anything. It's just showing off the outline of the system.
We start from a typical program:
→ → → External sensors → → →
↗ ↘
( WORLD ) [ PROGRAM ]
↖ ↙
↠↠↠External actuators ↠↠â†
And we add an internal sensors loop:
→ → → External sensors → → → ↠Internal sensors â†
↗ ↘ ↙ ↖
( WORLD ) [ PROGRAM ] ↑
↖ ↙ ↘ ↗
↠↠↠External actuators ↠↠↠→ Activity logger →
So the program is part of the world it observes and learns from.