Representing variant structureJuly 10, 2008
Using the
has relationship to represent structure allows us to represent a lot about the world, but sometimes the structure of something can vary.
For example, the following isn't always true:
How can we represent that fact that a guy can be married or single?
Using weak relationshipsThe first option is to weaken all relationships so that they represent the way things
might be. That way, the following...
man has:0 wife man has:1 wife |
|
... means:
  | Maybe a man doesn't have a wife |
  | Maybe a man has a wife |
Using scalar weighted relationshipsA second option is to optionally assign a scalar value between 0 and 1 to a relationship to indicate roughly how often it is the case.
0.4: man has:0 wife 0.6: man has:1 wife |
|
... means:
  | Approximately 40% of the time, a man doesn't have a wife |
  | Approximately 60% of the time, a man has a wife |
As usual, this represents a bit of a challenge to the directed graph representation, but this is a case where I feel it is appropriate and perhaps analagous to neural connections having weights.
Representing names (words)July 10, 2008
Although we haven't formally started designing the language component of the AI, we're already needing to reference names, which are words. Words are strings of letters.
Textual representationA word can be represented by surrounding it with double quotes. For example:
Graphical representationThe keyword used to uniquely identify a word entity is the same as its textual representation. ie. The word surrounded by double quotes. Example:

Assigning valuesJuly 10, 2008
Given the following graph, how do we assign a value for Daniel's age?
Assigning values to a pathOne option is to allow a value to be assigned to a path of the graph. For example, the path:
Daniel -> person -> age
... could be assigned the value 27.
Although simple and intuitive, this approach abandons the directed graph representation, since there is no direct way to represent a path in a graph having a value.
A directed graph representationWe can stick with our directed graph representation as follows:

Notice that the value assignment involves a relationship within a relationship: The entity "Daniel" is related to "age", and the definition of that relationship instance is an equality relationship with "27".
This works, but is more complex than seems necessary. In terms of the graph representation, it can be represented by:
Where
x is a new, un-named node. Note also that here,
= does not represent any new notation and instead is simply a relation between two things uniquely referenced by the
= keyword.
An alternative graph representation
This representation is simpler, and can be represented using two directed connections:
It also allows us to represent values for
has:n relationships quite easily. For example:

ie. | Daniel has two sisters, Rebekah and Hannah. |
A textual representationFor ease of use, we'll define value assignment as:
In cases where more than one value is required, we'll use:
Daniel.sister[0] = Rebekah Daniel.sister[1] = Hannah |
|
Note that at the moment this is a bit dishonest since there is no inherant order in multi-values for how they are being represented in the graph.
A note about node labelsTo make graphs readable, we have been labeling nodes with their associated keyword. But this is merely an aid for the reader, and is not a part of the representation itself. Thus, our current representation is more acturately graphed as follows:

This raises an important point: Until we connect our representation to language in some way shape or form, it can't do very much.
A note about collisionsConsider the following:
| Daniel.first_name = Daniel |
|
This is a circular reference, since the "Daniel" entity is used twice. The problem is that the two references to "Daniel" are actually intended to reference different things:
1. | The first use is intended to reference the entity Daniel which is a person |
2. | The second use is intended to reference the entity Daniel which is a word (a string of characters) |
This highlights how using keywords to uniquely identify entities becomes tricky due to collisions. It also hints at the need already to connect our representation with language, since "Daniel" is a string of characters. ie. A word.
older >>