Assert: LZW-like AI

2005 Brendan G Bohannon

Gather some ideas related to this general concept.

The AI will see the world as a log of events.
These events will be viewed as being either SVO or SOV, in analogy to the natural-language concepts.

A noun will be viewed as possibly matching another noun by some factor, eg: 1, they are the same object, 0.75: they are 2 objects of the same type (eg: people), 0.5: they are 2 vaguely similar objects (eg: a human and a cat), 0.25: they are 2 largely unrelated objects (a mouth and a loudspeaker), 0: they are 2 unrelated objects (eg: a cat and a mountain).

Ok, this matching is itself subjective:
Identity: Same object;
Class: Same type;
Inheritence: Both share a common "ancestor" type;
Unrelated: none of the above hold.

Verbs will have similar relations.

First, sort the events into a set of trees, first based on subject:
    Lists of events of same subject identity;
    Lists of events of same subject class;
    Lists of events of the same subject inheritence.

Note: A single event may appear in multiple lists.

Then, these lists are sorted by either object or verb, or multiple lists are generated (eg: one set sorted by object and the other by verb).

Assumably, by this point enough sorting has been done that the contents resemble a single token stream (something is viewed as either a match or it is not).
The remainder of the contents is expected to progress wrt time.

Within each final list:
Search for a pattern which is the current pattern+the next most recent event;
If found and it has sufficient "weight", then this pattern is used as the current pattern, with its weight being increased;
If not found, then the current pattern is emmited to the output event stream, and any "attributes" related to the pattern are used, the new event is used as the start of a new pattern.

"attributes" here would be, eg, "emotional" triggers, impulses to perform a certain action, etc...
Likewise, there will be an internal state that could represent some emotions and other impulse levels, along with any actions that have sufficient impulse.

If sufficient impulse exists for an action, it may be performed, and the action is sent to the output event stream.
"Psuedo-actions" may also exist, eg, ones which may invoke a change in internal state, but have no real external behaviors.
Some actions may be generated randomly, eg, something like a random weight scaled by a "chaos" level could be added to actions, causing less likely (but not necissarily inhibited) actions to be performed in times of desparation or similar.

Actions themselves may have impulses, eg, to effect internal state or to trigger other actions.

If reinforcement arrives, then any recent actions are imprinted on the recent patterns and actions with a weight that decreases over time.
Reinforcement times the inverse of the time since the action times the inverse of the time since the event (either a pattern or action).
Similar goes for punishment, just this weight is subtracted from each action for each pattern rather than added to it.

There will be an internal state that could represent some emotions and other impulse levels, along with any actions that have sufficient impulse.
State will likely consist of some amount of weights and numbers (eg: "emotion" or other internal state).
State may be have-coded to invoke certain actions, or it may feed back into the main algo (eg: by generation of events).
Changes in state may also generate reinforcement or punishment, eg, a change which is "pleasurable" may generate a positive reinforcement, but one which is not may generate a punishment.