Skip to content

Parameters

hjmscott edited this page May 18, 2017 · 2 revisions

Symbols
Toggles the mean center markers to show the IPA symbols or spots. The symbols don’t save in the eps files, so if you save it will automatically use the spots instead.

protos
specify the prototypes in the base convention. input: string of prototype names separated by commas and spaces e.g.

I, I:, retracted_a, u

having a lot of prototypes will take longer to run, and the lexicon is generated for every simulation. If you want to preview the prototypes you have entered, use the “draw margins” command.

The prototypes are hard-coded in Convention.py with formant values and names (full list in Convention description). The formant values are in hertz units, but these are converted to ERB units before the prototypes are initialized. Entering a prototype name which is not in the Convention module will result in an error and prompt for a recognized prototype.

margin
The perception defines the radius of the circle centered on an incoming signal and within which an agent will recognize that the incoming vowel matches a phone in its repertoire. The agent ‘de-assimilates’ the vowel before matching it. If no match is found within perception margin, the agent will imitate the deassimilated vowel and store the imitation as a phone.

prox
set a supplement (in ERB) for the proximity margin. input: float (can be negative). The final margin will be vowel.weight + prox for each percept. If the result is a negative number, it will default to 0 ERB.

prox mainly affects the “proximity margin” or, “trigger zone.” At every interaction, percepts within prox distance of each other (“neighbors”) will enter into a conflict which can be resolved by shifting or absorption.

The prox is an add-on which expands or contracts the radius of the proximity trigger range of vowels at the micro level. The total range is the vowel’s weight + prox addon e.g. with the defaults and a five-vowel, evenly distributed rep the average would be .2 + 1 = 1.2 Which means that any other vowel within 1.2 ERB would trigger a conflict.

Higher prox can contribute to a bias toward merging if the vowels aren’t able to move fast enough to avoid absorption.

Coarticulation (assimilation/deassimilation)
These are the defaults, which can be changed in the Phonology.py file. The amounts are multiplied using a function that goes to 0 toward the articulation boundaries.

phone (imitation / phone_radius)
Input: float The ‘phone’ command sets the phone_radius variable, which is the radius of the circle within which an agent creates an imitation of a signal it couldn’t match. The circle’s center is the ‘corrected’ (de-assimilated) version of the signal.

The phone_radius variable affects the rate of change (movement) of the prototypes.

*There’s a method in the Phonology.py class that lets you test production without running a full simulation. You can call it by running Phonology.py (same as you would normally run Game_fns) and entering ‘test_perception()’ in the IDLE shell. The lonely agent test subject can be adjusted in make_child() in the same file.

noise (vowel production / phone_radius_noise)
Input: float The ‘noise’ command sets the phone_radius_noise variable, which is the radius around an agent’s percept (after being coarticulated/assimilated), within which the agent utters a vowel when saying a word.

Changing this parameter directly affects the vowels (the temp objects which are simultaneously spoken/heard) and only indirectly affects the phones. It also has some effect on the movement of the prototypes.

*The Phonology module has a method test_production() for testing production without running a real simulation. It works the same way as test_perception i.e. run Phonology.py, enter ‘test_production()’ in the shell, adjust the articulation methods/agent as desired, repeat as needed.

report
prints a table with current stats from the game, including

  1. the active prototypes and their displacement from the starting positions,
  2. the words in the lexicon and the number of agents using each prototype to pronounce that word
  3. the number of agents who have multiple variants of convention prototypes in their repertoires (i.e. “near splits”) The vowels listed are labeled according to the master set in the Convention class. The agents are not aware of these labels. No conclusions are drawn from this data.

demo
interactively set up a new game. The program will give a description of each parameter followed by a prompt for input, then run the game and pause for another command after the cycles have completed.

language
use one of the preset lists of vowels defined in Game_fns.

The program will list the names of the language presets available. To use one, enter the name as it appears in the list. A window will pop up showing a preview of the base convention for the preset with circles indicating the initial effective proximity margin around each class.

Click in the window to close it. If you are satisfied with it and the rest of the parameters, enter “run” to start a game. Otherwise you can make any changes (including overriding the language preset to be used) before starting.

To view the base convention with the perception / proximity margins in the vowel space, use the “draw margins” command.

The presets are based on research from wikipedia, the U of C Phonetic Inventory and a handy website “A Survey of some Vowel Systems.” They have not (yet) been corroborated by any expert and quite possibly contain some inaccuracies.

adding vowel inventory presets to the program
In Game_fns.py, go to the set_languages method (immediately following the init method). Add a language using the following template: languages[“language name”] = “prototype_1, prototype_2 …”

The language name must be lowercase alphanum characters and can include spaces. If you want to change this so that you can use other symbols, let me know and I’ll change the RE matcher to include those characters.

No language name can be used twice; however, languages can be duplicates (i.e. use the same prototypes as another language). If the user capitalizes the language at input, the program will correct it to lowercase. The prototypes must be in the master set of Convention.py or it will fail.

If the prototypes in the Convention class are changed, the languages have to be updated to match.

draw margins
Use the command “draw margins.” A window will pop up showing the prototypes. It will also show average proximity margins and the perceptual margins as the radii of circles centered on the prototypes.

Click in the window to close it. You can then change the prox add-on, perceptual margin, or selection of prototypes as usual, and then call “draw margins” again to see what the average proximity for each prototype will look like.

Convention prototypes do not have weights, there is no direct application of perceptual margin on convention prototypes, and convention prototypes never “move,” “shift,” or “merge” of their own accord. The convention prototypes are in fact averages of the word-vowels of the virtual speech community. With realistic parameters, it is unlikely that any agent will have an idiolect with vowels in the exact positions as the convention prototypes or with margins of the same size.

This function pretty much draws the “ideal speaker”, who almost certainly does not exist.

sampling (phones vs vowels)
Input: string (‘phones’ or ‘vowels’) In the program, ‘sampling’ refers to the collection of the agents’ pronunciations of words in the lexicon, which are represented by colored dots in the chart. Sampling is shown at every step if ‘show’ is on, and at the end if ‘show’ is off. Sampling never includes babies’ vowels/phones--unless you’re in ‘micro’ mode, where it will show The Chosen One’s phones even when they are a baby. The sampling options are ‘phones’ and ‘vowels’. These have to be consistent (meaning, whichever one is used for sampling will also be used to get prototypes for the convention).

The command to switch between these is “sampling” and the options are limited (for now) to “phones” and “vowels” e.g.

sampling = vowels Will set the sampling method to retrieve the acoustic objects and their averages (i.e. both the spots and dots in the reports) rather than the internal representations.

Phones are the internal (static) representations of word nuclei in the agents’ repertoires. These are the objects which can go into conflict, have weight, and are shown in ‘micro’ mode.

Vowels are the (temporary) utterances of the word. The vowels option is much, much more expensive because the agents actually produce a vowel for every word in the lexicon, whereas the phone option just collects the weighted repertoire objects.

The sampling also determines how the prototype positions (the lined spots) are calculated, such that the spots are mean centers of the sampling objects. As a demonstration, here’s the difference in output for ‘phones’ vs ‘vowels’ on the same simulation. (You can change sampling methods mid-simulation, since they don’t affect agent behavior.)

extend
continue running the current game for another set of cycles. Does not reset any of the parameters or replace the agents.

run
Starts a new game with current settings. No arguments needed.

New games begin with one group of agents with a starting age equivalent to half of an agent lifespan, and with repertoires of vowels which are close imitations to the base convention prototypes. These are generated using the guess_by_margin method, except that the margin is set to .1 x perception ERB.

From a higher-level perspective, this is meant to be like a group of people who all speak the same dialect suddenly getting dumped into an isolated environment (say, an island) and immediately reproducing and growing a population there.

At every ‘time step,’ all agents advance in age by one. If the population size is less than the max population size limit, a new group of agents will be ‘born’ i.e. appended to the population with an age of zero. The game will pause after a number of cycles and show the results in a graphic output window, after which the menu will appear and accept commands again.

save
Saves 3 files: 1 .txt and 2 .eps The ‘save’ command writes a condensed copy of the output to a txt file. The file will include the text step reports (assuming ‘show’ is turned on), the final text report showing the displacement values by word, and the lexicon report (if ‘report’ has been called prior to saving) and the ‘details’ report showing the agents’ repertoires (if that report has been called up already).

