The full version of the cultural program is written in Pascal and was designed
to run on the Mac under Symantec's THINK Pascal. It could be ported to other
types of computers by deleting the graphics commands that are unique to Macs.
See also the documentation common to all versions of the program
The source code for the full version of cultural model is available.
See also this disclaimer.
The full version can handle maps as large as 100x100. It does so by enlarging
the effective memory using pointers. This requires large heap (e.g., 2 megs).
This is set in the Run Options. The stack size should be set to 200k in the
Run Options. (For the method of memory management used, see THINK Pascal Users
Manual, section on Porting to THINK Pascal, Data Representation. This is at p.
484 of 1991 edition.)
Additional options available in the full program are implemented by setting
the control parametes at the start of the program.
- To generate a unique run number for each run, set test=false. To use this
option, there has to be run_number file in the same folder as the program.
Initially, this file should contain a number, such as 1, which will be used for
the first run number, and then incremented each time the program is run with
test=false.
- The map can be changed from flat to wrap around by setting flat_map =
false.
- Mutation can be included by setting mutuation_rate_perpop_percycle to a
value greater than zero. For example, If mutuation_rate_perpop_percycle = 1
there is one mutation per cycle (i.e., equal numbers of interactions with
neighbors and mutations). But, interactions with neighbors need not have any
effect ( if there is a match and neighbor also matchs on the bit selected for
convergence, or if there is not a match a diverge=false). The actual number of
mutations is cacluated from a poisson distribution (thus a mean of 1 might have
0, 1, 2 or even occassionaly more mutations in a cycle).
- Some fraction of the influence can be from a common broadcast by setting a
positive value of broadcast_rate_per_10000_cycles.
- Up to five values of the following parameters are allowed in a single
run:
- map size (Xmax; also used for Ymax)
- neighbors (Interaction types)
- string length (bitmax)
- alleles (allelemax)
The number of different values in the production run is set in N_Xmax, etc.
The largest value is 5, meaning that up to five values of this parameter can be
used in a single run. If it is 1, only one value is used.
The largest value a variable can take in the current run is given in
Xmax_tops, etc. The first value used is Xmax1, etc.
Memory limits depend on the largest region and the largest string length. For
example, a 30x30 region has max of 11 bits.
- If graphics are used, the drawing window needs to be saved with a name (eg
using the time of the run from the text window), and opened or copied. It can
be copied to a Word document. The text window can be used to preserve a record
of how the drawing window was generated.
- If WritePeriodicStats=true then data is written at each period to text file
(where it can be saved and opened from Excel for analysis). N_zero_distance
("#0 dis"in output) is number boundaries with zero distance (which show up
white in grid).
- Multiple uses of the same map are possible (i.e., initial conditions on the
culture), with map>1. This is done by saving MAP seeds to start the maps,
and POP seeds to start the interactions after the initial cultural map is
drawn. Thus the same map is used POP times. The nth POP with each map uses the
same seed to start the interactions. (Note that this method wont not allow
duplication of random number seeds of earlier runs unless map=1 and pop=1
because the starts for all the pops are drawn before the second pop begins).
There are more details of map repetition.
- There is stack_map option. If false, one can see multiple maps in drawing
window. These are drawn so that the first row of maps uses the first initial
map, etc. Each col corresponds the same same sequence of activations and bits
ie a pop.
- The report_bit_origin option shows where first bit came from. This allows
you to see how the alleles for the first bit of the string spread to their
final positions. The formula is origin_first_bit[x, y] :=Xmax*(y - 1)+x - 1.
When Xmax=10 and Ymax=10 this gives with values ranging from 00 (upper left) to
09 = 9(upper right) to 99 at lower left. The data is written to the text file,
and thus needs to be saved by hand . This uses up some memory. If all bits were
to be saved it would use up as much as the culture matrix, and would thus limit
the size of the map that could be run with a given number of bits.
- If WritePeriodicStats=true write to text window (which has to be manually
saved) each period:
- number of changes (i.e., a count of the number of times a gene was
actually changed during the current period. ) This is calculated for both
interaction from a neighbor, and from a broadcast. (Discussed in Org 69
memo).
- number of zones. A zone is just like a region, except only maximal [ie
bitmax-1] cultural boundaries count as separating zones, whereas any cultural
distance >0 is sufficient to separate regions.
In drawing, the number of cycles per period is writen if it not equal to 1000
(the commonest value).
- The program stops at the end of the current period if the mouse button is
down.