Overview Index

Select information from the memory

Select information from the memory may be executed either by Strong AI itself or by tester/operator/creator.

Select information from the memory could be done by SELECT operator of SQL-language.

 

Example 1:

Tester wants to know, what PCnous knows about concept "mouse".

So tester makes such SQL-queries from the main memory:

-- Query {GetConceptIdOfWord}

SELECT ConceptId

FROM WordDictionary

WHERE Word = 'mouse'

Query {Base} returns only one reference to the concept, which represents 'mouse' concept in the main memory.

 

Example 2:

Get attributes of specified ConceptId (which represents 'mouse' concept in the main memory).

-- Query {GetConceptAttributesOfWord}

SELECT *

FROM Concept

WHERE ConceptId in {GetConceptIdOfWord}

 

-- That is full query {GetConceptAttributesOfWord} will look like:

SELECT *

FROM Concept

WHERE ConceptId in

            (SELECT ConceptId

            FROM WordDictionary

            WHERE Word = 'mouse')

 

Query {GetConceptAttributesOfWord} returns only one concept.

It is not enough to describe concept "mouse".

Probably tester would like to continue investigation in order to find related concepts:

 

Example 3:

Get ConceptIds of 10 the most important cause concepts to the "mouse" concept:

-- Query {CausesOfWord}

SELECT top 10 CauseConceptId

FROM CauseEffectRelation

WHERE EffectConceptId in {GetConceptIdOfWord}

ORDER BY Coherence Desc

 

Example 4:

Get ConceptIds of the 10 most important effect concepts for the “mouse" concept:

-- Query “EffectsOfWord

SELECT Top 10 EffectConceptId

FROM CauseEffectRelation

WHERE CauseConceptId in {GetConceptIdOfWord}

ORDER BY Coherence Desc

 

See also:

Testing

Know-how