Sparta Database Initiative. Database for RUN_500_B is available

A second run of the Spartan Demographic Initiative is available here. This is the complete database dump for the run with table definitions. It is a .sql. The database name is ‘sddb’.

This is the result of a run of sdcont_mysql.php for 500 married pairs and runs 80 years. I will refer to it in future by the name RUN_500_B.

This DB contains the records for 4748 simulated living persons and 5899 deceased. In addition it contains information for the residents of 770 distinct houses and 499 kinship lines. It also contains complete info for wealth transfer for the life of the run through bequests and dowries. In addition the table ‘report’ contains demographic information for each year of the run so the investigator can trace developments over the life of the 80-year run.

SPARTA, CITY OF WOMEN. Household gender composition in the Spartan Demographic Initiative

In his essay on the women of Sparta Paul Cartledge says this:

“…she continued to reside with her mother, for the matricentric character of a Spartan girl’s domestic life was heavily accentuated by the fact that her father was expected to spend most of his time living communally and in public with his male peers – indeed, all of his time, should he have become a father before the age of thirty ..“.(1)

Cartledge leads us to think that, because of the agoge, the army, and the sussitia  (eating clubs) the Spartan male was rarely at home and that the Spartan home was an inherently feminine place.  Is that so?  How feminine? Can the Spartan Demographic Initiative shed light on this question?

Here are the results from an initialization run of 500 married pairs over 80 years.  The SDI creates and tracks houses for the families in the simulation.  Males over 6 years of age and under 31 years of age belong to the house but are marked ‘not in house’.  Before the age of 7 and after age 30 they are marked ‘in house’.  As one would expect that leads to a tremendous skew of the house population in favor of females at any point of time.
 Gender_Comp
Graph 1.  Ratio of genders in first 21 houses, Run 500_A
In this particular run (500_A) the number of women in any house after 80 years was 2161, males 1034.  The number of populated houses was more than 460.  The average number of females in any house was 4.7 with a standard deviation of 2.74.  The average number of males in any house was 2.45 with a standard deviation of 1.47.  That means that 68% of the houses contained from 2 to 7.4 females and 1 to 4 males.  The ratio of the averages is 1.9 female to every male.

Let’s look at it in graph form.  In graph 1 the gender composition of the first 21 houses is displayed.  Females are the red bars and males in the same house are the green bars.  They are arranged in ratio order with plurality males on the left and plurality females on the right.  We see that there is one house with more males than females, four houses with an equal number of males and females, and in the remainder females outnumber males.

All the data for run 500_A is here.

Next time let’s talk about age composition of these houses.

Notes

(1) Cartledge, 2001.  113.

Bibliography

Cartledge, 2001.  Paul Cartledge, “Spartan Wives: Liberation or License?” inSpartan Reflections.  University of California Press, Berkeley and Los Angeles, 2001.

Bug Fix. Spartan Demographic Initiative.

 

I fixed a bug in sdcont_mysql.php and placed a new version on Google Drive here and deleted the old version.
The bug became apparent in the ‘leak’ of wealth which would ultimately have been total.  Wealth in any simulation run is dispersed in various ways but the sum in the hands of those living at the end of the run must always equal total wealth at start time.  There was a case where an unmarried woman would be married and then die in the same year.  Her marriage status was not being updated to ‘T’ just before her death and so it appeared as though her husband was still married to her.  When he died, then, his wealth was left to her even though she had predeceased him.  In this way wealth would gradually leak out of the sim into the hands of the deceased.  This has now been fixed in marriage_check_fem() where I force the function to return her new married status.  There is a large note in update_each_woman() which gives more detail.

Population and Household numbers. The Sparta Demographic Initiative.

Let’s first look at the graph of the simulated Spartan population as it evolves over an 80-year initialization run.  We start with 1000 pairs and no children.  This causes the graph to oscillate between years 13 and 33 as the original women begin to pass child-bearing age but their daughters are not yet old enough to have children.  Ultimately these oscillations settle into a more linear growth rate between years 26 and 80 with a much smaller oscillation still detectable around year 52.  The linear portion of the curve (years 50 through 80) is approximated with the linear function

Y = f(x) = 114.4x – 1111.1

This function is shown on the graph as the thin yellow line.

 Image

Population per simulation year (with estimator function for linear part)

We can see that the slope of ~114.0 is too steep.  In a mature population the slope should be much flatter.  For the actual simulation either the fertility numbers or the mortality rates will have to be modified to produce a flatter curve.

