You are on page 1of 8

ASSIGNMENT: Democracy and Genetic Algorithms

INTRODUCTION
A fierce enemy of democracy, Socrates, the ancient Athenian philopher has formulated
a formidable attack on democracy as a system of government. As described by Plato, and
loosely translated, Socrates asks:
When you get sick do you go around the neighborhood asking for advice?
No, they answer him, you go to a special doctor.
How about when you must cross a difficult passage by sea, do you go around the
market- place asking for advice on how to do it?
No, you go to a good captain who will do the job right.
Then, asks Socrates after a few similar questions (with similar answers), when we
need advice about our country, on whose fate our own safety and happiness totally
depend, why should go around asking the opinion of every person, however unwise they
may be? Shouldnt we go to specialists in the art of politics and government?
We leave aside issues such as how these specialists in the art of politics will be found.
One would suggest we could train them the same way we train doctors; for example in
God forbid! Harvards School of Government. First, lets consider Protagoras answer
to Socrates in the form of a myth involving the Gods of Olympus when they created
mankind:
Hermes asked Zeus how he should impart justice, reverence and political judgment
among men: Should he distribute them as the various other skills are distributed; that is
to say, to a favored few only -- for example, one skilled individual has talent in medicine
or any other art, while the many are unskilled? Shall this be the manner in which I am
to distribute justice and reverence among men, or shall I give them to all? To all, said
Zeus; I should like them all to have a share; for cities cannot exist if a few only share in
these virtues.
And this is the reason, Socrates, why the Athenians when they meet to deliberate
about political virtue, which proceeds only by way of justice and wisdom, they are patient
enough of any man who speaks of them.
This is a myth, of course, (in fact, Protagoras first asked permission and got it - to
use a myth when he replied); Socrates could have ridiculed the answer as a mere myth
as he often did. He does not, though, because he sees its meaning quite well: For
Protagoras and the friends of democracy, it is a belief that politics work better with
democracy, considering that everyone contributes a part in finding a complex truth.

SCIENTIFIC RESEARCH: SOME SIMILARITIES TO POLITICS?


Consider also the following quotation:

The investigation of truth is in one way hard and in another way easy. An indication
of this is found in the fact that no one is able to attain the truth entirely, while on the
other hand no one fails entirely, but everyone says something true about the nature of
things, and by the union of all a considerable amount is amassed. Aristotle,
Metaphysics a. 1. 993a30-993b4.
This is the quote covering the entire faade of the building of the National Academy of
Sciences, in Washington, DC.

ASSIGNMENT
Knowing about genetic algorithms and realizing how complex societys problems are,
lets try to construct a more concrete defense for democracy. The purpose is to defend
the notion that democracy works -- we should not get into issues of social justice,
equality, etc, which are very important, but do not address the main criticism of Socrates.
It is reasonable to state that most problems faced by a country are very complex,
certainly outsmarting in most cases all of the people. Explain how you envision the
process of creating solutions through open exchange of ideas. In particular think how
gene-crossing and mutations can be implemented in the political process. For ideas,
consider at least some of the following questions but always as they relate to the
concepts of the genetic algorithms:
What is a fundamental difference between a medical doctor administering
advice to a patient, and conducting (original) medical research think of
Aristotles statement above. Can you extend this to politics?
How can we avoid getting stuck on local maxima, and, instead, attain global
maxima? How can we make sure, for example, that our solution will contain
far out elements, that may be essential to reach non-obvious parametric
spaces? Do we need to include people with extreme ideas in our discussion, for
example?
Within the same narrow viewpoint, what is the best way for idea-exchanging in
politics?
Genetic algorithms allow a wide variety of choices when considering how to
select parents to mate. One must always balance the need to converge (by
giving preference to the highest-rated parents), with the need to cover a wide
parametric range (which requires to also allow low-rated parents to mate, as
well as to mutate genes). Explain how this manifests itself in the political
process.
What is the role of political parties within this view of democracy? Do they
enforce open idea exchange (gene crossing, mutation) or prevent it?
Likewise, what is the role of the mass media?
How do we judge representative democracy (congress/parliament) as practiced
today, versus the direct democracy practiced by Athenians (decisions on all
topics by all people)?

The subject is complex so you can choose to treat a very specific item, or address the
overall theme.

MIT OpenCourseWare
http://ocw.mit.edu

$ %LRPLPHWLF3ULQFLSOHVDQG'HVLJQ
Fall 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

