This is for publishing a clojure project to clojars.orgs when you don’t want to fiddle with PGP (which is needed to do the ‘lein deploy clojars’ command).

Assuming you have a project called ‘brickshirt’ and you’re at a command line at the root of the project:

  1. lein do pom, jar
  2. scp pom.xml target/brickshirt.jar clojars@clojars.org:

The only other assumption is that you’ve updated your clojars profile with an ssh key (you can use the same key for both clojars and github).

[Information courtesy of discussion found here)

Affordances are a pretty neat idea in the ecological psychology literature – they are used to explain how an actor’s behavior is modified by its environment. For example, a bear might find a good night’s sleep in a cave that a squirrel would be restless in. That same cave might be perfect for the squirrel to find food in, while the bear might have to venture outside to find a meal.

Using the work of [Chemero 2003], affordances can be said to be predicated on two things: environmental features and actor abilities.

Environmental features are to states of affairs what properties are to objects – both entail some kind of attribution. The difference is that while a property is tied to a particular thing, a feature is just attributed to a whole state of affairs (or environment) at once. For example, “it’s bright outside” attributes brightness to nothing in particular, just the whole outdoor scene.

Actor abilities are held by Chemero to be ‘functional properties’, as opposed to dispositions. The difference here is that functional properties can malfunction even in ideal circumstances (you can trip over yourself on a perfectly good sidewalk) while dispositions are guaranteed to manifest when properly triggered.

I prefer a different take on dispositions that relaxes the necessity of manifestation given a proper trigger, but Chemero’s heart is in the right place – actor abilities can’t be blatantly deterministic. If manifestation was readily deducible, animals would be understood more as robots than as free agents. And heck, we might all be deterministic robots running off highly complex algorithms at the end of the day. But until that time comes, it’s better to expect a bit of manifestation failure in our actors’ abilities.

Suppose that Stan, sitting in the downstairs kitchen of his house, wants to go upstairs. How can we represent and explain that the staircase is a solution to his problem?

Following Chemero, we have a staircase in the kitchen with six-inch risers. We also have Stan, who is capable of climbing stairs of this standard height. Our theory of stairclimbing only takes riser-height into consideration, so Stan can theoretically get upstairs.

In terms of representation, the first floor, staircase, second floor, and their spatial connections constitute a state of affairs. This state of affairs has the feature of a path between the first and second floors via the staircase. Stan has the ability to climb stairs when the riser height is less than one foot. All together, we can say that the house affords Stan the ability to go upstairs.

In casual symbols, we have a path from the first to second floor through a staircase with 6″ risers:

(instance-of :first-floor Floor)
(instance-of :second-floor Floor)
(instance-of :staircase Staircase)
(feature (path [:first-floor :staircase :second-floor]))
(riser-height :staircase (inches 6))

Moreover, we have a theory that an actor can move between two adjacent path elements if both elements afford movement. The adjacency of path elements can be inferred from the formal structure of the path vector indicated with square brackets.

(=> (and (adjacent-path-elements ?x ?y)
         (located-in ?a ?x)
         (affords ?x Movement ?a)
         (affords ?y Movement ?a))
   (ability ?a (move-to ?y)))

From this it’s straightforward to show that movement along a path of properly-afforded elements is both transitive and symmetric.

We have two supplementary theories about movement: floors always afford movement, and staircases afford movement if they can be climbed.

(=> (instanceOf ?x Floor)
    (affords ?x Movement ?a))
(=> (and (instanceOf ?x Staircase) (ability ?a (climb ?x)))
    (affords ?x Movement ?a))

Apart from the house, we have Stan on the first floor and his ability to climb normal stairs:

(located-in :stan :first-floor)
(has-property :stan :a)
(=> (and (has-property ?x :a)
         (instanceOf ?s Staircase)
         (riser-height ?s ?h)
         (< ?h (inches 12)))
    (ability ?x (climb ?s)))

So we can deduce that Stan can climb the staircase:

(ability :stan (climb :staircase))

And thus that Stan can move from the first to the second floor:

(ability :stan (move-to :second-floor))

Chemero’s theory has a nice structure to it, as it forces us to think about our situation in terms of abilities and actions. The feature thing is also nice, as it relieves us from predicating the path of a particular gerrymandered object.

However, this representation needs some work. The disposition stuff needs to be cleaned up, for one. It’s also not clear that the logic used above is appropriate – in many cases, logical descriptions can accidently cover up important ontological commitments or confusions. For example, the move-to clause in

(ability :stan (move-to :second-floor))

isn’t truth-functional, which means that the whole sentence isn’t from the normal predicate calculus.  So there’s work for next time.

Imagine a big two-story house with 10 bedrooms, 8.5 bathrooms, and various specialized rooms (such as libraries, map rooms, dining rooms, and dens).  Oddly, there’s only one staircase in the whole house, connecting the den on the first floor to the library on the second.

The problem is to identify the rooms on an architectural diagram that let you go up to the second floor.  For many people, it’s sufficient to highlight the den, but consider somebody confined to a wheelchair: without a stairclimbing mechanism, the den fails to afford the ability to get to the second floor.

Pushing the example, let’s assume that our actor is indeed confined to a wheelchair, and there is an elevator in the first-floor kitchen.  How specific can you get when it comes to highlighting the things that afford the ability for our actor to go upstairs?  Highlighting the whole kitchen is a bit too rough, but the elevator itself is insufficient – there’s lots of wiring, a circuit breaker in the basement, a backup generator outside, power lines running to a power station, and eventually the water flowing down the Niagra River.

Finally, let’s simplify things with a futuristic elevator that requires no wiring and generates its own power.  Clearly, this elevator plays a part in affording our actor the ability to get to the second floor.  However, the design of the kitchen is also crucial: if the pathways to the elevator were too narrow, it would be impossible to navigate a wheelchair to the elevator in the first place.  Thus, there are different parts of the kitchen that fit together in a way that enables our actor.

Affordances are interesting phenomena when describing regions, because of their actor-dependence, their causal roots, and their basis in heterogeneous regional parts.  These features distinguish affordances from their relatively simpler kin, qualities.  Recent work has shown how to draw a line on a map that justifiably delimits a region characterized by a quality such as forested or populated.  It would be helpful to extend this ability to delimit regions that can be characterized as habitable, navigable, or defensible.

I hypothesize that recent work on construing dispositions as causal predications made true by processes is sufficient to establish a theory of affordances that meshes well with current work in ecological psychology.  Moreover, I argue that this theory would be suitable for extending granular theories of quality-based region delineation to encompass regions characterized by affordances.

In the late 1970′s, the notion of an affordance was coined by J.J. Gibson to describe the manner in which an individual’s environment plays a part in explaining the possible actions an individual can take. For example, a dog can drink water in a forest cut by a stream in a manner that would be impossible for that dog in a desert. Likewise, a tall tree provides an opportunity for a man to see beyond a nearby hill, an opportunity that fades when the tree is cut down.

An affordance, according to [Chemero 2000], is an “immediate opportunity for behavior” by an organism. To put it another way, affordances are relationships between agents and their environments that have some causal impact on how the agent acts. Moreover, these affordances are part of the way that agents look at the world: when you see a flight of stairs going up, you see a way to climb to a higher floor. For ecological psychologists like Chemero and Gibson, perception is not restricted to sights, sounds, tastes, touches, and smells. Beyond sense perception, agents see the things around them as instruments to be manipulated.

To make things sound more odd to the unacquainted, affordances are neither objective nor subjective relationships. Because an affordance is a relationship between an agent and something else, and the removal of the agent removes the relationship altogether, an affordance is not an objective thing that can be studied in isolation of its subjects. If you take the animals out of a forest, the stream running through it no longer affords the possibility of taking a drink: there can’t be any drinks if there are no drinkers. However, the existence of an affordance does not soley reside in the mind of an agent – it’s not subjective in the sense of a thought or emotion. Regardless of whether you believe that a dog can drink water without a source of water nearby, the dog will still be thirsty.

