Story 5: I am 27. What year was I born in?July 16, 2008
Story: I am 27.
Question: What year was I born in?
Answer: 1980 or 1981 (assuming the current year is 2008)
We've already parsed the statement. The new challenge is answering the question, which requires us to derive
speaker.birth.date.year from
speaker.age. What makes this even more complicated is that the answer could be one of two years, depending on what month and day the person was born in.
Required knowledge about the worldperson has_a birth birth is_a event event has_a date date has_a year date has_a month date has_a day "I" -> speaker "born" -> birth: noun |
|
Transformation 1The word "what" doesn't do a whole lot other than make it clear to the reader that a question is being asked. We can drop it. We introduce the term
{fragment} to mean "list of words".
Application:
| What year was I born in? -> year was I born in? |
|
Transformation 2| {noun} was {noun} {verb} {participle} -> $2.(($3 $4 $1)) |
|
Application:
| year was I born in -> speaker.((born in year)) |
|
Here we introduce another intermediate form that is partly represented in English. The two round brackets indicate that the English fragment inside has yet to be evaluated, but represents a property of
speaker.
Transformation 3| {verb} in {year} -> $1.date.$2 |
|
Application:
| speaker.((born in year)) -> speaker.birth.date.year |
|
Of interest here is the mapping of the word
"born", which is a verb, to the noun
birth.
RulesAlthough we can transform the question to
speaker.birth.date.year, we don't know its value. We only know
speaker.age, so we'll need to use rules to derive
speaker.birth.date.year.
0.5: rule: $x.age = $y -> $x.birth.date.year = current_date.year - $x.age |
|
0.5: rule: $x.age = $y -> $x.birth.date.year = current_date.year - $x.age - 1 |
|
Aside from introducing some math into our rules, what is interesting here is that determining a person's birth year given their age isn't as simple as subtracting their age from the current year.
To accommodate this, we also introduce a sort of weight with each rule, which says that there is roughly a 50% chance that the rule can be applied. Thus, when the AI tries to derive
speaker.birth.date.year, it will find both rules, and because it will be ambiguous which rule to apply, it must report both answers as possibilities.
RulesJuly 16, 2008
If an AI knows the value of
speaker.residence.city, then it should be able to derive the value of
speaker.residence.location. ie. Generalize.
This represents a whole area of research: How do we give an AI with
some knowledge about the world the ability to deduce other things?
One strategy is to employ rules.
Rules are like transformations in that they have an input specification, called the
conditions, and an output specification, called the
implication.
Conditions:
$x is_a residence $x.city = $y |
|
Implication:
What this says is that if we have an entity in our data set that is a residence, and its city attribute has a value, then we can deduce more generally the location of that residence as being the same.
Rules are used in reverse, however: We start with the problem, "How can I deduce
speaker.residence.location", and search for rules that can imply that information. When we find one, we evaluate whether the we can meet the conditions necessary to make the implication.
Textual representation| rule: $x is_a residence & $x.city = $y -> $x.location = $y |
|
Alternate form:
rule: $x is_a residence $x.city = $y -> $x.location = $y |
|
Story 4: I live in WaterlooJuly 15, 2008
Story: I live in Waterloo
Question: Where do I live?
Answer: Waterloo
Note: We'll cheat for the time being by using an overly simplied transformation.
Required knowledge about the worldWaterloo is_a city "Waterloo" -> Waterloo (noun) |
|
Transformation 1| I live in {city} -> speaker.residence.city = $1 |
|
Transformation 2| Where do I live -> speaker.residence.location |
|
But we don't know the value of
speaker.residence.location, so we're stuck. This highlights the need to be able to derive facts from other related facts. What we need is a rule that says: "If I know a person's city of residence, then I can derive in a more abstract sense where they live".
older >>