'''Name:''' KritarchyPattern '''Type:''' Organizational '''Problem:''' Patterns like the DemocracyPattern tend to continue to create rules and rules until it looks like a StatistPattern. The KritarchyPattern prevents this by starting off with some basic rules and then judging whether those rules have been broken. '''Context:''' The KritarchyPattern is best used in situations where a number of classes intermingle but do not always observe the rules of the system. In such instances it is best to apply the KritarchyPattern to enforce those rules through the introduction of instances of a judging and enforcement class. '''Proposed Solution:''' A typical solution involves a pool of objects, say of type Person, a judging objects, Judge, and an enforcement object, Enforcer. The rules are specified in the Judge class. An example would to have Person with a field "money", and another Person can not change that value without an agreement. This could happen in a language like Python that does not have private variables, and the second class does not use the accessors. The Judge class would then be programmed to insure that "Person.money" does not get changed without using an accessor. This way a program can ask the judge to judge if anyone has "stolen" money by finding out who lost and gained money. If PersonA.money was changed without using an accessor and PersonB.money has grown, then the Judge class would create an Enforcer class which could possibly delete PersonB or to correct the money values. '''Design Rationale:''' The DemocracyPattern could make use of this pattern, but in practice the number of rules continues to grow and grow during runtime. The KritarchyPattern is meant to have a set of rules that never changes. '''Related Patterns:''' DemocracyPattern StatistPattern SocialistPattern AnarchyPattern '''AntiPattern''''''s you should beware of:''' StatistPattern '''Pattern Category:''' SocialPattern '''Also Known As:''' LibertarianPattern '''Examples in Practice:''' There was an effort to use the KritarchyPattern happening in Somalia. Efforts to introduce the DemocracyPattern presumably failed. ---- Kritarchy: a political system (supposedly) founded on justice, in the sense of "the rule of law". Note also that systems based on justice alone, but without empathetic/compassionate components to allow for mercy beyond that allowed by rigid law have been criticized for millennia, so despite positives, there appear to be negatives as well, at least in some implementations/interpretations of this pattern in the real world.