Walk Softly and Carry an Appropriately Sized Stick

Polymorphism in Mental Development

What does a crow with a stick have to do with computer programming? And AI?

Before we get there, I propose two important features of mental development:

  1. Adaptability
  2. Continuous operations

Adaptability

An organism that can’t adapt enough is too rigid and brittle—and dies. The environment will never be exactly as expected. The environment will not be exactly the same as any other previous time during evolution either.

Sure, in broad strokes the environment has to be the same—like gravity—but many details change.

And the organism itself is always changing, especially growing up, so the mind has to adapt to those self changes as well.

Continuous Operations

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. The system operates continuously, uninterrupted.

I’d guess for the most part all 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.

How Would an AI Do This?

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, just two that I wanted to put out there as possibilities.

Parameter Ranges

Almost any human can hammer a nail regardless of the exact size and shape of the hammer, or the nail for that matter. Humans—and all other animals—have bodies and skills that do not require exact environmental matches.

It’s fuzzy. It’s a range.

But a range implies limits.

In the Halo games there’s an alien weapon known as the Gravity Hammer. But the human characters, at least in their Spartan super-soldier states, can use that weapon. But if that was in real life, and the hammer was too huge or heavy, or had some weird alien handle that your hands could not grip, you would be out of luck. That alien hammer does not afford use by a human.

As an example of a non-human animal: Crows have affordances with sticks and string-like objects. Actually, crows aren’t alone—other bird species have been seen pulling strings for centuries1Taylor, 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. . Anyway, crows use their beaks and feet to accomplish tasks with sticks and strings.

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

Organisms fit into their niches, but there’s flexibility to the fit. However, these flexibilities are not unlimited—there are ranges.

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.

Polymorphism

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++:

// parent class
class A
{
public:
    virtual void foo() = 0;
};
// child class 
class B : public A
{
public:
    void foo() { std::cout << "B foo!\n"; }
};
 
// another child class
class C : public A
{
public:
    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()
}

For those not familiar with (this kind of) code: It’s showing a class A and two child classes, B and C. That means B is conceptually an A and also C is an A. Then the code makes two objects, obj and obj2, which are both of type A. But one of them is created as a B, and the other as a C. They both have the same A interface, which means you can call foo() on both of them.

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 programming polymorphism have to do with mental development? Well, it could be analogous to a way for a mind to add new conceptual types without blowing away the existing types. And a child concept is likely to still be able to fill in anywhere its parent could.

This might go hand in hand with mechanisms of switching like I mentioned in my post “Growing Robot Minds”. The trigger of a switch could be anything, e.g. emotional states.

External Polymorphism

Even if there’s nothing like computer programming polymorphism in the “architecture” of the nervous system, it does provide another way to look at the aforementioned ranges, like the sizes of sticks.

Instead of ranges we could chunk features and dimensions together into various classes. Crows that eat grubs out of logs value hooked sticks more than straight sticks2Klump, B.C., St Clair, J.J., & Rutz, C. (2021). New Caledonian crows keep ‘valuable’ hooked tools safer than basic non-hooked tools. eLife, 10. https://elifesciences.org/articles/64829, so maybe in that system there is essentially a class for sticks with a sub-class (a child class) of hooked sticks. But this is all external—it doesn’t necessarily mean there’s some symbol in the crow’s brain.

For dogs, there certainly seems to be range of stick-shaped objects that afford carrying in their mouths…a huge range where the bigger often seems to be much better for the dog. But there might be classes such as sticks that are for chewing (bones) and sticks for presentation (tree branches to show proudly to their owner).

Again these could be just external. Maybe they are reflected in the nervous system or maybe not. Or maybe it’s better to look at it as an effective—or observed—symbol that appears in the dynamic body-world system.


  • 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.
  • 2
    Klump, B.C., St Clair, J.J., & Rutz, C. (2021). New Caledonian crows keep ‘valuable’ hooked tools safer than basic non-hooked tools. eLife, 10. https://elifesciences.org/articles/64829

Support my work.

Sam Kenyon Written by: