Sam Spaulding

How to Make (almost) Anything


Week 2: Laser Cutter and Vinyl Cutter - a Physical Context-Free Grammar



"The infinite use of finite media distinguishes the human brain from virtually all artificial language devices we commonly come across"

- Steven Pinker



"FRICKEN' LASER BEAMS"

- Dr. Evil



THE SET UP

This week, our assignment was to use the laser cutter to make a press-fit construction kit out of cardboard. Which, as assignments go, is fairly constrained for this class, but we can make anything we want!

This summer, I read "The Language Instinct" by Steven Pinker, in which he likens our grammatical skills to a set of building blocks, from which an infinite number of sentences can be built. So when Neil announced the assignment for this week, my first thought was Language! I decided I would make a press-fit construction kit to make a physical Context-Free Grammar.

Started off trying to use Solidworks, as that's what many alumni of How To Make recommended to me. Having never used any CAD software before, it was quite a learning experience. I think the last time I did something like this, I was 8 years old and playing with KidPix. So it definitely took some time to figure out how to use SW. And by use I mean draw extremely simple 2D shapes. I'm hoping this gets easier.

After fooling around in SW for a bit, I made my first piece! A 1x1 puzzle piece with 4 small .145" cuts in each side. After the first one, my workflow process was a bit easier, and I quickly scaled up to larger sizes, experimented with diagonal slots, and made large and small triangle shapes to represent the non-terminal symbols of my grammar. You can download the final drawing, with all the shapes, connectors, and words below.

CFG_pieces.cdr



THE THEORY

In the early part of the 20th century, psychology was ruled by behaviorism. Hardline Behaviorists held that nearly all of human behavior could be explained in terms of reinforcement and conditioning, including language -- babies learn to speak by getting positive reinforcement (in this case, hearing grammatical sentences) and negative reinforcement (being scolded or corrected for ungrammatical sentences) from their parents.

They were, of course, totally wrong. As Noam Chomsky famously showed, there is no way that babies could develop their remarkable language abilities in this way. Instead, he proposed that we have an innate "universal grammar" that develops as we age and defines the way in which parts of speech fit together into grammatical sentences. The famous sentence "Colorless green ideas sleep furiously" is an example of a sentence that is obviously grammatical, yet nobody would ever say. Hence we must have some underlying set of rules that determines grammaticality based on the role a word plays in the sentence. The simplest kind of system illustrating this is a Context-Free Grammar (CFG) that breaks down a Sentence into parts, then those parts into other parts, etc. all the way down to actual words.

I modified the simple CFG from this site and started sketching out what kinds of sentences I wanted to be able to express. It's obviously a vastly constrained set, but there are still interesting relations you can construct.

Non-terminal Expansions
S -> NP VP
NP -> Pn
NP -> Pn Rel
NP -> Det Nbar
Nbar -> N
Nbar -> N Rel
Rel -> Wh VP
VP -> IV
VP -> TV NP
VP -> SV S

Terminal Expansions
Pn -> Sam
Pn -> Matt
Pn -> Rebecca
Pn -> Sarah
Det -> a
Det -> the
Det -> her
Det -> his
N -> dog
N -> cat
Wh -> who
Wh -> that
IV -> ran
IV -> fell
TV -> loved
TV -> killed
SV -> knew

So what do all these crazy symbols mean?

Non-terminals : Sentences, Noun Phrases, Verb Phrases, Nbars (simple noun phrases), and Relations. These are all parts of speech that aren't necessarily tied to a single word, and can be expanded into more complex structures. They are found on the left hand side of expansion rules.

Pre-terminals : Nouns, Wh- words, Persons, Intransitive Verbs, Transitive Verbs, and Subjunctive Verbs. These are all parts of speech that aren't necessarily tied to a single word, but can only be expanded into one word structures. They are found only on the right hand side of non-terminal expansion rules and the left hand side of terminal expansion rules

Terminals : These are the good old fashioned English words we're used to -- they have specific pre-terminal parts of speech that they map to and are found on the right hand side of terminal expansion rules.



PUTTING IT TOGETHER

I cut the cardboard at 35 speed and 30 power and cut through nicely. Here's an image of all the pieces cut out!



Here's a simple sentence expressed in cardboard. It reads "Sam Ran"



A more complicated sentence is this one: "Sam who loved his cat ran."



Let's illustrate the essential feature of the CFG: we can replace entire chunks of the tree with the same label and the sentence will still be grammatical, in this case, swapping out the Noun Phrases to make "The cat who loved Sam ran"

And by swapping the Verb Phrases, we get: "The cat who ran loved Sam"



BONUS VINYL CUTTING!!!
While I was waiting to use the laser, I vinyl cut out a sticker of the PRG logo and stuck in on my wall when I got home. The 'R' robot is missing a leg (I think I accidentally weeded it off...whoops!) but other than that, it came out really well!