The odd nature of affordances can be better understood by considering the claim in [Chemero 2001] that affordance descriptions are not predicates – no property is said to inhere in any object in the environment. When we describe a stream as affording the opportunity to take a drink, we can’t merely stop with a formal representation that looks like

(affords-taking-a-drink   the-stream   that-dog)

Part of the reason is that it’s not just the stream itself as an object that affords drinking for the dog. The edge of the stream, for example, can’t be a five-foot cliff that would frustrate the dog’s efforts. The stream can’t be crawling with crocodiles, nor can it be frozen over. There are lots of features in the environment that together determine whether or not the dog can quench its thirst – the stream is only a convenient target for predication, not an accurate one.

Unsurprisingly, placement matters when it comes to possible activities. Some actions possible in a New Jersey motel are impossible on the surface of the moon. Thus, a principled way of describing affordances is needed that does representational justice to place and environment while avoiding the bog of fanciful what-ifs (heights, crocodiles, and ice).

Following Bittner 2011, a spatial region can’t simply be recognized to have a quality like forested or polluted, where the intended meaning is distributed across the region.  That is, we expect a forested acre of land to be covered by trees; the discovery of only two small trees on that acre would smack of deceit.  So by a distributed quality of a spatial region, we understand that quality to be found throughout most, if not all of the region’s parts.

The problem is, the parts of a region aren’t exactly enumerable – you can always specify finer and finer levels of precision by which to identify parts.  It turns out that the precision you end up using goes a long way in determining whether a (distributed) quality is actually present.  So we define the presence of a quality in a region with the notion of granularity-sensitive homogeneity: Given a granularity W, a quality Q, and a breakdown of a region R into parts, then R is homogeneous with respect to Q when the area of R is roughly the same size (based on W) as the total area of R‘s sub-regions that have Q.

For example, let’s imagine a big tract of mostly-forested land.  We break down that tract into parts (like cells in a raster), and decide for each cell whether we’d consider it forested or not (say, using remote sensing).  Turns out that we have a few small ponds on our land that each take up one of our parts/cells.  To determine whether we can attribute the quality of being forested to this region, we compare its area to the area of parts/cells that are determined to be forested.  The answer depends on the level of precision we use, which is tossed into a simple formula to provide our answer.

Distributed qualities like forested are interesting to contrast with a lot of the commonplace holistic qualities we usually run into, like being electronic, sleepy, or profitable.  Distributed qualities depend quite a bit on the qualities of their parts in a way that’s irrelevant to holistic qualities.  However, some qualities of spatial regions are neither distributed nor holistic: the quality of being a habitat for badgers depends on processes that relate some parts of a region in a variety of ways.

And two months later, I’ve got both a new daughter and a new project.  Huzzah!

This new project builds Tom Bittner‘s work on vagueness and granularity in geographic regions.  A recent paper of his presents a formal system for classifying geographic regions based on their qualities.

It turns out that things get tricky when you want to apply a quality (like forested) to something like a region, because we don’t expect every part of that region to harbor a tree.  A bit more practically, we don’t expect a reasonable raster of a forested region to necessarily have trees in every cell – a raster where 99 out of 100 cells are forested is probably good enough.  What Tom does is give this intuition a rigorous formal treatment.

So I started a new project on Github called kraken where I’ll write up an implementation of his system in Clojure.  For the geoinformatics portion of this code, I’m taking a look at the GeoScript libraries; it looks like someone’s even started up a Clojure GeoScript library.

The initial phase of kraken is aimed to produce a faithful implementation of Tom’s system.  After this, I want to open up the classification of geographic regions to affordances.  I’m going to take a long look at what it means to associate an affordance (such as a habitat) to a region, which means I’ll take the time to write about how affordances tie into theories of dispositions, occurrences, and qualities.  I have a feeling that I’ll end up writing kraken in more of a logic-programming way, possibly with the Jena rules via seabass.  Part of the question there is whether RDF-Sparql will make sense for doing the semantic work needed.  Can’t wait to find out.

