mars0i / bali

Extended Lansing-Kremer model of Balinese crop/water management with added religious transmission
6 stars 1 forks source link

Bias toward first cropplan, first startmonth #11

Closed mars0i closed 10 years ago

mars0i commented 10 years ago

There seems to be a bias toward crop plan 0 and start month 0. This seems to happen even when the crop plans are shuffled, though it's most apparent when the 333033303330 plan exists and is crop plan 0.

mars0i commented 10 years ago

imitatebestneighbors, the procedure that causes subaks to copy neighbors, is only run in actual month 11 (December), i.e. when global month = 11.

In Janssen's version of this function, imitation of a neighbor by a subak only occurs when the subak's crop is 1, 2, or 3. These are the crop numbers for rice varieties. The subak doesn't look at neighbors when crop = 0 or 4. 0 means "lie fallow this month". (We can ignore 4, the paliwiga alternative crop. It's not currently used.)

This means that

  1. Any subak that has sd = 0 (start month, offset that's added to month to get subak's internal month-in-cycle mip), will never imitate anyone: Since imitatebestneighbors is only called when month=11, and a subak's crop is the result of using mip to index into its cropplan, where mip=month+sd, a subak with sd=0 always has mip=11 when month=11. But all cropplans have crop=0 in the 11th month. So subaks with sd=0 never imitate.
  2. Subaks with sd = 1, 2, or 3 always imitate, no matter what. Because then mip=11+sd (mod 12) = 0, 1, or 2, and every cropplan includes a rice variety in these months.
  3. Subaks that are currently using cropplans with a lot of fallow periods miss a lot of chances to imitate.

Point 1 is a partial explanation for why the system gravitates to sd=0. Those subaks never imitate, but other subaks might imitate them. Similarly, point 2 implies that subaks with sd in {1, 2, 3} are at greatest risk of giving up that sd.

Changing this behavior by allowing imitation when crop = 0 seems to complete change the behavior of the model, at least with shuffling. There is a great deal of (clustered) variation in both crop plans and start months. (Although the all high-yield rice (variety 3) crop plans still seem to be favored.)

(This doesn't explain why the first cropplan always has an advantage.)

mars0i commented 10 years ago

I believe this was fixed by fix for #19.