Tuesday, May 28, 2013

Another Perversion of Human Thought Processes

My first word was... GOTO.

I grew up in an age of steam locomotives, cobblestone roads and Z80 processors with the clock speed of a cuckoo watch. The first language I ever learned was BASIC, and GOTO was the first command I came across. I still love the exotic, Japanese elegance of these four letters, and the subtle combination of  simplicity, power and unconditional brutality that is embodied in its application. GOTO does not purport any kind of metaphysical humdrum that is so commonplace in contemporary programming ("functions as first class objects", "syntactic closures" etc.). It's a down-to-the-metal, no-nonsense equivalent to how the processor changes the locus of execution from one portion of the memorized program to an arbitrary other position. GOTO is the teleportation spell of computer programming: when the computer reads a GOTO, it immediately and unconditionally teleports to the location stated after the GOTO (in BASIC, to an arbitrary programming line).

Power corrupts, however, and lesser minds get easily confused, so computer scientists went to work to abolish the magic word. It may be argued that program code has become more clear, pure and structured due to the prohibition of GOTO, but these are obviously requirements that reflect the depressing inability of mentally handicapped people to handle intricate, surprising and characterful control-flows. Naturally, connaisseurs of programs with these latter properties came up with the COMEFROM statement, to protest the influx of sanity into the sacred dungeons of our profession. 

COMEFROM is the opposite of GOTO: it does not trigger a jump from its own location, but instead pulls the control to itself whenever the computer happens to process the location mentioned after the COMEFROM. A hapless reader who does not know all of the program won't know what hit him: the execution may leave the current point of execution at any time (just because some arbitrary COMEFROM may lurk in a dark corner of the code, patiently waiting for its chance to wrest control from an unsuspecting little routine task). Even better: there may be multiple COMEFROM statements pointing to the same location, battling for taking over in unforeseen ways. Its beautiful!

Sadly, because of the weak-mindedness of the programming establishment, COMEFROM has never become a popular addition of any serious programming language. But I have reason to think that meditating about it may yet prove useful: extensive use of the COMEFROM statement may be one of the defining characteristics of the human thought process.

Current AI paradigms often use Markov processes to model the equivalent of thought processes: each situation, event or object is treated as a place in a hypothetical space of possibilities, and control travels step by step from one place to its neighbors, depending on conditions and probabilities at the given place. This is not unlike to serendipitous traveling in the real world, including the ability to cover long distances in a very short time, but always triggered and enabled by the conditions I find in the original location. Human thought processes, however, often seem to work the other way around: during the course of contemplating element A, we do not switch to element B (because A has told us to), but our attention gets, suddenly and surprisingly, hogged by element Q, simply because it lurked in the background (together with many of its unruly brethren), and Q is agitated by A (and a host of other influences) so much that it calls all the attention to itself. For example, thinking about toroids may suddenly switch to a contemplation of eating candy, not because toroids hold references to candy, but because our candy activation sink holds references to donuts, and takes over whenever another thought process mentions donut shaped objects. Q (candy) effectively has a heuristic COMEFROM statement: with a certain probability, it will draw the control from A (toroids) to itself, no matter what A says and wants. Q is possibly not alone in possessing a COMEFROM A: many other states may strive to gain control, and will either suppress the competition or become active in parallel. 

COMEFROM might be a terrible idea for writing deterministic and salient programming code, but it might be an undervalued tool for building brain-like problem solving mechanisms. A starting point to harness the power of COMEFROM could be inverse, concurrent Markov processes, whereby many potential states are activated in parallel, monitoring the current state, and competing for becoming the locus of execution themselves. If you have thoughts, ideas or criticisms of today's lunchbreak epiphany, please let me know in the comments.


TL;DR: The (satirical) COMEFROM statement might be an important part of the control flow of human thought processes.

8 comments:

  1. There certainly seem to be set mouse traps in our mind. Although I wouldn't say that triggering them always has to be a surprise. Very often I only notice that something else has started to occupy my thoughts in hindsight; And even in action it sometimes happens that you drifted into the wrong routine and realise that something went wrong when you suddenly notice that you're standing in the kitchen and not in the bathroom.

    ReplyDelete
    Replies
    1. Exactly. I wonder if we should simulate this sudden progression not with activation spreading from current thought clusters, but by keeping many of them alive at low intensity in the background (i.e. outside of attentional control), with opportunities to take over.

      Delete
    2. Hm... I'd guess there isn't an either/or answer to that. You'd certainly want some sort of spreading activation of the current focus of thought to achieve single-minded goal-directedness. Although I'd say there is a continuum between being goal-directed and 'just' being pulled by triggered associations. Isn't global workspace theory going somewhat in the direction of balancing triggered processes taking over while still maintaining some sort of central executive?
      On the subject of goals vs. association: If you've got the time I'd recommend to read Hugo Liepmann's "Über Ideenflucht" (1904). It's a short psychiatric treatise on pathological cases of "flight of ideas". I can't find an online version, but I've got a scan should you be interested.

      Delete
    3. I am not entirely sure about the continuity between serendipity and goal-directedness. Did you ever witness the inability of a two-year old when it comes to letting go of a goal? There seems to be a strong inhibition of alternatives once a goal is established, and fine-grained goal-adjustment might be a trait this is acquired through training.
      I am not entirely sold to Baars' global workspace theory (but I like it), and would recommend Cristiano Castelfranchi's work on goal-directed agency for a functional decomposition (which would nonetheless have to be transmogrified into a spreading activation paradigm). I would be very interested in reading Liepmann.

      Delete
    4. Well I'm also not _sure_ about there being a continuity. I was basically thinking of the different 'moods' one can be in, concerning how much – or little – one is succeptible to superficial association; which to me seems to go together with being more or less unable to follow something through (think hypnagogue states, hangovers or these enthusiastic but exhausting conversations where you're just pingpong-ing subjects).
      Will have a look at Castelfranchi's work, thanks for the hint.
      And I'll send you the Liepmann text.

      Delete
  2. Hmmnyes. But isn't the beauty of COMEFROM that it is a direct logical/structural equivalent to GOTO, just a lot meaner? (Assuming we are talking about GOTOs that can jump to more than a single place?)
    Activation and competition for control make sense, of course, but GOTO and COMEFROM just put the connection information at different ends of the jump, don't they?

    This meanness seems to be an interesting property in itself: It really shows how lost we are when thinking about even the simplest structures when we have no "causal" (linear, time-ordererd, branching) description.

    ReplyDelete
    Replies
    1. Admittedly, I have been cutting corners. First of all, I did not introduce the idea of probabilistic GOTOs, to go from there to a probabilistic COMEFROM equivalent (I assume readers can fill in the blanks). On the other hand, a normal GOTO will always be deterministic, while two COMEFROMs pointing to the same location may be not, which makes it slightly more insidious.

      However, thinking about the resulting structures does not need to be confusing. I guess that some kind of "pandemonium" metaphor will do: a host of competing agents compete for performance, and enter the stage whenever they feel interested (and are not pushed off by others). On the other hand, it might be difficult to hand-code analytical solutions to arbitrary problems in this parallelist fashion, even if we get used to the inversion of the control flow.

      Delete
    2. Agents that get interested too early would of course have to be punished. (You think about a toroid, and the elephant agent gets all excited because he feels he has also something to contribute about being generally convex.)

      Delete