One important part of the Camelot design revolves around the voter population model of the United States. Some questions spring to mind when thinking about this part of the design:

- How will the US voter population be modeled?
- How will the US voter’s alignment on issues be modeled and so their vote for or against a particular candidate can be calculated?
- How will a state’s electoral votes be modeled so they can be allocated to the winning candidate, taking into account both the Winner-Takes-All and Congressional-District methods of apportionment?

I’ve come up with a model that I believe will work (though there might be changes down the road due to implementation).

The State object has the following properties:

- ElectoralVotes – integer – The number of electoral votes a candidate will gain by winning the state’s popular election.
- WinnerTakesAll – boolean – How electoral votes are apportioned. If false, the Congressional District method is used.
- PreviousWinner – byte – Used to represent winners in previous elections ( _ _ _ _ 1 0 1 1 1 = Democrat, 0 = Republican).
- SwingSafe – bnumber (c) – Representing whether the state is a “swing” state or a “safe” state (Candidates expend more effort and resources to try and win swing states).

A BNumber is something that comes from Storytron – it’s a double or decimal that is bounded, it can only have a value between -1 and 1 with 0 being the midpoint. I’m going to have to come up with an implementation for CP. “(c)” means the property is calculated, either at object creation, during the game, or both.

The District object maps how many counties make up a district and is used when apportioning electoral votes using the Congressional District method. I’m going to enforce the rule that one county always maps to one and only one district for simplicities sake (real life might be more messy).

The County object has the following properties:

- PopVapt2012 – integer (c) – The voting age population turnout in 2012.
- PopVapt2008 – integer – The voting age population turnout in 2008.
- PopVapVol2010 – percent (c) – The change in population between 2008 and 2010. Used to help calculate PopVapt2010.
- Rep2012 – percent (c) – The number of VAPt thinking of voting Republican.
- Dem2012 – percent (c) – The number of VAPt thinking of voting Democrat.
- Other 2012 – percent (c) – The number of VAPt thinking of voting for a 3rd party candidate (how would I handle it if there’s more than one 3rd party candidate in the race?).

At voting time, PopVapt2012 will be allocated according to Rep2012, Dem2012, and Other2012. These allocations will be aggregated at the state level (for Winner-Takes-All). The state winner will be declared and electoral votes will be given to the winning candidate. (If the Congressional-District method of apportionment is used, the electoral vote winners and apportionment will be slightly different.)

Type.PNT is a categorization for each country using the types outlined in the book Our Patchwork Nation.

Two outstanding items come to mind – how to calculate the SwingSafe of each state and how to determine a margin of error for polls?