Latest Posts

Learning Essentials and Accidentals

There has been a lot of commentary floating around about the recent ‘summoning a demon’ remarks of by Elon Musk on the dangers of artificial intelligence.

Mr. Musk may be an excellent entrepreneur but his philosophical arts are clearly lacking. Human intelligence has an intrinsic capacity that AI practitioners have yet to capture. This intrinsic capacity is best demonstrated by considering how humans learn their language.

Consider the following images of four fairly common objects: 1) an ordinary magnifying glass, 2) an empty water glass, 3) a water bottle with a magenta filter, and 4) a magenta USB drive.

Now imagine that you are about to travel to another country where you don’t speak the native language. You’ve made arrangements to travel on Monday with your interpreter arriving a day later. You pack your bag, making sure to include the four objects shown above (not as strange as it sounds – I routinely travel with three of them).

magnifying_glass

bobble

glass

usb_key

Due to a strike that happens a few hours after you arrive you become stranded in the country without your interpreter and with no immediate way home. Having nothing better to do you try your hand at learning the language.

You open your bag and pull out the four objects shown above. After a brief pantomime where you open and close your jaw and make sounds in English, one of the native speakers gets the notion that you want to learn some of their mother tongue. Now the fun begins.

The native points at the bottle and says “zerk”. What does this mean? There are many possibilities. He might be saying their word for “container”, or “clear”, or “plastic”, or “water”, or “magenta” or etc. You hope he means “container” and you point at the glass and say “zerk”. He then shakes his head and says “quig”. What does that mean? Maybe it means “empty”, or “glass”, or “clear”, or maybe even “container “.

You open the water bottle and pour all of the water into the glass. Your ad hoc teacher now points at the glass and says “zerk”. Inspired, you then pour some water into your hand, look at him expectantly, and then say “zerk”. Happy that you are now getting the idea, he nods his head vigorously, smiles broadly and says “zerk!” Congratulations you’ve now learned your first word in his language.

Let’s step back for a minute and discuss how you likely put together the concept of water with the sound “zerk”. It was unlikely that for the first attempt at teaching you his language, that your friend would say the word for an accidental associated with the bottle and would focus on the essentials instead. The problem is identifying which properties were essential and which were accidental and then determining which of the hopefully smaller set of essential properties was meant by “zerk”. Somehow you recognized or assumed (implicitly) that an essential property of your interaction with him would be to focus on the essential properties of the objects in question. You also assume that both of you possess a similar way of perceiving the world and culturally categorizing it. Basically, you have an abundance of clues to help you put things together. You also have a capacity to separate out essential properties from accidental ones, so that if the color of the liquid in the bottle were different, or the filter were missing, the bottle would remain a bottle conceptually (even if it looks different).

Now instead of a traveler to an antique land, you are a newborn. Someone is saying “doht” and is pointing at the USB key. What do they mean? How many repetitions and cross-references do you go through in order to figure out what it means? As a newborn, you don’t have the contextual and logical clues that helped you as they did in the foreign travel scenario. But you do have an innate capacity to apprehend the world. Whether it takes a hundred or a thousand attempts, after enough pointing back and forth between the USB key and the bottle, it suddenly hits that “doht” means magenta.

It probably takes longer to realize that a common property shared by the magnifying glass, the drinking glass and the bottle is the property of “clear”. Is this property an essential or accidental property? Most of us would answer it is essential for a magnifying glass to be clear but an accident if the bottle and the drinking glass are clear. So how can any of us learn what clear means when sometimes it falls into one category and sometimes into the other?

I don’t know. I do know that somehow we all can do it. I can’t explain it and I don’t quite know how to describe it any more than I daresay anyone else does, but I know it exists because I witness it.

Now let’s return to the comments of Mr. Musk. It is a sweepingly generous statement to say that our AI efforts have been even primitive successes. As a science, we do not understand this world-apprehending capacity that each of us is equipped with, in firm-ware, as we emerge from the womb. We know we have it but we have yet to codify it let alone translate it into something a computer can emulate. And even if we could, how do we give the machine all the contextual cues and clues that we take for granted in our interactions with our fellow humans. Sometimes I doubt we ever will succeed but for sake of argument I won’t press the point.

What I do know is that we are decades or centuries away from having this capability shared by the silicon and plastic companions that accompany us in our modern life. No Matrix, or Skynet, or Demon Seed is just around the corner, ready to burst out of the pentagram to which we attempt to confine it. No man-made machine with sinister or sublime intelligence is ready to sway our world – except for the man-made machines we manufacture through the tried–and-true method of making babies.

One last word is in order. Print out the four pictures featured here in the post, make up some novel sounds for things like “clear”, “small”, “shiny”, and the like, and see how long it takes for a friend to guess. Then give them a turn. It’s actually fun.

Essentials, Accidentals, and Programming

In the last post, I spoke a little about essentials and accidentals, but I didn’t try to define these terms.  In this post, I touch upon their traditional definitions in philosophy, and then turn to the application of these ideas to object-oriented programming.

At the heart of the philosophical concepts of essentials and accidentals is the classification or categorization of the property of an object as being needed (essential) or as being possible (accidental).  The use of the words ‘must’ and ‘could’ work nicely in this regard.  Consider the following two sentences:

A mammal must have warm blood.

A mammal could have fur.

The first captures an essential property of a mammal (namely that it regulates its internal temperature) while the second describes an accidental (it may have fur like a dog or have no fur like a dolphin).