Although only in the initialization phase we can already identify some characteristics of the Spartan household.  To begin with, remember that the simulation creates a new household whenever the population of the previous household exceeds 15 people.  The total population of any household will, therefore, never exceed 15.  The following chart shows how populations are distributed within that range.  The average number of people in the household (the same 1000 pair 80 year run) is 6.55.  The standard deviation is 3.7.  Therefore 68% of the simulated households hold between 3 and 10 people (rounding to the nearest digit).

 Image

Number of households (y) with specific number of residents (x)

Before getting into the ratio of males to females in the household (next post) we can say something about the number of children that each woman has.  In the next chart we see that most women (of all ages) have 1 child with a steadily declining number of women per number of children down to 5 women who have 12 children each.

 Image

Number of women (y) with specific numbers of children (x)

One of the important aspects of Spartan demography is the relative numbers of women and men who lived in the household.  I will investigate that, as I said, in my next post.

Changes to the Spartan Demographic Simulation

I have made some changes to the software of the SDI.  I have added two new tables, ‘marriages’ and ‘reports’.  The marriages table came about because when a spouse died I lost the original info about whom they married and when.  The marriages table contains the ID’s of the husband and wife who marry and the year in which they married.  In this way we can go backwards and forwards through the marriage history for any individual.  E.g.:

“Select * from marriages where wife = 764 order by year”

This will print out something like this:

435, 764, 14         // which means “individual 764 took husband 435 in year 14”.

782, 764, 21

There was a problem with a woman who was pregnant and whose husband died in that same year.  Her child would be marked with ‘father, 0’ which isn’t very fair to the child.  The ‘marriages’ table fixes that problem.

Image

Final population class breakdown for year 80 in an initialization run of 80 years.

There is another new table, ‘reports’, which gathers some data for each year of the run so that, for example, you can trace the number of living persons year by year.  Previously that information was lost.  The ‘reports’ table contains a large number of data results for each year.  The number of living, living male or female, deceased, deceased male or female, number in agoge, number in army, and a complete population breakdown  for each year.  The queries are in a new include file called ‘report_queries.php’ (find it in Google Drive here)  and are contained in the array called $q_array().  The labels for the results correspond to the queries and are in the array $l_array().  So the query for finding the number of living is:

$q_array[1] = “select count(*) from PERS where living = ‘T'”;

And the label for its results is:

$l_array[1] = “all living”;

This query is run by the sdcont_mysql.php software for every year cycle and to get back these results you might use the query:

Select * from reports where label = “all living” order by year asc;

This will return a result for each year of the initialization process and ordered by the year.  This is suitable for dropping into Excel, for example, and generating charts.

I conducted an initialization run of 1000 couples over 80 years and the resulting DB (along with all table definitions) is in Google Drive here.

The new version of sdinit_mysql_GD.php is here.

The new version of sdcont_mysql_GD.php is here.

The new version of sd_report_mysql_GD.php is here.

All previous links in Google Drive have been deleted.

The first thing to do is to import the ‘1000_pairs_dump.sql’ file into your DB.  This will define the tables and populate them according to my last 1000 pair run.

To use the software you have to go into sdinit, sdcont, and sd_report and set the parameters for access to your own DB.   The DB connection code is at the beginning of each of those programs.  Also be sure that the include file report_queries.php is available because sdcont needs it.

You can set the ‘parentpairs’ and ‘runyears’ parameter in the Konst table to whatever you like.  For ‘parentpairs’ start with some number like 10 or 20 and for ‘runyears’ try some value like 40.  Then you run sdinit first (which truncates the tables and establishes all the new breeding couples) and then run sdcont.  When this finishes you can use the information generated in the ‘reports’ table in the DB as I discussed above or you can run sd_report to generate a report on the final state of the initialization process.

Now on to write the actual simulation code but before I do that I am going, in my next post, to discuss some of the results from the 1000 pair initialization.

A wealth model for the Spartan Demographic Initiative

We don’t know how to measure the wealth of ancient Sparta or how it was transferred on death or marriage. We do know that wealth was distributed unequally and this was, purportedly, one of the reasons for Lycurgus’ reforms.(1) The interesting thing about Spartan wealth from the standpoint of a simulation is to show how wealth moved as a result of bequests or dowries given the fertility rates and the death rates which may reasonably be applied.