Looks like Egon updated his rrdf library (an RDF library for R) to 1.2, which now includes remote sparql queries and constructs. Pretty neat!  I’ve been meaning to get into R, and keep getting pulled away by other shiny things.  For example, my employer got me into a Cloudera class this week to get all MapReducey.  Lots of fun, but I really have to put my head down and learn that damned language, even with its lack of parentheses.

Speaking of MapReduce, I wonder if there’s a good SPARQL/RDF library out there to support MapReduce jobs.  I’d think you’d want code that was optimized for queries against graphs that take up either 64MB or 128MB (the two most common block sizes).  I’m guessing that a fact in an N-TRIPLES file takes 1/10KB, so the graphs would have either 640,000 or a bit over 1.2 million facts in them… that’s a pretty healthy volume of information, but we’re not talking DBpedia-sized here.

Finally, my search for mathematical podcasts is finally turning up fruit – looks like Sam Hansen at ACME Science has a slew of podcasts right up this alley.  Hell, his most recent podcast is an interview with John Cook (of The Endeavor fame).  In fact, he’s got a new one in the works that looks to be focused on stories in the world of mathematicians – if you’re curious, check out http://bit.ly/relprime.

More than finally, this is my first post on a linux box.  I took the plunge dipped my toes in the Linux waters by installing an Ubuntu partition on my laptop with Wubi.  There’s been a few hiccups so far with learning about file permissions and tar files, but I managed to run the seabass tests successfully, so I’m in a good place.

I’ve never appreciated the fact that lots of great stuff is on youtube.  Case in point: live video of the Dead Milkmen.

I came across this article/handout today, and I thought it was pretty neat.  The idea is that dispositions aren’t simply triggered by the occurrence of an event:

Bad Solubility:

  • Trigger: Dunking in water
  • Manifestation: Dissolving
  • Causal Pattern: If T(x) then M(x), all things being equal.

Rather, dispositions are properties that sorta encourage the manifestation of a certain kind of event with a certain level of oomph.  So we have something like this:

Good Solubility:

  • Direction: Dunking in water –> Dissolving
  • Magnitude: 32

I don’t have access to the full article, so I’m missing a few important details (like what the magnitude is measuring).  Still, the idea interesting: dispositions are vectors in a vector space of qualities.  A quality (like dissolving) manifests if a certain threshold is reached (like 90).

Since we have a vector space, we can add the dispositions present in a state of affairs to determine whether a manifestation should be expected.  Some dispositions may reduce the chance of a manifestation (such as the level of saturation in dunking water), while others would combine to increase the likelihood (perhaps the temperature of the water).

With details locked away in a journal beyond my reach, there’s little left to do but wonder freely through the notion of a vector space of dispositions.

We could represent qualities like solubility and fragility in a way that created a nice network of causal relationships:
:Solubility a :Quality; :dispositionTo :BeDissolved; :dispositionVal 32 .
:Fragility a :Quality; :dispositionTo :BeShattered; :dispositionVal 46 .
:BeShattered a :Quality; :dispositionTo :HoldWater; :dispositionVal -600 .

Qualities are convenient here, because they’re almost always understood to be unary atomic predications.

States of affairs are a bit more complex, as a kind of state of affairs involves multiple n-ary predications. For example, consider what it is to be shattered by a soluble object.  In the grand scheme of things, that kind of state of affair can be construed as a single unary predication.

Despite being more complex, types of states of affairs are very interesting, and seem to be conducive to this vector space view of dispositions.

Let’s say that we’re looking at hockey game data (again), and tap the following into our ontology:

  • Shot by X –[+n]–> Goal by X
  • Power Play for X –[+m]–> Goal by X
  • Penalty against X –[-m]–> Goal by X

Shots and power plays increase the likelihood of goals, while penalties lead to a decrease.  If we have a shot during a power play, it seems that we can add the individual dispositions and get

  • Shot by X during Power Play for X –[+n+m]–> Goal by X