All this sounds simple enough in principle, but there are always problems in the application.  The most common problem is that two people considering the same object won’t necessarily list the same number or type of its properties or classify them in the same way essential or accidental.  These differences reflect differences in perception, perspective, and the context and relative importance that each person places on the object.  For example, a mechanic may view a car’s essential properties as including weight, acceleration, torque, and engine displacement.  A city planner may view a car’s essential properties to include how often it is driven, its average speed, and its fuel mileage.

To illustrate this idea in more detail let’s start by examining something as simple as an ideal geometric point in a two-dimensional plane, a favorite prop in Euclidean geometry. An essential property most people would agree upon would be that an ideal point actually takes up no space, that is to say that it is truly zero-dimensional.   Others may expand the list of essential properties to include the notion that the point must have a location within the plane.  The list of accidental properties is much harder to nail down (precisely because they are not ‘musts’) but could include things like the color of the point as drawn or imagined, the distance of the point from an arbitrary origin, and the coordinate system and values within it for the position of the point.  Thus this simple object from high school geometry is not as sweet and innocent as it seems.  Scratch below the surface and it reveals a surprising degree of complexity and a tenacious resistance in being precisely defined.  The situation grows more complex as we turn our attention to composite objects – objects that are made of parts that we could characterize as objects in their own right.

The idea of assigning essential and accidental properties to an object becomes even more interesting when the object is not in the real world but is in cyberspace.  In this context, we are not simply the natural philosopher trying to characterize the objects we find or create in our world in the hope of inferring something true about all objects of that type. As programmers, we become the first cause in the microcosm of our program, and our choices in understanding how and why we choose a particular definition reveal things both profound and interesting about ourselves as thinking beings.

The creation or definition of an object, or more precisely an object class, is a way of mapping a mental conception of the mode of being of the object into computer instructions for handling data about those modes.  Defining what these terms mean precisely is a difficult endeavor but let me start by at least posing some questions to consider in order to help in fleshing these ideas out.

  • What do the philosophical terms ‘essential’ and ‘accidental’ mean when we are the creators of the form of an object (i.e., the class)?
  • Do the object properties represent an essential or an accidental property of an object?
  • Is it true that the value of member data is always an accidental?

Again concrete illustrations will be much more useful.  Consider an OOP representation of the ideal point, which is frequently presented in discussions about graphics primitives.  A typical construction might look like (in a language-agnostic form)

Essentials_Accidentals_and_Programming

Note that I am only dealing with the object’s properties and not how they are assigned or observed, so all the machinery that allows the object to interact with the outside environment (‘getters’ and ‘setters’) will be suppressed.

Now that we have defined our (computational) object let’s see if we can classify which parts of our object definition are essential and which are accidental.  A curious point is now apparent: there is no obvious place where we specify that the agreed-upon essential property of an ideal geometric point is that it is zero-dimensional.  Clearly all objects that are instantiations of the class ‘Point in a plane’ possess this essential property but they don’t know it and they can’t share it with the rest of the world.

It may seem that the only entity that knows this truth is the one who defined the object class in the first place.  But a small amount reflection on how the programmer programs delivers a more likely explanation: that the creator doesn’t really need to identify or even be aware of the essential properties of the object.  The creator simply employs the very capacity he uses to learn and interact with the world when he defines the class.  He doesn’t know how he does it any more than a bird knows how it flies; he simply does.  The programmer then depends on this capacity to know how many and which kinds of objects get instantiated to perform whatever computational task is desired.

What, then, to make of the object properties like ‘x_component’, ‘y_component’, and ‘color’?  Are these essentials or accidentals?  In some sense they are both.  From the definition of the object class, these data are essential because they are required for all objects of type ‘Point in a plane’.  But from the point-of-view of the programmer’s mental conception of what the object represents they are usually accidentals since their actual values are clearly not important.  Changing the color of a point or moving it around in the plane doesn’t stop the object from being a point.  So it is essential that the object has a memory location allocated to hold a value but it is completely accidental what value is inserted.

 

Aristotle and OOP

I like to imagine what would happen if Aristotle were to be transported from ancient Greece to modern times.  I assume that after he adjusted to the changes and settled in, he would reflect on all of the marvels of modern life. I believe he would be pleased with the state of physics, although he would probably bristle at the criticism leveled against his writings.  After all, he didn’t have the benefit of all of the technology that Newton and Einstein had.  I think he would look with fascination and delight at the state of biology and medicine – subjects that occupied much of his efforts.  But I suspect that no aspect of our current times would interest him more than computer science.

Aristotle is, without a doubt, one of the most prolific and influential thinkers of all time.  And perhaps, his crowning achievement is his work on logic and on the characterization of being.  He introduced the systematic study of logic and made it a central part of his philosophy. His imprint is found everywhere in Western thought.

All that said, Aristotle is not an easy read.  Whether that is a consequence of his thought or some facet of how is translated remains a mystery to me.  But the examples he employs in his work on logic in his Organon are hard to crack. Since I think he genuinely wanted his students to understand what he was driving at, if he were here today he would rework the Organon within the context of object-oriented programming.

Defining classes and providing them with attributes (member data and functions) would be a natural laboratory to demonstrate a large number of the philosophical concepts Aristotle birthed into Western thought.  The concepts of categories and the study of being and the ideas of essentials and accidentals have very clean distinctions in object-oriented programming.

It is my intention to explore these connections in the coming posts.  For now I will simply sign-off with the modest observation that every time someone plays a video game they are learning a little about how Aristotle thought.