GENETIC ALGORITHMS
We will study a simple example, that of deciding the optimal way to paint a number of
windows NW using NCOL different colors (for example, for 4 windows and a choice of
4 different colors, one of many possible ways to paint these windows is 1432, where 1
stands for BLUE, 2 for YELLOW, 3 for RED, 4 for GREEN).
As we explained in class, there are the following phases in a genetic algorithm solution of
an optimization problem:
1. First decide on a sequence of genes that describe a solution, such as the one we
gave above, 1432. For all the convergence properties to hold, we ought to use
dyadic notation (0 and 1) so this is a deviation from the formal procedure. Had
we decided to go the formal way, BLUE would be 00, YELLOW 01, RED 10,
and GREEN 11, hence the sequence 1432 would become 00111001, i.e. a longer
sequence.
2. Second, we decide on a number for the population size NPOP. The genes of each
population sample are randomly selected.
3. Third, we rank each sample, using an evaluator. This means there is a way to
place a grade on each sequence of genes. In our example, lets say the ideal
combination is BLUE, BLUE, YELLOW, YELLOW, or 1122: Then a choice of
1432 would get, for example, a grade of 1 because only one window is correctly
chosen.
4. Now is the time for gene-crossing. We select two samples of the population (the
parents) they can be two samples of the population chosen randomly, or we may
choose the two highest ranking ones, then the two next highest ranking -- or any
variation in between such methods. Next, randomly exchange the genes of the
two parents. For example, with a random number generator we select the first
gene to be from parent one if the number is less than 0.5, otherwise it is from the
second parent; continue for the second gene, and so on. This process generates a
new sample, an offspring. We generate several offsprings.
5. Next is time for mutation. First we choose a probability of mutation PMUT: For
each gene of every offspring we decide with a random number generator whether
we will mutate or not. If we mutate, then we exchange that particular gene
randomly with another one (if it is BLUE we mutate it randomly to RED, or
GREEN, or YELLOW).
6. Next we use the evaluator for the offsprings to rank them, and put together
parents and offsprings to form the new population. We throw away the bottom
performers out of the group and retain the top NPOP samples (from the combined
group of parents and offsprings). Next we go back to step 4 and repeat until we
decide that we have converged.
Convergence is usually defined when a large number of the population samples have the
same genes and a high grade (Say half the population). It is possible to have reached a
local maximum if we are not sure, for example, what a perfect score is (in our example
we do, but there are cases when the evaluator gives relative scores only). Mutation is a
way to move out of a local maximum, so it may pay to use, at least initially, a high
probability of mutation, but it may also slow down convergence by moving solutions
randomly around.

EXAMPLE 1: We have four windows (NWIND=4), 3 colors (NCOL=3), a population


size of eight (NPOP=8), and a probability of mutation 10% (PMUT=0.1). The ideal
combination is: 2132.
Only four new offsprings are produced in each gene-crossing and mutation iteration. As
an example, lets see the gene crossing and mutation in iteration 1 out of a population of
eight, ranked as 3 2 2 2 1 0 0 0:
(a) Select as parents the first and third (in order of ranking):
Genes of first:
2 1 2 2
Genes of second: 2 1 1 1
Offspring
2 1 2 1
(b) Next select the second and fourth:
Genes of second 1 1 1 2
Genes of fourth 2 2 3 3
Offspring
1 2 3 2
And so on (since the probability of mutation is low, none of the genes above was
mutated).
The progress of convergence is as follows:
ITERATION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

HIGHEST GRADE MID-POPULATION # OF SAMPLES


GRADE
WITH PERFECT GRADE
3
2
0
3
2
0
3
2
0
3
3
0
3
3
0
3
3
0
3
3
0
3
3
0
3
3
0
4
3
1
4
3
1
4
3
2
4
3
3
4
4
4
4
4
4

Convergence has been achieved practically at the 14th iteration. Four new offsprings are
generated in each iteration, hence 14*4=56 evaluations were made. With an exhaustive
search, 34=81 evaluations would be needed, so this is not a complex enough problem for
genetic algorithms.

EXAMPLE 2: Next we consider a more complex problem with 10 windows


(NWIND=10) and a choice of 4 colors (NCOL=4) for each windw, and mutation
probability of 10%. The ideal combination is: 2132441124. Here is how the solution
evolves with a population of 50 (NPOP=50):
ITERATION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

HIGHEST GRADE MID-POPULATION # OF SAMPLES


GRADE
WITH PERFECT GRADE
6
2
0
6
3
0
7
4
0
7
5
0
7
6
0
8
6
0
9
7
0
9
7
0
9
7
0
10
8
1
10
8
1
10
8
2
10
9
3
10
9
5
10
9
9
10
9
13
10
9
22
10
10
25

The algorithm has converged after 18 iterations, when half the population has a perfect
score of 10. In each iteration 25 new offsprings are generated (half the population)
requiring for convergence an evaluation of 18*25=450 samples; an exhaustive search
would require 410=1,048,576 evaluations. Here genetic algorithms have a clear
advantage, by a factor of at least 2,000.
DISCUSSION
The choice of population size, mutation probability (which may change from a high value
in the beginning to a low value as iterations progress), and algorithm for choosing
parents, affect the success and speed of convergence of genetic algorithms so
experimentation is usually needed.

MIT OpenCourseWare
http://ocw.mit.edu

$ %LRPLPHWLF3ULQFLSOHVDQG'HVLJQ
Fall 2013

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

You might also like