In the simulation wealth is distributed according to an exponential curve. It is done like this. In the sdinit_mysql.php program there is an array of values called ‘property’ defined so:

Image

Chart 1 shows this progression.

Image

Chart 1.  Linear mapping of array indices to wealth values in sdinit_mysql.php

When the sdinit_mysql.php program is run each male receives wealth from this array. A random number from 0 to 30 is generated and that number is used as an index into the property array. Random numbers 0 and 1 result in this male getting no wealth. Random numbers from 2 to 6 result in the male getting a wealth parameter of 1, etc. Most people have wealth units from 0 to 4 (that is, mostly equal) but random number 30, for example, allocates a wealth value of 25 to about 3% of the generated males. So in this simulated society a few people have a great deal and many people have relatively little. The point is not to accurately portray Spartan wealth but to distribute it unequally and then see how it moves through the simulation given our specific mortality and fertility parameters.

Rules on bequests – When people die they leave their wealth according to the following simulation rules. Spouses leave their wealth to the other spouse, if living. In the decedent has no spouse then the money is left to the oldest child (male preferably) then, if no children, to ego’s sibling (oldest male preferably). If all these fail then the money is left to the Spartan state. Rules are the same for both men and women.

Dowries(2) – A wife brings her dowry wealth and ½ of her parent’s wealth and adds it to that of her new husband.

To manage the wealth transfers I have created a DB table called ‘Property’ which is defined as follows:

