[Just a little theoretical write-up]

Everything is different in Gazelle. We don't start with code - we start with 
English.

So the first step in making a new procedure is a concise description in natural 
language - sort of like a Haiku:

  If there is a regular expression
  and an input
  and the regular expression matches the input,
  generate a sub-input with the matched part.

So there are existential quantifiers ("there is"),
conditions and instructions ("generate").

This is translated (manually or automatically) into executable code
depending on the database back end. A naive translation could be this:

  for (BEA regExp : beaList("Regular expression"))
    for (BEA input : beaList("Input"))
      for (S subInput : regexpExtractAll(regExp.text(), input.text()))
        beaNew("Sub-Input", text := subInput);

This first translation is supposed to be the most barebones version that
actually does something. (It takes all regular expressions and all inputs from 
the database, finds all the matches and creates sub-input objects.)

The key now is that we always treat code as data too.

Because the procedure will need modifications if we want it to actually be 
useful in practice. Here are some transformations that would make sense for 
this procedure:

* Run the procedure on one regular expression only
* Run the procedure on one input only
* Possibly apply the regular expression in a case-insensitive manner
* Have the sub-input point to the regular expression used
* Have the sub-input point to the full input
* Enrich the sub-input object with information as to where the substring is in 
the original string (as it may occur multiple times)
* Find out if an identical sub-input object exists already and skip the 
creation of a new one in this case
* Mark all generated objects with a "trail" (information on the procedure that 
created it)

Some of these are very general and apply to many or all procedures, for example 
the last one. Trails are very important, for example for garbage collection in 
the database.

Other transformations that can basically be applied to any procedure include:

* Transformation into a "coroutine" that can be executed step-wise, i.e. frozen 
and resumed at will (maybe even hibernated to disk). This also allows us to get 
only a few results from a procedure instead of all of them.

* Transformation into a probabilistic machine. This means every input object 
comes with a probability value. During the procedure, probability values are 
combined (multiplied), and only branches with a high enough probability are 
pursued. Generated objects are also equipped with a probability value.

------------------------------------------
Artificial General Intelligence List: AGI
Permalink: 
https://agi.topicbox.com/groups/agi/Tb33925f92e1299c9-M22cafc18257b92db0e56fb24
Delivery options: https://agi.topicbox.com/groups/agi/subscription

Reply via email to