And likewise a shot during a penalty kill should be less likely to result in a goal that an even-strength shot.

The authors of the article/handout bring up the fact that lots of issues remain to be ironed out:

  • can dispositions always be added?
  • how should the magnitudes of disposition vectors be interpreted?

There seems to be plenty of interesting ideas here to play with for a bit, and it does strike me as somewhat similar to both Judea Pearl’s theory of causation and the structural equation modeling approach.

My god – there are tons of Dead Milkmen songs on youTube.

In a recent issue of the Monist, E.J. Lowe argues that lots of us have been thinking about dispositions in the wrong way.  It’s quite normal to construe fragility as a property with

  • stimulus: a whack
  • manifestation: a shatter

So to look for fragility, I thought I’d look for shatters, and then examine those to see which ones were caused by a whack.  Lots of problems arise from this construal, because it feels natural to define fragility as

  • the quality such that if something is whacked with a relatively light force, then it shatters

or

  • the quantity such that if something is whacked with a force greater than or equal to N, it shatters

That if-then form of the definition is the root of the problem, as it leaves lots of holes for surprises to wiggle in.  For example, was a vase not fragile simply because it was never whacked (instead it was melted down)?  If a wizard intervenes when a vase is whacked to prevent it from shattering, is the vase still fragile?  These kinds of situations are troublesome, to be sure, since they get right down to how we can manage to define a disposition in the first place.

Lowe suggests we throw the whole if-then notion out the window.  He argues that dispositions surely manifest, but they’re never tied to a stimulus or trigger.  Rather, what we think of as a stimulus is really part of what we mean by the manifestation.

For example, a fragile vase can shatter, but something can’t shatter without being whacked (technically, without the application of force).  So, shattering entails whacking and we define fragility as

  • the quality such that something can be shattered with a light force

or

  • the quantity such that something can be shattered with a force greater to or equal to N

It’s a bit weird at first glance, in the sense of feeling that a trick is being pulled.  We’re still talking about whacking and shattering vases, right?  The important difference is what we’re looking for.  By the first account (referred to by philosophers as the Conditional Analysis), we’re looking for events (shatters) and truthmakers for if-then statements.  By Lowe’s account, we’re looking for a complex event (a shatter).

It turns out that my definition of retaliation is closer to Lowe’s account than the first account.  Retaliations were defined as enforcer actions (hits and certain kinds of penalties) that occurred within five minutes of a violent action (certain other kinds of penalties).  The definition itself sucks in obvious ways, but the important part here is the form – I was looking for events that relate to other events in a certain way.  That boils down to looking for complex events, or at least seems less an appeal to a stimulus/if-then situation.

Ever since I started learning Clojure, it was clear that I would be using Emacs.   I was already most comfortable using a command line and text editor, I’d already set macros that mimicked some of the Emacs keystrokes (like CTRL-f),  and the editor’s written in Lisp.  It was inevitable.

Nevertheless, I resisted.  I had never been comfortable with switching buffers, and was very used to the traditional Windows keystrokes for saving, copying, cutting, and pasting.  And up to this afternoon, I had successfully resisted…until now.

What had done it?  A thousand small cuts, to be sure.  But two big ones:

  • I got access to a Linux server, but only had Putty handy.  This meant no graphical desktop was available – I only had the command line.
  • Github exaggerated the tabs of my source code files to a degree that I was starting to convert tabs to spaces for each file in Notepad++.  Once I noticed how beautiful Emacs indenting was (both when writing and when pushed onto Github), it was very hard to turn back.

So I downloaded Clojure Box for my home laptop, figured out enough of the new keystrokes/macros to do something useful, and ended my use of Notepad++ as an IDE.  It’s a great application for what it is, but I’m really liking Emacs.  On top of that, it looks like somebody’s written an N3/Turtle mode for writing RDF in Emacs – I’ll have to try that out over the weekend.

Follow

Get every new post delivered to your Inbox.

Join 25 other followers