Question

In: Computer Science

9. Explain how Conway’s Life works in the context of cellular automata. Describe the update rules...

9. Explain how Conway’s Life works in the context of cellular automata. Describe the update rules of the Game of Life.

10. Explain how genetic programming can be used to solve problems.

Solutions

Expert Solution

9.

First, let’s get one thing straight. The term cellular automata is plural. Our code examples will simulate just one—a cellular automaton, singular. To simplify our lives, we’ll also refer to cellular automata as “CA.”

In this, our objects (mover, particle, vehicle, boid) generally existed in only one “state.” They might have moved around with advanced behaviors and physics, but ultimately they remained the same type of object over the course of their digital lifetime. We’ve alluded to the possibility that these entities can change over time (for example, the weights of steering “desires” can vary), but we haven’t fully put this into practice. In this context, cellular automata make a great first step in building a system of many objects that have varying states over time.

A cellular automaton is a model of a system of “cell” objects with the following characteristics.

  • The cells live on a grid. (We’ll see examples in both one and two dimensions in this chapter, though a cellular automaton can exist in any finite number of dimensions.)

  • Each cell has a state. The number of state possibilities is typically finite. The simplest example has the two possibilities of 1 and 0 (otherwise referred to as “on” and “off” or “alive” and “dead”).

  • Each cell has a neighborhood. This can be defined in any number of ways, but it is typically a list of adjacent cells.

The Rules

For a space that is 'populated':

Each cell with one or no neighbors dies, as if by solitude.

Each cell with four or more neighbors dies, as if by overpopulation.

Each cell with two or three neighbors survives.

For a space that is 'empty' or 'unpopulated'

Each cell with three neighbors becomes populated.

The Controls

Choose a figure from the pull-down menu or make one yourself by clicking on the cells with a mouse. A new generation of cells (corresponding to one iteration of the rules) is initiated by the 'Next' button. The 'Start' button advances the game by several generations. Game speed is regulated by the speed dial and the size of the cells with the size dial.

10.

The process of using genetic algorithms goes like this:

  1. Determine the problem and goal
  2. Break down the solution to bite-sized properties (genomes)
  3. Build a population by randomizing said properties
  4. Evaluate each unit in the population
  5. Selectively breed (pick genomes from each parent)
  6. Rinse and repeat

When to Use Genetic Algorithms

GAs are not good for all kinds of problems. They’re best for problems where there is a clear way to evaluate fitness. If your search space is not well constrained or your evaluation process is computationally expensive, GAs may not find solutions in a sane amount of time. In my experience, they’re most helpful when there is a decent algorithm in place, but the “knobs” just need to be tweaked.

For Example…

On a recent project, we had an algorithm that we knew would work, but we needed to find the best possible settings for the tune-able parameters.

We were using pressure data from inside a testing lung to parse out breath waves and calculate derived values such as breath rate, tidal volumes, and peak pressures. We had many recordings of pressure data and knew the expected results. The goal was simple: find the set of variables that would get us as close as possible to the expected results. Our properties were a handful of settings for our existing algorithm: low/high thresholds, smoothing factors, averaging window sizes, etc.

A simpler illustration

To walk through how it works, let’s use something a little simpler: a cannon.

Like the old Cannon Fodder game, we have a cannon that has two variables: powder and elevation. Our goal is to shoot as far as possible. (Let’s pretend we don’t know about physics and don’t know that 45 degrees is the answer.)

Our goal: max distance
Our genomes: powder (0-100) P and elevation (-90-90 degrees) E

Initial population

We start by generating a sample population and evaluating its members. Normally, this sample would be much larger, but for our example, we’ll keep it small:

Powder Elevation Distance
5 -90 0
100 30 80
75 44 65
25 90 35
33 70

20

Given these results, we can use an elitist strategy to select the top X percent of the population to “reproduce.” Once selected, we use crossover/recombination to blend the best of the population.


Related Solutions

(a) How Context Free languages are different from Regular languages. (b) What are the automata accepting...
(a) How Context Free languages are different from Regular languages. (b) What are the automata accepting those languages and how they are different from DFA and NFA. (c) How the grammar of Context Free Languages looks different from those in Regular languages.
Explain the concept of consideration. Describe the rules regarding consideration. Explain how the UCC rules regarding...
Explain the concept of consideration. Describe the rules regarding consideration. Explain how the UCC rules regarding consideration are different from the common law rules regarding consideration. Explain the legal effect of a lack of capacity on a person’s ability to enter into a contract. Describe the circumstances under which a party would have limited capacity to enter into a contract. Explain the legal effect of entering into a contract for an illegal purpose. Action Items Research the differences between United...
Diagram and describe how eukaryotic cellular respiration works. Include a labeled diagram of the appropriate cell...
Diagram and describe how eukaryotic cellular respiration works. Include a labeled diagram of the appropriate cell structures. Show where each of the main stages of respiration occurs. (Hints: The book shows several diagrams of various parts of cellular respiration. For this question, I’m asking you to create one integrated diagram that shows all the parts of the process in one diagram. Your diagram can clearly show where everything goes, but you’ll need some text to explain the energy involved. Your...
Question 2 (a) Explain the meaning of the following terms in the context of cellular telephony...
Question 2 (a) Explain the meaning of the following terms in the context of cellular telephony networks: (i) Frequency reuse (ii) Trunking (iii) Micro and macro cells (iv) Umbrella cells Describe the trade-off that must be made when selecting the number of cells which should be clustered together to form a location area in a cellular network. [6 marks] (b) A number of techniques are used on both the base station and mobile station (i) to manage power consumption, and...
Look for a “real life” example of a tracking share and explain how it works. Don’t...
Look for a “real life” example of a tracking share and explain how it works. Don’t forget to cite and reference your source. in 5 to 10 Sentence
look for a “real life” example of a tracking share and explain how it works. Don’t...
look for a “real life” example of a tracking share and explain how it works. Don’t forget to cite and reference your source. in 5 to 10 sentences
Physics Prelab: Magnetism Watch the video on magnetism. Explain how the “two” right hand rules works...
Physics Prelab: Magnetism Watch the video on magnetism. Explain how the “two” right hand rules works –what does each indicate? How do magnetic fields get their start - what causes magnetic fields? What is the force a magnetic field exerts on a charged particle?  Write down the equation and explain the direction. Explain how a solenoid works - how does it produce a magnetic field? What are the five major types of magnetic materials? Describe each briefly.
Describe how a poison could affect the electron transport system in cellular respiration. Explain how it...
Describe how a poison could affect the electron transport system in cellular respiration. Explain how it happens, the result, and give an example. Be specific but can you also dumb it down.
Diagram and describe how uncoupling proteins work, including their effects on cellular respiration. Explain how these...
Diagram and describe how uncoupling proteins work, including their effects on cellular respiration. Explain how these proteins might play a role in thermogenesis and the control of reactive oxygen species such as superoxide. (Hint: you’ll need to explain the ETC and proton gradient for this.) (no bullet points, essay format)
9.) Describe and diagram in detail how a MOS-FET works. Include a description of channel formation...
9.) Describe and diagram in detail how a MOS-FET works. Include a description of channel formation and pinch-off.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT