Thu Apr 11 03:27:34 1996

From majordom  Thu Apr 11 03:27:34 1996
Return-Path: 
Received: by scholar.cc.emory.edu (5.0/SMI-SVR4)
	id AA09353; Thu, 11 Apr 1996 03:27:34 +0500
Date: Thu, 11 Apr 1996 15:24:20 +0800 (WST)
From: Timothy John Finney 
To: tc-list@scholar.cc.emory.edu
Subject: MS copying simulation program
In-Reply-To: <9604081841.AA12092@scholar.cc.emory.edu>
Message-Id: 
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 3203
Sender: owner-tc-list@scholar.cc.emory.edu
Precedence: bulk
Reply-To: tc-list@scholar.cc.emory.edu

I am putting the source code (named simmss.c) for the copying simulation
program I mentioned during the discussion on archetype and autographs on
the tc ftp site: 

ftp://scholar.cc.emory.edu/uploads

To make it run you need to download it to your area of the machine you use
with ftp. Then compile it (type cc simmss.c on a unix machine) then run
it (type a.out on a unix machine). Lots of the machines through which
you get your email will do this. 

Sometimes you will just get a line of ones, which means that the original
MS was killed or died before it got copied. Other times you will get about
ten rows of numbers, which needs some explanation. For now, ignore the
first row. The other rows are manuscripts. The first five numbers in each
manuscript are: 

1) /* Is daughter MS alive? 1 = yes, 0 = no */
2) /* Year copy made */
3) /* MS lifespan */
4) /* Parent MS number */
5) /* Daughter MS number */

Notes on these numbers:

1) This number will always be 1 in the mss the program selects at the end
of its run because it finishes by selecting 10 (or some other number you
can choose) living mss. 

4) and 5) These are unique numbers consecutively assigned to each copy
as the program makes it, starting with 1 for the original. 

The other numbers are the variants. The original was a line of ones, but
the copies can have other numbers besides one. The way this happens is
that there is a probability (which you can set) that any particular
variation unit will change to a different variant. All the program
does is increments the existing variant by one. The heart of the program
is a random number generator which determines whether a variant is
incremented, whether a ms dies or is killed in a particular year or
whether a copy is made of a particular ms, which must be living to be
copied. 

Now for the explanation of the first row: the first five numbers are
always 1. The rest are the maximum numbers that the respective variants
were incremented to in each variation unit by the end of the program's
run. 

You can change the parameters the program runs with by using a text editor
to change them in the source program, then compiling and running it again.
A number of the parameters are inverse probabilities. An inverse
probability of 20 variants copied means that the likelihood of a variant
being changed (i.e. incremented) is one in twenty variants copied. 

Every time the program runs it should do something different (except for
when the original is killed before copies are made). 

Two files will be found in the same directory as the compiled program
(a.out) after the program has run. One is called Extant, and is a copy of
the mss chosen at random from those still living when the program has run
its course. The other is History which is a running history of the copying
as it happened. 

You can look at these and edit the source code (to change the parameters)
using a text editor. If your machine has pine as a mail program, it may
also have pico, which is a text editor. If so, type pico simmss.c to
edit the source code or pico History or pico Extant to look at those two
files. 

Tim Finney
Baptist Theological College
20 Hayman Rd, Bentley WA 6102
Australia




Back