egram: The Program

September 8, 2009

Egram is a program which assembles pseudo-English phrases about two Scandinavian warlords.

Egram gets its original universe of phrases from a vocabulary file.  It then chooses two phrases at random from its universe and ‘collides’ them.  When two random phrases collide, new phrases may be formed and added to egram’s active set.  In addition,  a collision of phrases also chooses phrases at random from the active set and removes them.  A removed phrase is inactive.

This kind of discrete dynamical system is Turing-gas-like; see Kauffman’s Origins of Order.

Egram differs from what Kauffman describes in that it may form or remove more than one phrase at a time.  Egram uses a parameter, nominalActiveSize, to regulate the size of the active set.   Since new (or reactivated) phrases can always be added to the active set, egram randomly removes phrases until it achieves the nominal active set size.


egram’s Phrase Properties

September 8, 2009


Egram has rudimentary models of English phrase properties and grammar.  (No one should mistake these for anything but toy-program models.  That is not the point of egram.)
Here are egram’s phrase properties.  Each phrase may one or more of:
CompSent: A compound sentence, made from two sentences with a conjunction in the middle.
Sent:  A sentence, made from a subject and a predicate.
Pred:  A predicate; a verb phrase.
Subj:  A subject; a noun phrase.
AdjPhr:  An adjective phrase, made from an adjective and a noun phrase.
ConjPhr: A conjunctive phrase, made from a conjunction and a sentence.
DetrmPhr:   A determiner phrase, made from a determiner and a noun phrase.
NegPhr: A negative phrase, made from a negator and a verb phrase. 
NounPhr: A phrase made from a noun. 
ObjPhr:  A phrase which can be the object of a transitive verb.
PrepPhr: A phrase made from a preposition and a noun phrase. 
VerbPhr: A phrase made from a verb. 
BareNoun:  A vocabulary item, a noun.  E.g.  ‘raven’.
MassNoun: A vocabulary item, a kind of noun.  E.g.  ‘blood’.
PropNoun:  A vocabulary item, a kind of noun.  E.g.  ‘Torkel’.
Adj:  A vocabulary item, an adjective.  E.g. ‘white’.
Verb:  A vocabulary item, a verb.  E.g.  ‘attack’.
Adv:  A vocabulary item, an adverb.  E.g. ‘inexorably’.
Detrm:  A vocabulary item, a determiner.  E.g  ‘the’.  
Plur:  A phrase property: plural. 
Prep:  A vocabulary item, a preposition.  E.g.  ‘of’.
Sing:  A phrase property: singular.
Conj:  A vocabulary item, a conjunction.  E.g.  ‘but’.  
Trans:  A phrase property: transitive.
Neg:  A vocabulary item, a negator.  E.g.  ‘does not’.

Dynamical Systems

September 5, 2009


Dynamical systems are mathematical models of  real-world phenomena, such as weather or the oceans, which change with time.

The difference map of a dynamical system specifies how one state of the model changes into the next state. 

If the system changes continuously, its map may be defined with differential equations.  If the system changes from one state to another in steps, it is called a discrete dynamical system, and its map  may be described with difference equations.  This discussion will concentrate exclusively on discrete systems.

So a map is a  function f which takes the current state of the system x to its next state, x’.  The domain of the map is thus all possible system states.  This set of all possible system states is called phase space.

Welcome, avid reader

September 5, 2009


I’m studying discrete dynamical systems.  I’ve written one called egram.

Most studies of this sort start with a known difference map and comprise a mathematical investigation of the map.  However, egram’s difference equation, or map, is obscure.

 I’m trying to learn about the map by observing egram’s behavior.  I’m going to write about the experience here.