CREATE TABLE `property` (
`ID` int(11) NOT NULL,
`wealth` int(11) NOT NULL DEFAULT ‘0’,
`source` varchar(45) DEFAULT NULL,
`year` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Here the ‘ID’ field is the ID of the person who receives the transfer whether by dowry or by request. The ‘wealth’ field is the amount transferred in the simulation units given in the ‘Property’ array described above. The ‘source’ field is a comment that describes how the wealth was transferred, e.g.‘Inherited from husband ID’, ‘Dowry of ID’, where ‘ID’ is the unique ID of the transferor. The year is the sim year update in which the transfer occurred. Each transfer is recorded so that the ‘ID’ field in ‘Property’ is not unique. To retrieve all the wealth of any specific person, 38 for example, one does this:

Select sum(wealth) from property where ID = 38;
The rules of wealth transfer, as outlined above, are implemented in sdcont_mysql.phpThe purpose of simulating this wealth transfer is to investigate to what extent it was true that during the fifth and fourth centuries B.C. wealth was being transferred into the hands of women. It has been estimated that by the early fourth century B.C. as much as one half of the wealth of Sparta was in the control of women to bequeath or bring as dowries. The simulation may shed some light on what circumstances are required to make that true.

NOTES:

(1) Described many centuries after the event in Plutarch, Lyc., 8. “For there was dreadful inequality: many destitute people without means were congregating in the city, while wealth had poured completely into just a few hands.” Talbert (1988) 16.

(2) Dowries at Sparta discussed in Cartledge (2001), 120.

BIBLIOGRAPHY

Cartledge (2001). Paul Cartledge, ‘Spartan Wives: Liberation or Licence?’ in Spartan Reflections, University of California Press. 2001.

Talbert (1988). Richard J.A. Talbert, Plutarch on Sparta. Penguin, London. 1988.

Spartan Demographic Initiative – Initialization

I have completed the initialization software for the Spartan demographic simulation.  This consists of two parts.  In the first part, sdinit_mysql.php, I seed the database with a predetermined number of couples.  They are assigned random ages and they are given no children.  The number of couples is determined by the ‘parentpairs’ value in the Konst table.  When that process completes I run a second program called sdcont_mysql.php.  This program runs a number of year by year updates on the database.  On each yearly cycle each person is aged 1 year.  Males and females have their mortality checked and are terminated if their odds of living (rand(1,100)) are less than their mortality rate for their age.  If the person records survive this test then their marriage status is checked.  If they are not married then the simulation determines whether they should be married and whether a suitable partner can be found for them.  If a partner is found then both are marked married.  If a married woman is not pregnant then she is randomly assigned a pregnancy based on a fertility rate for her age.  If she is pregnant then she’s marked ‘not pregnant’ and a child record is added to the person table (`pers`).  On the next cycle that child is updated like any other person.

All_Living_Sparta
Graph of age populations from a simulation of 300 married pairs after 75 years.
Click to enlarge.

I don’t make unmarried women pregnant in this simulation.  I’m sure that in ancient Sparta children were born out of wedlock but I do not think, for the purposes of this simulation at least, that Sparta was the type of society in which this was generally encouraged.(1)  I think that ancient Sparta was a traditional society in which most parents cared very deeply about their daughter’s virginity.  I can change this in the simulation if my readers think that this assumption is significantly unrealistic.

I also assign each person record to one of the three Spartan tribes.  In the simulation they are simply numbers 1, 2, or 3.  The ancient Spartans, like many ancient societies, practiced bride capture.(2)  Bride capture usually takes the form of a mock battle between the two families in which the bride is spirited away from the home of her family and placed in that of her new husband.  The significant thing for our purposes is that the bride is taken from the ‘other’.(3)  Now what that ‘other’ actually consists of in the case of ancient Sparta is not known to me.  It could be another kinship line, another phratry, or another tribe.  In the simulation I imitate this by forcing the bride to come from a tribe different from her husband’s and, when  she is married she retains her own tribe ID but the simulation changes her house ID (`houseid` in the `pers` table) from her own to that of her new husband.  These assumptions, too, can be modified.

I did a run of sdinit_mysql.php and sdcont_mysql.php with 300 initial pairs.  The resulting database can be found here.    This is a full DB in .sql form with table definitions as well as contents.  If you choose to you should be able to simply execute it against your own DB.  It tries to create a DB called ‘sddb’ but you can delete that line (the first line) or modify it to suit yourself.

Some of the resulting numbers were converted into an Excel spreadsheet which can be found here.

I want to emphasize that all of this not the simulation but the initialization portion.  The resulting DB on Google Drive which I referred to above is meant to provide a starting point for the simulation.  We have gotten the database beyond ‘edge conditions’ and are ready to start the simulation (once I write it).

The .php program sdinit_mysql.php is here.

The .php program sdcont_mysql.php is here.

The .php program sd_report_mysql.php is here.  This program is run against the DB and it generates a report of all living and dead as well as a breakdown of this ‘society’ by house ID.

For all these programs you must provide your own DB connection information at the beginning where it directs you to define the connection.  If you have your own DB you’ll know how to do this.

Notes:


(1) A bold assertion in the face of the evidence. Plutarch, Lyc. 14, 15.  But Pl. stresses this public nudity of young men and women as an inducement to marry and not an inducement to immorality; in 14: “There was nothing disreputable about the girl’s nudity.  It was altogether modest and there was no hint of immorality..” in Talbert (1988), 24-5.  Paul Cartledge discusses the evidence in Carledge (2001), 113-115.

(2) Bride capture in ancient Sparta (with cautions about the evidence) discussed in Cartledge (2001), 121 ff.  Bride capture considered more generally from a modern ethnographical perspective in Barnes (1999). I’m probably wrong to simulate this as marrying external to the Spartan tribe but I do not yet know how to simulate this any other way.

(3) Bride capture (one form of exogamy) described in Fox (1967), 178.

Bibliography:

Barnes (1999). R.H. Barnes, ‘Marriage by Capture’. The Journal of the Royal Anthropological Institute.  Vol. 5, No. 1 (Mar., 1999), pp. 57-73.  On-line here: http://www.jstor.org/stable/2660963

Cartledge (2001).  Paul Cartledge, ‘Spartan Wives: Liberation or Licence?’ in Spartan Reflections, University of California Press.  2001

Fox (1967).  Robin Fox, Kinship and Marriage; an Anthropological Perspective, Penguin, Harmondsworth, Middlesex, England.  1967.

Talbert (1988). Richard J.A. Talbert, Plutarch on Sparta.  Penguin, London. 1988.

The Spartan Demographic Initiative. Status.

The idea of the Spartan Demographic Initiative is to create some large number of married couples with distinct ID numbers and in distinct households. Having created this database the simulation then updates it on a yearly basis. Every year the people in the household have their ages updated. Also the women, if of an age to have children are marked ‘pregnant’ or not depending on a fertility parameter. The men, if age 7, are marked as out of the household and in the agoge or Spartan state training system. If age 20 they are removed from the agoge and placed in the army. When out of the army at age 30 or so they are placed back in the household. Men and women of a marriageable age have mates found for them and their record is marked as married. Both men and women are marked dead if a random number falls below a mortality threshold for their age. If dead they are removed from their household and, if they were married, their spouse is now single and eligible to be remarried.

These are exceedingly simple rules. What can we investigate with them? The first thing is that we can get a good look at simulated Spartan households and their composition. What I expect to find is that some significant number of Spartan households were headed up by women. Sparta, for all its vaunted army, was a peculiarly feminine place. We know that in the late fifth century BC women controlled about two fifths of Spartan property which they passed on either as bequests or as dowries. By the early fourth century that number had increased to one half. From the ethnographic point of view Spartan families were becoming matrilocal. I think that most ethnographers would identify pressure on Spartan society as trending it towards matrilinearity. What was this external pressure? Simply the fact that, by the early fifth century, Sparta was running out of soldiers (i.e., men).

I hope that a simulation of these pressures can give a better look at the household makeup of the Spartans. Such a simulation tempts us to make statements about ancient Sparta; but this is unwise. The only thing such a simulation can elicit is statements about itself. Despite that I hope that this simulation can stimulate discussion about fertility rates, mortality rates, and other questions about the realism of the various parameters.

I have written the first part of this simulation, namely that program that populates the database with just married couples. The parameter that controls this initialization software is ‘parentpairs’ which you set in the Konst table. It is currently set to 500. The Konst table holds, or will hold, all of the constant parameters required to run the simulation. This includes all the mortality and fertility statistics. I have placed it on Google Drive here as the file Populate_Konst.sql [https://drive.google.com/file/d/0B9YdgOKdbi4Va2JrdGxJbzcwMUk/edit?usp=sharing]

The initialization program itself is also on Google Drive as sdinit_mysql_GD.php

A few technical details. This simulation is written in PHP. The database is the MySQL from Oracle. You can download it here.

The Spartan Demographic Initiative

I am starting a project which I call the Spartan Demographic Initiative.  This is a computer simulation of the population of ancient Sparta.   In this simulation each person in ancient Sparta will be represented by a database record.  We don’t know, beyond a few hundred, anything about Spartan individuals and this project does not attempt to represent real people.  The intent is to create virtual Spartans and subject them, year by year, to the same pressures that ordinary real Spartans were subjected to.  These virtual Spartans will have numbers, not names.  The simulation, as I plan it, will run from about 550 BC to the Battle of Leuctra in 371 BC.

The database consists at present of four tables.  The first is ‘pers’ which contains records of each person.   The fields are

ID                    :     A unique number identifying this person

Father            :     A unique number identifying the person’s father

Mother          :     A unique number identifying the person’s mother

Age                  :    The person’s age

Gender           :    The person’s gender as values ‘M’, ‘F’

Living             :    Whether the person is living as values ‘T’, ‘F’

Tribe               :    The person’s tribe as values 1,2,3

Household    :     A unique number identifying the person’s household membership

Inhouse         :     This identifies whether the person is actually in the house as values ‘T’,’F’

For males and females there are unique tables, ‘male’ and ‘female’

In the table ‘female’ there is a record for each female in the simulation.  The fields are

ID                    :     A unique number identifying this person

Married        :     The person’s marital status as values ‘T’,’F’

Pregnant       :    Whether this woman is pregnant as values ‘T’,’F’

Numchild     :    The number of children that she has.

Husband       :    Her husband’s unique numerical identifier.

The fields for the table ‘male’ are:

ID                     :    A unique number identifying this person

Married         :    The person’s marital status as values ‘T’,’F’

Numchild      :    The number of children that this man has fathered

Army               :    Whether this person is in the Spartan army as values ‘T’,’F’

Agoge              :    Whether this person is in the Spartan educational system for boys, the ‘agoge’, as values ‘T’,’F’

Wife                 :    His wife’s unique numerical identifier or zero (0).

There is an additional table ‘Konst’ which is used to hold name/value pairs as  ‘kname’ and ‘kval’.   I will describe it in another post.

I have placed the .sql file which defines these tables on Google Docs here as Table_Defs_SDI.sql.

In my next post I’ll describe some of the underlying considerations for such a simulation.

A Thought Experiment

Some 3000 years from now imagine that scholars who wish to study the American Civil War of 1861-1865 have only an old battered copy of Gone With the Wind to work from.  Would they not think that the city of Atlanta in Georgia was far more important  than it really was?  Possibly even the goal of the war?

 

Rhett Butler

Rhett Butler

Would not some future Schleimann, bulldozing his way through the rubble of Atlanta and digging up a bust of Robert E. Lee proclaim proudly to the Head of the Confederation that he had ‘gazed upon the face of Rhett Butler’?