Note: This is an excerpt from a draft of my thesis, A Computer Model of National Behavior. The introduction and table of contents are also available
4.1 Objects and Data Types
The system described in the thesis models the behavior of nations and how they change themselves, the populations that make them up, and the political systems that emerge from their actions. Therefore these aspects of nations, people, and politics, have to be represented quantitatively. A naiveapproach would start work immediately with the assumption that three class types corresponding to the above aspects would be used. However, a better method is possible.
In OO design a system is made up of things or â€œobjectsâ€ which have properties (such as the weight of a rock and the sharpness of a knife) and methods (such as knives cutting or rocks falling). Joines and Roberts note that â€œ[OO] systems view the world as a set of autonomous agents that interact or work together to solve some complex task.â€ As the only autonomous agents in this model are nations, nations is the sole object type used.
So then will the model just have many nations objects competing and cooperating, with populations and politics stored as a complex data type for each nation? A strict OO system might use this approach, but this is not how we think of populations and politics, and so it would merely work to sabotage the third benefit of OO design mentioned. The model therefore needs some approach to complement the OO method. Fortunately, the very common Entity-Relation (ER) design style fits this situation perfectly.
The ER model was created in the 1970 by E.F. Codd as a way of designing and organizing databases. Like OO design it attempts to view the model as humans do. Codd describes it as providing â€œa means of describing data with its natural structural only â€“ that is, without superimposing any additional structure for machine representation purposes.â€ It does this by using entities, which are analogous to objects, and relations or relationships, which describe how entities pertain to each other. Entities represent the real-world object about which data is being collected. So populations and politics might be represented as entities. All entities are made up of attributes, so the hypothetical populations entity might have the number of people in it and their average wealth as attributes. Each important association between entities is shown as a relationship. Therefore the relation of populations to politicsmight be one-to-one (each population is associated with and only with one body politic), one-to-many, many-to-one, and many-to-many. The exact nature of the relation can be defined more precisely, but the basic types of relations have been listed above.
Unlike objects in OO systems, entities in ER systems do not have methods. The ER design is appropriate for determining which data can be stored, but it has no way to indicate what entities can do. For this system, this is a benefit because it clearly allows us to separate nations, which can act, from everything else that cannot.
Now that the design of the model has been finished using ER properties, how should it be set up? The best approach is to decide how one naturally thinks of this problem and model it accordingly. The fact that nations are often viewed as relating to land gives a hint. Using places as an entity type allows the model to easily describe how nations affect populations without viewing the world as an undifferentiated mass. Thus we have one object type, nations, which is related to the entity type places. Because we think of nations being in many places, and a place can host several nations, the relationship between nations and places is many-to-many. Because the number of possible relations between a specific nation and different places is variable, and the same is true of relations between a place and nations, this is known as an M-to-N relationship.
Figure 7. Conceptual E-R M-N Relation
For example, consider a model of Europe where there are a number of places and two nations: French and German. Clearly French will be very strong around Paris and German very strong around Berlin. But in Alsace-Lorraine which is on the border, there is a strong influence of both nations. So in this example every nation is in more than one place and some places are associated with more than one nation.
Figure 8. Instantiated E-R M-N Relation
The only concept left out so far is political entities. This concept is ambiguous, so a description of what this entity is and how it relates to other entities is needed. This political entity demonstrates how the actions of nations affect not only nations but also other institutions. Specifically, political institutions that appear to be important by themselves actually emerge entirely out of national behavior. Institutions entirely internal to a political unit such as form of government are out of the scope of this project, so political units can best be represented by states. States are the most obvious feature on any political map, and have been the focus of AI models in the past. For example, as far back as 1971 complex computer models were developed to model conflict between the People’s Republic of China and the United States (Clema and Kirkham). It thus seems appropriate to see if the model can correctly predict their behavior without allocating states any methods.
Because of the system’s ER approaches, states have to be directly related to either nations or places or both. Again the solution is found by asking how one normally thinks of states. For at least a hundred years the answer has been geopolitically, which means that states directly relate to places.
Now there is almost a complete OO and ER system to describe the model. The only object type is nations. The only three entities are nations, places, and states. Places directly relate to both nations and to states, meaning there is a relation between places and nations and a relation between places and states. Both of these relations are many to many, as a nation can be in many places, a place can have many nations, a place can be owned by many states (as in a federal system), and a state can own many places.