Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active March 13, 2017 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/68fc5fce078dddce89331285862bc351 to your computer and use it in GitHub Desktop.
Save kenwebb/68fc5fce078dddce89331285862bc351 to your computer and use it in GitHub Desktop.
Dictator Series - Who selects the leader
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Mon Mar 13 2017 18:15:52 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Dictator Series - Who selects the leader
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 68fc5fce078dddce89331285862bc351 based on 3d4d5e61b26d5c376a7c6789f11d4b4c
Keywords:
My Notes
--------
March 12, 2017
- use active objects (avatars?) with behaviors to select leaders and policies
- in a Totalitarian state, the voters and leaders are the same people
- how do I express this using Xholon?
- each person may have zero, one, or more behaviors which define wherther they vote and/or lead and/or etc.
References
----------
(1) https://en.wikipedia.org/wiki/Forms_of_government#By_elements_of_who_elects_the_empowered
(2) https://www.aclu.org/issues/voting-rights/fighting-voter-suppression
]]></Notes>
<_-.XholonClass>
<PoliticalSystem/>
<!-- people -->
<Person>
<Peon/> <!-- a person with no power in a Totalitarian regime -->
</Person>
<PersonBehavior superClass="Script">
<Voter/>
<Leader/>
</PersonBehavior>
<People/>
<!-- forms of gevernment [1] -->
<FormOfGovernment>
<Authoritarian/>
<Democratic/>
<Oligarchic/>
<Other/>
</FormOfGovernment>
<!-- various forces that restrict voting -->
<VoterRestriction superClass="Script">
<VoterSuppression/> <!-- removes Voter behavior from randomly-selected people -->
<Disfranchisement/>
<Gerrymandering/>
<VoterIntimidation/>
</VoterRestriction>
</_-.XholonClass>
<xholonClassDetails>
<Person>
<Anno>One two three ANNO</Anno>
</Person>
<PersonBehavior><DefaultContent><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode;
me.println(me.parent().name() + " is a " + me.xhc().name());
},
act: function() {
me.println(me.name());
}
}
]]></DefaultContent></PersonBehavior>
<VoterRestriction><DefaultContent><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode;
me.println(me.parent().name() + " does " + me.xhc().name());
var voter = me.xpath("../People/descendant::Voter");
if (voter) {
voter.remove(); // suppress the person's intent to be a voter
}
},
act: function() {
me.println(me.name());
}
}
]]></DefaultContent></VoterRestriction>
</xholonClassDetails>
<PoliticalSystem>
<Authoritarian>
<People>
<Person multiplicity="3">
<!-- this person is both a voter and a leader -->
<Voter/>
<Leader/>
</Person>
<Peon multiplicity="10"/>
</People>
</Authoritarian>
<Democratic>
<People>
<!-- 60% of eligible people vote; 40% don't vote -->
<Person multiplicity="12">
<Voter/>
</Person>
<Person multiplicity="8">
<!-- a non-voter -->
</Person>
<Person multiplicity="1">
<Leader/>
</Person>
</People>
<VoterSuppression/>
<Disfranchisement/>
</Democratic>
</PoliticalSystem>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Person in a Authoritarian state</title>
<rect id="PhysicalSystem/Authoritarian/People/Person" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Person in a Democratic state</title>
<rect id="PhysicalSystem/Democratic/People/Person" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment