Polymorphism in Mental Development

Posted in artificial intelligence on March 9th, 2014 by Samuel Kenyon

Adaptability and uninterrupted continuous operations are important features of mental development.

An organism that can’t adapt enough is too rigid and brittle—and dies. The environment will never be exactly as expected (or exactly the same as any other previous time during evolution). Sure, in broad strokes the environment has to be the same (e.g. gravity), and the process of reproduction has limits, but many details change.

During its lifetime (ontogeny), starting from inception, all through embryogeny and through childhood and into adulthood, an organism always has to be “on call.” At the very least, homeostasis is keeping it alive. I’d say for the most part all other informational control/feedback systems, including the nervous system which in turn includes the brain, all have to be always operational. There are brief gaps, for instance highly altricial animals depend on their parents protecting them as children. And of course there’s the risk when one is asleep. But even in those vulnerable states, organisms do not suddenly change their cognitive architectures or memories in a radically broken way. Otherwise they’d die.

There are a couple computer-ish concepts that might be useful for analyzing and synthesizing these aspects of mental development:

  1. Parameter ranges
  2. Polymorphism

These aren’t the only relevant concepts; I just happen to be thinking about them lately.

Parameter Ranges

Although it seems to be obvious, I want to point out that animals such as humans have bodies and skills that do not require exact environmental matches. For example, almost any human can hammer a nail regardless of the exact size and shape of the hammer, or the nail for that matter.

Crows have affordances with sticks and string-like objects. Actually, crows aren’t alone—other bird species have been seen pulling strings for centuries [1]. Anyway, crows use their beaks and feet to accomplish tasks with sticks and strings.

crow with a stick

a crow with a stick

crow incrementally pulling up a string to get food

a crow incrementally pull-stepping a string to get food

Presumably there is some range of dimensions and appearances of sticks and strings that a crow can:

  1. Physically manipulate
  2. Recognize as an affordance

And note that those items are required regardless of whether crows have insight at all or are just behaving through reinforcement feedback loops [1].

Organisms fit into their niches, but there’s flexibility to the fit. However, these flexibilities are not unlimited—there are ranges. E.g., physically a person’s hand cannot grip beyond a certain width. The discipline of Human factors (and ergonomics) studies these ranges of the human body as well as cognitive limits.

For an AI agent, there are a myriad places in which there could a function f and its parameter x with some range R of acceptable values for x. Perhaps the levels of abstraction for this to be useful are exactly those involved with perception of affordances and related skill-knowledge.


Polymorphic entities have the same interfaces. Typically one ends up with a family of types of objects (e.g. classes). At any given time, if you are given an object of a family, you can interface to it the same way.

In object oriented programming this is exemplified by calling functions (aka methods) on pointers to a base class object without actually knowing what particular child class the object is an instance of. It works conceptually because all the child classes inherit the same interface.

For example, in C++:

class A {
    virtual void foo() = 0;

class B : public A
    void foo() { std::cout << "B foo!\n"; }

class C : public A
    void foo() { std::cout << "C foo!\n"; }

void main() 
    std::unique_ptr<A> obj(new B);
    obj->foo(); // does the B variation of foo()

    std::unique_ptr<A> obj2(new C);
    obj2->foo(); //does the C variation of foo()

That example is of course contrived for simplicity. It’s practical if you have one piece of code which should not need to know the details of what particular kind of object it has—it just needs to do operations defined by an interface. E.g., the main rendering loop for a computer game could have a list of objects to call draw() on, and it doesn’t care what specific type each object is—as long as it can call draw() on each object it’s happy.

So what the hell does this have to do with mental development? Well, it could be a way for a mind to add new functions to existing concepts without blowing away the existing functions. For instance, at a high level, a new skill S4 could be learned and connected to concept C. But concepts S1, S2, and S3 are still usable for concept C. In a crisp analogy to programming polymorphism, the particular variant of S that is used in a context would be based on the sub-type of C that is perceived.

On the other hand, polymorphism could be fuzzier and more like the switch concept I mentioned in a previous post. In other words, the mechanism of the switch could be anything. E.g. a switch could be influenced by global emotional states instead of the active sub-type of C.

One can imagine polymorphism both at reflexive levels and on conceptual symbol-based levels. Reflexive (or “behavioral”) networks could be designed to effectively arbitrate based on the “type” of an external situation via the mapping of inputs (sensor data) to outputs (actuators). Conceptual based mental polymorphism would presumably actually categorize a perception (or perhaps an input from some other mental module) which would be mapped by subcategory to the appropriate version of an action. And maybe it’s not an action, but just the next mental node to visit.

[1] Taylor, A., Medina, F., Holzhaider, J., Hearne, L., Hunt, G., & Gray, R. (2010) An Investigation into the Cognition Behind Spontaneous String Pulling in New Caledonian Crows. PLoS ONE, 5(2). DOI: 10.1371/journal.pone.0009345

Image credits:

  1. University of Oxford
  2. David Schulz

Tags: , , ,

Mechanisms of Meaning

Posted in artificial intelligence on October 15th, 2012 by Samuel Kenyon

How do organisms generate meaning during their development? What designs of information structures and processes best explain how animals understand concepts?

In “A Deepness in the Mind: The Symbol Grounding Problem“, I showed a three layer diagram with semantic connections on the top. I’d like to spend some time discussing the bottom of the top layer.

Basic Meaning Mechanisms

At the moment, there seems to be a few worthwhile avenues of investigation:

  • Emotions
  • Affordances
  • Metaphors And Blends

Each of these points of view involve certain theories and architecture concepts. Soon I will have more blog posts describing these concepts and how we might implement and synthesize them. Marvin Minsky’s books Society of Mind and The Emotion Machine have many mental agency and structure ideas that may be useful in this context.

Tags: , , , , , , ,

Enactive Interface Perception and Affordances

Posted in artificial intelligence, interfaces on November 14th, 2011 by Samuel Kenyon

I just published version 2 of my Enactive Interface Perception essay over on Science 2.0.

It’s now called “Enactive Interface Perception and Affordances”.

Tags: , , , , ,