One objection that has been raised to the Sunburn model as an example of coevolving strings is that it is violent. The author, being a fairly typical re- covering video and war game addict, simply did not imagine that abstract warfare between character strings was offensive. Once made aware that Sun- burn was sufficiently violent to offend some portion of the public, the author put it as a challenge to his students to take the basic notion of Sunburn and find a nonviolent fitness function that could be used to experiment with a similar set of issues. This section is inspired by one of the better attempts to meet the challenge invented by Mark Joenks as a term project for the class.
The essence of Sunburn is to have strings that compete in some fashion and whose genes spell out how that competition is approached by the entities derived from those genes. In this section, we will develop such a model for individuals participating in political campaigns. It is for you to decide whether this is more or less offensive than simulated warfare.
In Sunburn, the character strings had five letters: D, G, L, M, and S. These character strings were developed into abstract models of fighter craft. For our model of political campaigns we need a new alphabet as follows: Adopting popular programs,Bribing,Doing what your opponent did in the last move of the campaign,Fund-raising, Laying low, Negative campaigning, Pandering, and having aScandal. The artificial agents in this simulation of politics will be calledvirtualpoliticians, orVIPs.
Of prime importance in evaluating a character string representing a VIP is our model of the behavior of the electorate. Our fitness evaluation, still used for gladiatorial tournament selection, will run through the campaign
Sunburn: Coevolving Strings 115
season. At regular intervals, the genes of each of our virtual politicians will be expressed, one location at a time, in order. A series of variables will change value during the campaign, depending on the actions of the competitors. At the end, the electorate will vote, probabilistically, deciding the contest. The state variables stored for each candidate are given in Table 4.1.
Credentials C the candidate’s standing with his single-issue voters Credibility R the candidate’s perceived ability to serve competently Name RecognitionN related to being recognized by a voter
Scandal Factor S the degree to which the candidate is tainted by scandal Finances B powers everything else
Table 4.1. State variables for VIPs.
The way we initialize the candidates’ state variables describes how the candidates start the campaign season. We update the variables according to the following rules, as we scan down the candidate’s gene strings.
Rule 1.Credentials, credibility, name recognition, and scandal factor all un- dergo exponential decay. At the beginning of each period of the campaign, they are multiplied byrC,rR,rN, andrS, all smaller than 1. Since the voters have short memories for anything complicated, we insist that
rN > rR> rC > rS.
Rule 2. Finances grow exponentially. At the beginning of each period of the campaign, a candidate’s money is multiplied by rF, bigger than 1. This represents fundraising by the candidate’s campaign organization.
Rule 3.Adopting a popular program adds 2 to a candidate’s credibility and subtracts 1 from his credentials. If he has at least half as much money as his opponent, it adds 2 to his credibility and subtracts 1 from his credentials. Otherwise, it adds 2 to his credibility and subtracts 1 from his credentials (he swiped the idea).
Rule 4.Bribing either subtracts 5 from a candidate’s finances or cuts them in half if his total finances are less than 5. Bribing adds 5 to his credentials, 2 to his scandal factor, and 1 to his name recognition.
Rule 5. Doing what a candidate’s opponent did last time is just what it sounds like. On the first action, this action counts as laying low.
Rule 6.Fundraising adds 3 to a candidate’s finances and 1 to his name recog- nition. It represents a special, personal effort at fundraising by the candidate. Rule 7. Laying low has no effect on the state variables.
Rule 8.Negative campaigning subtracts 1 from a candidate’s credibility and credentials and adds 1 to the other candidate’s credentials. If he has at least half as much money as his opponent, then this goes his way. Otherwise, it goes the other candidate’s way.
Rule 9.Pandering adds 5 to a candidate’s credentials, 1 to his name recog- nition, and subtracts 1 from his credibility.
Rule 10. Scandal adds 4 to a candidate’s name recognition and subtracts 1 from his credentials and credibility.
Once we have used the rules to translate the VIP’s genes into the final version of the state variables, we have an election. In the election, we have 25 special-interest voters aligned with each candidate and 50 unaligned voters. Each voter may choose to vote for a candidate or refuse to vote at all. The special-interest voters will vote for their candidate or not vote. For each voter, check the following probabilities to tally the vote.
A special-interest voter will vote for his candidate with probability Pspecial = e
C−S
2 +eC−S. (4.1)
An unaligned voter will choose a candidate first in proportion to name recognition. He will vote for the first candidate with probability
Punaligned = e
R−S
3 +eR−S. (4.2)
If not voting for the first candidate, the voter will consider the second can- didate using the same distribution. If he still has not voted, then he will repeat this procedure two more times. If, at the end of 3 cycles of consideration, he has still not picked a candidate, the voter will decline to vote. The election (and the gladiatorial tournament selection) are decided by the majority of voters picking a candidate. If no one votes, then the election is a draw. Experiment 4.11 Using the procedure outlined in this section, create an evolutionary algorithm for VIPs using gladiatorial tournament selection on a population of 200 VIPs. Use two-point crossover on a string of 20actions with two-point mutation. Set the constants as follows: rN = 0.95, rR = 0.9, rC= 0.8,rS = 0.6, andrF = 1.2. Use uniform initial conditions for the VIPs with the state variables all set to 0, except finances, which is set to4. Perform 100 runs lasting for 20,000 mating events each. Document the strategies that arise. Track average voter turnout and total finances for each run.
There is an enormous number of variations possible on the VIP evolu- tionary algorithm. If you find one that works especially well, please send the author a note.
Sunburn: Coevolving Strings 117
Problems
Problem 159. Essay. Compare and contrast the Sunburn and VIP simula- tors as evolving systems.
Problem 160.The choices of constants in this section were pretty arbitrary. Explain the thinking that you imagine would lead to the choices for the four decay constants in Experiment 4.11.
Problem 161.Explain and critique the rules for the VIP simulator.
Problem 162.In terms of the model, and referring to the experiment if you have performed it, explain how scandals might help a candidate. At what point during the campaign might they be advantageous?
Problem 163. Essay. The VIPs described in this section have a prepro- grammed set of actions. Would we obtain more interesting results if they could make decisions based on the state variables? Outline how to create a data structure that could map the state variables onto actions.
Problem 164.Cast your mind back to the most recent election in your home state or country. Write out and justify a VIP gene for the two leading candi- dates.
Problem 165.The VIP simulator described in this section is clearly designed for a two-sided contest. Outline how to modify the simulator to run a simu- lation of a primary election.
Problem 166.We have the electorate divided 25/50/25 in Experiment 4.11. Outline the changes required to simulate a 10/50/40 population in which one special-interest group outnumbers another, but both are politically active. Refer to real-world political situations to justify your design.
Problem 167.Analyze Equations 4.1 and 4.2. What are the advantages and disadvantages of those functions? Are they reasonable choices given their place in the overall simulation? Hint: graph f(x) = c+exex forc= 1,2,3.
Problem 168.Should the outcome of some actions depend on what the other candidate did during the same campaign period? Which ones, why, and how would you implement the dependence?
Small Neural Nets : Symbots
In this chapter, you will learn to program a very simple type of neural net with evolutionary algorithms. These neural nets will be control systems for virtual autonomous robots calledsymbots, an artificial life system developed by Kurt vonRoeschlaub, John Walker, and Dan Ashlock. These neural nets will have no internal neurons at first, just inputs and outputs. The symbots are a radical simplification of a type of virtual robot investigated by Randall Beer and John Gallagher [12]. Beer and Gallagher’s neural robot has six neurons. It performs well on the task of finding a single signal-emitting source. In an attempt to discover the “correct” number of neurons, a series of experiments was performed in which neurons were removed. Training time declined with each neuron removal, leading to the zero-neuron symbot model. Chapter 11 explores the evolution of more complex neural nets.
Symbots have two wheels and two sensors, as shown in Figure 5.2. The sensors report the strength of a signal field at their position. The sensors can be thought of as eyes, nostrils, Geiger counters, etc.; the field could be light intensity, chemical concentration, the smell of prey, whatever you wish to model. The symbot’s neural net takes the sensor output and transforms it into wheel drive strengths. The wheels then cause the symbot to advance (based on the sum of drive strengths) and turn (based on the difference of drive strengths). Computing a symbot’s motion requires simple numerical integration. A model, called a kinematic model, of the forces acting on the symbot is what the numerical integration operates on to produce the symbot’s motion.
In the course of the chapter, we will introduce a new theoretical concept, the lexical product of fitness functions, which is used to combine two fitness functions in a fashion that allows one to act as a helper for the other. The lexical product is of particular utility when the fitness function being maxi- mized gives an initial value of zero for almost all creatures. Figure 5.1 gives the dependencies of the experiments in this chapter.
We will start with the problem of finding a single signal source as in Beer and Gallagher’s initial work. We will then train symbots to find and eat
120 Evolutionary Computation for Modeling and Optimization
Exp 5.1 Exp 5.2
Exp 5.3 Exp 5.6
Exp 5.4 Exp 5.5 Exp 5.8 Exp 5.10 Exp 5.9 Exp 5.15 Exp 5.16 Exp 5.17 Exp 5.12 Exp 5.13 Exp 5.14 Exp 5.11 Ch 13 Exp 5.7
1 Basic symbot motion loop.
2 Evolving symbots.
3 Alternative fitness function.
4 Exploring symmetry.
5 Introduction of lexical product fitness.
6 Multiple signal sources.
7 Using roulette selection.
8 Exploring different types of walls.
9 Evolving sensor locations.
10 Evolving body size.
11 Symbots with three sensors.
12 Moving sensors with a control neuron.
13 Two neuron symbots.
14 Alternative neural transition function.
15 Clear-the-board fitness.
16 Polysymbots: multiple symbots per gene.
17 Coevolving populations of symbots.
Fig. 5.1.The topics and dependencies of the experiments in this chapter.
multiple sources. It is in this context that we explore lexical fitness. We then examine allowing the symbots to evolve their bodies and their control nets. We conclude by attempting to involve groups of symbots that work together (or at least avoid obstructing one another).
In the more complex virtual worlds explored here, like the worlds with multiple signal sources, symbots display what appears to be complex behav- ior. Since this behavior is the result of simply numerically integrating a linear control model, it follows that the complexity is being drawn from the symbot’s
environment. The extreme simplicity of the symbots permits them to evolve quickly to have a desired behavior. Likewise, symbot movement is computa- tionally trivial to manage, and so swarms of symbots can be used in a given application.