The file will not include the menu options or track the user’s activity (i.e. changes they made via the menu interface). It will print the parameters at the beginning, but those are the parameters which are used in the game and not the defaults which are printed in the shell on execution. If the program “crashes” for some reason, the save command won’t be callable (you can still save the shell session through IDLE in this case).

The timestamp will be used to name the file and will appear in the same directory as the python files. You can rename it to whatever you want after.

This also saves the displacement window (the one with the black spots in the IPA positions) and the final sampling (the last scan of the population). Both files will be saved as eps with a timestamp as the file name. They will both appear in the same folder as the python files. Linux is able to open eps files automatically.

cycles
Set the number of agent groups tracked over lifespan. Input: int >= 1 Default: 1; set in Game_fns.init() This is a pretty safe parameter; the only danger is that if you set the cycles really high then it will take a long time to run and you may have to abort (ctrl+c in IDLE).

A new game always starts with a population consisting of one group of agents at the midpoint of their lifespan. With every step, a new group of age zero agents is appended to the population until it reaches the max size limit, and the age of every live agent is increased by one. When a group of agents reaches the lifespan limit, they are removed from the population. When the first group of age zero agents (i.e. the first batch of babies born on the island) dies, the first cycle is complete. After the first cycle, each subsequent time step is counted as the completion of another cycle.

With a max population size of 100, a lifespan limit of 50, and cycles set to 5, the game starts with group 0: 2 agents at age 25. In the first step, the population has 2 agents of age 25 and adds group 1: 2 agents of age 0. After 25 steps, group 0 is removed as they reach age 50 and the population consists of 2 agents at age 0, 2 at age 1, 2 at age 3, and so on up to 2 at age 49. This completes one cycle. The game will run for 4 more steps and then stop at cycle 5, at which point the population will still have 50 2-agent groups ranging from ages 0 ~ 49.

The first cycle always takes the longest since it takes a number of time steps equal to the agent lifespan, but every subsequent cycle only takes one step. For high-cost parameters (e.g. huge populations or large conventions), try starting the game with 1 cycle at the beginning. After the first cycle finishes, you can alter the number of cycles and extend the game with ‘extend’ to continue running the simulation from that point.

size
set the population peak limit. input: int >= lifespan + 1

Populations in the range of [30, 40] will yield different behavior from the vowels. Lexical “class” splits happen frequently in small groups, but very rarely in large ones. If you make the population too large, it will take a long time to run. I recommend turning off “show” if this is set higher than 100 or so.

At every step, the population will either grow (if the number of live agents is less than the size limit) or stay the same if the population has reached the size limit. If the oldest group has reached the lifespan limit, it will be removed at the end of the step and a new group will be added at the beginning of the next.

details
Shows the vocabularies of all live agents.

lifespan
set the age at which agents are removed from population. input: int

If agents don’t live long enough, the population may not reach consensus on pronunciations. If agents live too long, changes come about more slowly and the simulation takes longer to run. The length of the first cycle is determined by the lifespan parameter.

Agents age by ‘time steps’ starting at age 0 and ending at the limit set by this lifespan variable. The exception is the ‘ancestor group,’ who start at the midpoint of their lifespan. Agents advance in age in the increment() method, after interacting with their community. Because the charon() function immediately follows increment(), the agents are removed as soon as they reach the lifespan limit.

The age of maturity is (.10 * lifespan) + 1 and represents the point at which agents transition from being children to adults and from interactive listeners to speakers only. This is also where agents ‘purge’ their extraneous vowels so that adults have only vowels with a weight strictly greater than 0.

show
shows live agents’ repertoires as layered points in the vowel space, followed by the mean centers for each prototype at the end of each step. input: Bool True/False or Int 0/1

If ‘show’ is off, the runtime is decreased, but you aren’t able to see live changes. You’ll still see the final results, and you can get the final sampling with the “draw last” command when it finishes. If ‘show’ is on, the game takes longer.

Combining this command with the “color” option will display the vowels with color-coding.

Blevins, Juliette (2004). _Evolutionary Phonology. _

Ohala, J. J. (1981). "The listener as a source of sound change."

Rosner, B. S. and J. B. Pickering (1994). Vowel Perception and Production.

Clone this wiki locally