Your Game of Life

John Conway made up the rules for the game of life by fiddling around until it looked good. Why not make your own game of life and change the rules?

Your Game of Life

For the unfamiliar, Conway’s Game of Life is a cellular automaton. It’s pretty neat and you should read the Wikipedia article on it. The original game has 4 very specific rules that were formulated by John Conway. After watching the video above, I wondered what it would look like if you changed those rules. My implementation was forked from steelerose. I pretty much just stripped it down and added the ability to adjust the constants that govern behavior. If you want to mess with it, you can check out the code here.

A friend of mine linked me to this neat article on the edge of chaos which I think is relevant.

Interesting Technical PDF Roulette

I read a lot, but I don’t always have time to read an article or paper as soon as I come across it. Instead, I add it to a folder in my Dropbox called “To Read”. Once I read something that’s in there, I move it to my “Already Read” folder, in case I want to search for it again. One trick I like to use is instead of bookmarking a site that I want to read later, I print it to a PDF and save it in my “To Read” folder for later. That way if the site goes offline or gets buried in a pile of bookmarks, I won’t lose it. Last night I thought it would be fun to make Interesting Technical PDF Roulette. I moved all of the PDFs in my “Already Read” and “To Read” folders into a directory on my server and wrote a simple page to serve you a random PDF from that directory. If you want to check it out, it’s here. I’ll be updating the list as time goes on. I also didn’t read protect the directory that they’re in, so if you want to wget them all, that’s fine, but if the bandwidth is really terrible, that probably means someone else is doing the same thing, so please be kind and try again later.

What a Soviet spacecraft on Venus can teach you about failure

The 1960′s and 70′s were a frenzied time for spacecraft engineering. It was a field that had just been invented, and putting machines into a new extremely harsh environment required new methods, materials, and tools, and no one had very much experience. The Space Race was in full swing as the US and USSR rushed to get things launched both to assert their country’s dominance, and as a reaction to the possibility that the other might be developing a space warfare capability. [Read more]

 

What would it take to build a “Pacific Rim” robot?

Disclaimer: I don’t work for any company involved in Pacific Rim, I just think robots are cool.

If you haven’t seen the trailer for Pacific Rim, check it out here:

My friend John wanted to know a little more about what it would take to make one for real.

coog

So what would it take to build one for real? Well, according to these stats, the robots in the movie are around 250-280 feet tall. The closest real life analog to that is probably a Virginia class nuclear submarine. A nuclear submarine is slightly longer, but it’s got a similar density of material and technical sophistication that a giant robot might have. This should give you an idea of the scale (those are people standing on the top there):

nssnvirginia_2

According to the released “schematics” from the movie studio, the robots are powered with a nuclear vortex turbine and the actuators are hydraulic. I’m not sure what a nuclear vortex turbine is, but driving hydraulic actuators with a nuclear reactor isn’t totally implausible. One of the tricks in building a humanoid robot is having REALLY powerful actuators, specifically a large amount of torque. With robots at this scale, limbs will be very heavy and need a lot of torque just to hold still, let alone fight giant monsters. A Virginia class submarine costs $2.6 billion to build (in 2012 dollars). I think a Pacific Rim robot would cost slightly less because it’s a bit smaller and has a smaller armament. Most other things would be surprisingly similar though. It would have similar armor, radar, and communications equipment. And of course, it would have a similar compact nuclear reactor. The S9G reactor onboard a Virginia class submarine can output 29.8 MW and deliver 40,000 shaft horsepower, which would probably be enough to power a Pacific Rim robot.

Now, we’re getting pretty good at building humanoid robots, but it’s very hard to do. Some of humanity’s best humanoid robots so far include Hubo, Petman, Asimo, and the recently revealed Atlas. Walking is hard. It’s not until you’ve tried to make a robot walk that you realize how good humans are at it. I experienced this while working on the DARPA Virtual Robotics Challenge at Georgia Tech. Georgia Tech also has a real humanoid robot performing the DRC tasks (which include turning a valve, smashing down a wall, clearing rubble, using a drill, driving a car, opening a door, and lots of other hard tasks). Unfortunately, I can’t talk about the work being done just yet. Anyway, there are a couple of ways to make a robot walk. One way is using something called ZMP walking. ZMP stands for zero moment point. To make a robot stand up, its center of mass must be within its polygon of support, which is an imaginary 2D plane that ensures there robot remains statically stable. Once the robot starts moving, the challenge is to find a set of trajectories that keeps the robot from losing its balance and falling over. A similar problem in this space is the inverted pendulum problem. The zero moment point is the point where the foot hitting the ground does not produce any horizontal moment and the sum of the vertical inertia and gravity is zero. This is only part of the problem though: you also have to have a path planner that decides where the feet should attempt to land and thus what direction it should walk as well as inverse kinematics (either numeric or analytical) to figure out how to position the actuators in the leg to get the foot to that point. You also will typically have lots of sensors and a feedback loop to be able to take into account external disturbances to the system like an uneven ground or something hitting your robot. After all of that, you end up with a ZMP walk that looks something like this:

You’ll notice his walking looks extremely, well, robotic. Compare it to another form of robot walking, passive dynamic walking:

That looks much more human. While terribly named, passive dynamic walking can be done without active power. In the video, the robot is being pushed by the engineer which provides it with the energy to walk. Theo Jansen’s Strandbeests are another example of a passive dynamic walker. Real human walking has a component of this to it, as the leg swings rather than remain continuously driven by muscles. However, ZMP walking can look pretty lifelike, as PETMAN shows.

The walking in Pacific Rim looks pretty human like, and we’re meant to believe that walking is teleoperated by the drivers in the head of the robot. Teleoperating the robot with haptic feedback is a pretty cool idea and it’s been done before. However, directly controlling walking like they show in the movie wouldn’t work because the polygon of support and ZMP would be different for a person and the robot since they’re different sizes and densities and have limbs of different lengths. However, there’s still a way it could work. If the teleoperation rig in the head of the robot was only using the human’s legs to determine relative parameters of the ZMP walking algorithm, you would get a similar effect to directly controlling the legs. A ZMP walking algorithm can take in parameters like stride length, duration, and height. By mapping those relative parameters from the operator to the robot, the robot would walk in sync with the operator. According to the movie, there is a brain interface to the robot which is too heavy for a single person, so there are two pilots, one for each brain hemisphere. There’s a great article over at IEEE on how that might work.

To actually construct a Pacific Rim robot, the Vehicle Assembly Building at Kennedy Space Center would be a good spot to put it together. It’s plenty large enough (maybe even big enough for a couple) and has all the necessary cranes and scaffolding as well as doors big enough to get it out once it’s put together.

VAB_aerial_1977

How long would it take to build? Well, a Virginia class submarine takes 9 million man hours to build over 6 years. It also takes 134 people to crew it and control all of the complicated systems to make the submarine function. I think it’s likely that a Pacific Rim robot would require a mission control of a couple people to watch and control other vital systems that the two pilots of the robot couldn’t.

Summary
Cost: $1.8 billion
Total construction time: 5 years
Crew: 2 pilots, 5 remote mission controllers

Soylent Measuring Cups

Soylent is a crazy idea to replace food with a drink that contains all the nutrients the body needs. The team behind Soylent asked me to make some 3D printable measuring cups of non standard volumes for them. You can download the CAD here. I included the STL for printing and the SolidWorks file so you can re-export the STL if you need to.

The sizes are 4/3 cups, 4/3 tablespoons, and 5/32 teaspoons, from largest to smallest. The reason the handles are long is so you can print it without using any support material. The big one isn’t hard to grip, it’s just different. I printed these in ABS on a Lulzbot 3D printer with about 50% infill. You can probably get away with less. These are NOT bacteria resistant as is. There are lots of little pits and grooves that bacteria could get in. Coating the inside with acetone to smooth it would help, but if you want to be really safe, use a food safe coating. ABS and PLA are not rated as food safe by anyone, but you also probably won’t die or get poisoned by it. People print cookie cutters and shot glasses and stuff all the time and really the bacteria would be a bigger potential problem. But you probably don’t want to be that guy who has to explain to the toxicologist that a stranger on the internet said it would be fine. The safest way to print these is in a safe material like HDPE or PET, or to correctly coat them. You can also use them as positive molds if you want to use a different process. How these will fare in heat depends on what you print them out of and if/how you treat them afterwards. The ones in the picture made from ABS (same plastic as Legos) are very sturdy and you’d probably have to stomp on them with boots to break them.

Manufacture and use these at your own risk and be safe.

b2bc43b90192a40c

Analyzing Trinitite: A (Radioactive) Piece of Nuclear History

On July 16, 1945, the United States became the first country to successfully detonate an atomic weapon, signalling the beginning of a new era in warfare and in politics. This detonation took place in the middle of the New Mexico desert, with the bomb placed carefully atop a 100 foot tower. The bomb, nicknamed “Gadget”, had a yield equivalent to 20,000 tons of TNT. Just 24 days later, a functionally similar bomb (using Plutonium, unlike the Uranium bomb at Hiroshima) was dropped on Nagasaki.

No one was completely sure what would happen when Gadget went off. For a while, there was worry that the chain reaction would be unstoppable and react with the entire atmosphere. Before the test, Enrico Fermi took bets from some of the physicists and high ranking military personnel on whether the bomb would destroy the whole state of New Mexico, or the entire planet. The math seemed to show fairly conclusively that the world wouldn’t be destroyed, but a lot of the guards who didn’t know that became anxious. Kenneth Bainbridge, director of the Trinity Project, was not amused with Fermi scaring all the guards.

When the bomb was detonated, it left a crater of radioactive glass in the desert that was 10 feet deep and 1100 feet wide. About 240 people on the project directly watching the blast reported the early morning dawn being lit up brighter than full daylight for one to two seconds and felt a wave of heat roll over them that was “as hot as an oven”, even at a distance of 10 miles away. The shock wave took 40 seconds to propagate to the observers and was felt up to 100 miles away. The enormous mushroom cloud was 7.5 miles high. It was at this point that Bainbridge remarked to Oppenheimer, “Now we are all sons of bitches.” Oppenheimer later spoke his famous line, “Now I am become Death, the destroyer of worlds”, a quote from the Bhagavad Gita.

This famous picture was taken 16 milliseconds after the Trinity bomb exploded. Trinity_Test_Fireball_16msTrinity_crater_(annotated)_2 Trinity-ground-zero-men-in-crater That’s the hypocenter of the blast. Once the public found out about the bomb and where it was detonated (sometime during the late 40′s), they began traveling to the site and collecting the glass as souvenirs for themselves and to sell to tourists and collectors. This area was still lightly radioactive, and the government didn’t like the fact that people were carting off lots of the stuff or sniffing around their test sites. In 1953, the government bulldozed the site, burying any glass that was left and fenced off the area. A law was passed making it illegal to collect samples from the area. The only exception was that it was legal to buy and sell the glass that had already been collected and was already on the market. People began calling the collectible glass “Trinitite”.

The Artifact

You can still buy Trinitite today, on places like eBay or from mineral collectors. You can also buy it from United Nuclear, which is where I got my sample. United Nuclear makes two claims that I wanted to verify: that the sample was real and that the radiation level was safe. Apparently lots of people sell fake Trinitite, because it’s easy to fake and people will buy it. United Nuclear says that they check all the Trinitite they buy with a mass spectrometer to verify authenticity. Here’s what my sample looks like: 2013-02-21 20.32.05 As an undergrad at Georgia Tech, I have access to some unique resources. One of my friends happens to be studying Nuclear and Radiological Engineering, so I asked him if he could measure my sample with a Geiger counter to make sure I wouldn’t get cancer or to confirm that I would get super powers with this thing sitting in my room. He grinned and said, “Oh, we can do better than that.”

The Experiment

After talking to his professor, he got permission to run a bunch of tests on my sample for his lab class. It turns out that a Geiger counter wouldn’t be able to tell me very much about the sample, including how dangerous it really was. Instead, a high purity Germanium (HPGe) detector was used. HPGe detectors are large, expensive machines that must be cooled with liquid nitrogen. Here’s a cross section of a commercially available detector:

“Coldfinger” is also the name of the villain in the next James Bond movie.

Because the detector is so cold, electrons have a lower probability of escaping, which allows for a higher resolution and higher efficiency. The reason Germanium is used is because of its useful properties as a semiconductor. As incoming radiation hits the Germanium, it creates free electrons and holes. An electric field across the Germanium causes all of the electrons to get pushed to one side, creating a current. This current is proportional to the number of holes created, which is proportional to the energy of the incoming radiation. This current is read with a Multiple Channel Analyzer (MCA) that bins the energy from the detector into multiple channels. The efficiency of an MCA changes based on the energy range, so they must be calibrated with known radiation sources before use. To determine if my sample was really from the Trinity test, its activity can be compared to the activity of specific radionuclides measured from glass collected at several other test sites. Gamma spectroscopy can be used to produce a plot that’s a little easier to visualize. To perform the experiment, the MCA was set at 4096 channels with a live time of 120 seconds and calibrated. The sample was placed in the shield surrounding the detector and measurements were taken for 80,000 seconds (22 hours). The sample was then removed and a background measurement was taken for 80,000 seconds.

Results

Here are the results, along with data from other test sites (as of 2013): table Note that percent error here is not standard deviation, it’s how much the measured sample deviates from a known sample. Here is the measured spectrum: spec2 Analysis

The interesting peaks here are Cs-137 at 661.5 keV, Am-241 at 59.4 keV, and K-40 at 1400 keV. The specific activity of Co-60 is very low, which is the biggest clue that the glass was collected from Trinity, rather than another location. For example, at Reggane, Co-60 is 207.2301 Bq/kg as of 2013, while Trinity is closer to 7.771128 Bq/kg. The activity we see here is 1.0 ± 1.0 Bq/kg, which suggests that my sample from United Nuclear is real and came from Trinity! The other thing this data lets us do is see how dangerous the radiation from my sample is. To do this, we simply sum up the counts collected at every energy and divide by the amount of time the sample was measured to get an energy indiscriminate counts per minute. It turns out my sample has a total gamma activity of 1183.29 CPM ± 5.43 CPM. So how do we know if that’s dangerous? That’s a little difficult to answer, because CPM is relative. The type and energy of the radiation matters enormously. This analysis only looked at gamma radiation, since that’s the kind of radiation that is extremely penetrating and difficult to shield. However, gamma radiation is not as damaging as other forms of radiation of the same energy, like neutron radiation. My sample also emits alpha and beta particles, but they are very short range and are easy to block. Alpha radiation can’t penetrate your clothes and beta radiation can be stopped with only a few millimeters of aluminum. So, ignoring alpha and beta radiation, the damage gamma radiation does increases with energy, and we have a wide range of energies in this sample. If we assume all the gamma rays are 661.5 keV from the Cs-137 and you are 1 cm from the source:

eq1

The attenuation of photons in water (which closely approximates human tissue) is: eq2 Multiplying those two numbers gives 5.49*10^-13 Gray/second, or 1.73*10^-5 Gray/year. The conversion factor from Grays to Sieverts is 1:1 for photons. 100 Rem is a Sievert. This means that if you keep this sample 1 cm away from you for the rest of your life you will receive 1.73 milliRem per year.

To put that in perspective, the annual background dose is about 2.2 mSv, or 220 mRem. The extra dose you would receive from the Trinitite is about 2 orders of magnitude less than the background dose. In fact, the total dose you receive from sleeping next to someone for 8 hours every night for a year is about 2 mrem, so I would get the same exposure if I cuddled up with a person OR a vial of radioactive glass every night. In other words, it’s safe to store my sample on the shelf in my room.
But what about the other energy levels, like that thing up near 1500 keV? If you do the math, you’ll find that it gives you a much higher dose than the Cs-137, even though it has a lower count. Well, that thing at 1500 keV is K-40, which undergoes beta decay, and that radiation is blocked by the container the sample is in. The reason the radiation dose calculation was done with Cs-137 is because it’s the highest energy isotope that undergoes gamma decay, which is difficult to shield. The reason we see such a large spike of K-40 is because it is one of the largest natural sources of radiation, found in dirt and food and humans. There are lots of really confusing units for dealing with radiation, but one of my favorite units is the Banana Equivalent Dose, which is a measure of the radiation dose (emitted mostly by K-40) that you are exposed to from eating one banana.
If you're lonely, you can eat 200 bananas to get the same effect as sleeping next to someone.

If you’re lonely, you can eat 200 bananas to get the same (radiation) effects as sleeping next to someone.

Now, there is one instance where my sample would be dangerous to your health. Unlike a banana, if you were crazy enough to eat some Trinitite, your risk of cancer would go way up. One of the biggest reasons for that is because the isotopes that undergo alpha and beta decay would now be directly interacting with your tissues. That can be really bad. For example, one of the biggest risks would be Strontium-90, which emits beta radiation. The nickname for Strontium-90 is “bone seeker”, because it behaves biochemically similar to calcium, so almost all of it that remains in your body deposits into your bones and will give you bone cancer.

Bonus Points

There’s one more really neat piece of information we can pry out of the data. A naturally occurring isotope in soil is Eu-151. When Eu-151 captures a neutron from, say, a nuclear explosion, it turns into Eu-152. That’s a great way to estimate the neutron fluence (which is neutron flux integrated over time). So, if we can estimate the neutron fluence of my sample, and since we know how neutrons are emitted by the explosion at different distances, we can estimate how far away from ground zero my sample came from.

The math gets a little hairy here, so get ready.

Eu-151 undergoes an (n,γ) to make Eu-152 (it captures a neutron). The specific activity of Eu-152 is given by this equation:

eq3

Where φth is the thermal neutron fluence rate (n cm-2 s-1), a is the isotopic abundance of Eu-151, NA is Avogadro’s constant, M is the atomic mass of europium, c is the Eu concentration in the soil, σth is the thermal microscopic cross section of the (n,γ) reaction, CR is the cadmium ratio for a nuclear reactor, and T1/2 is the half-life of Eu-152. From [3], σth = 5300 barns, CR = 43, and c = 1.2 ppm. The cadmium ratio approximately accounts for the contribution of fast neutrons to the production of Eu-152.

After calculating the flux, one can solve for the distance from ground zero via this equation:

e14

The specific activity of the Eu-152 was calculated by dividing the net counts by the duration of time over which it was counted, the mass of the sample, the efficiency for the energy of interest, and the branching ratio for the decay mode of interest.

eq5

After decay correcting the specific activity to the time of the explosion (68 years) and solving for the flux:

eq6

Solving for the distance from the center of the explosion:

eq7

Solving for the distance from ground zero:

eq8

So my sample was collected about 76 meters from ground zero. That means it came from somewhere along this circumference:

collection

Future Work

Some kinds of Trinitite formed from sand on the ground turning to glass, and other kinds formed from sand being drawn up into the explosion, turning to glass, and then raining back down. If my sample was formed on the ground, we would expect the distribution of radionuclides would have an approximately continuous gradient. If it formed in the air, there would be a discontinuity in the distribution. This could be estimated with beta spectroscopy on each side of a sample. If the activity is spatially uniform, then the radionuclides are uniformly distributed. For this experiment, only gamma spectroscopy on one side was performed, so it’s unclear how my sample formed. However, a lot of the pieces in my sample appear large and flat, like they flaked off of the surface of the desert, so I would hypothesize that it formed on the ground. I would expect them to be rounder if they formed in the air.

Conclusion

It’s interesting to think of all the time and effort and money that went in to making the device that created Trinitite. It’s like I have a little vial of second order creations by Fermi and Feynman and Oppenheimer. I learned a lot about radiation physics and now I have a nice test radiation source for other projects that is pretty well characterized.

References

None of this would be possible without Nicholas Piper, who collected the data, performed analysis, and answered my questions. Also, thank you to his lab partners, Catherine Bartgis, Akshat Bhatnagar, and Benjamin Bane.

1. Tsoulfanidis, Nicholas, and Sheldon Landsberger. Measurement and Detection of Radiation. 3rd ed. Boca Raton, FL: Taylor and Francis Group, 2011. 384-385. Print.

2. Belloni F, Himbert J, Marzocchi O, Romanello V. “Investigating incorporation and distribution of radionuclides in trinitite.” May 5, 2011. Journal of Environmental Radioactivity, 2011.

3. Parekh P, Semkow T, Torres M, Haines D, Cooper J, Rosenberg P, Kitto M. “Radioactivity in Trinitite six decades later.” Wadsworth Center. University at Albany. Journal of Environmental Radioactivity, 2005.

Other interesting Trinity videos


Cosmic Microwave Background

The Planck Project recently published the most complete view of the cosmic microwave background yet. I thought it would be cool to show it with three.js on a sphere, so I used ImageMagick to transform the 2D Mollweide projection into a square image to use as a texture. Here’s the version I made. I noticed that my image transform still had one hole and some distortion near the poles. I contacted the people at the Planck Project who confirmed that the original image was a Mollweide projection, so I’m not sure why that distortion is there. About 24 hours after I hacked that together, I found thecmb.org, which did a MUCH better job than I did. I recommend you check it out, because it’s really neat. He even lets you scroll through the different spectral captures. His sphere also has a blurry patch that looks like it’s hiding the same kind of problem I was having. This is the page NASA has on how the data should be projected. If anyone knows what’s happening here, let me know. Here’s another neat page I found that shows 2D maps and lets you fade through different frequencies. So cool!

Wait or Walk


I built a little web app over Spring Break called Wait or Walk. The bus stops at Georgia Tech tell you how long it is until the next bus, but I realized one day that you don’t really care about that information. What you want to know is if it’s quicker to wait or just to walk. So I wrote a tool to answer that question. Wait or Walk calculates the time until the next bus and adds the time it takes the bus to get to your destination, plus time for stops, and then compares that to the amount of time it would take to walk. It uses NextBus to get bus times and an offline Google distance matrix call to get walking and driving times. It will also see if it’s cold or rainy outside and tell you the wait time if you want to stay warm/dry. It only works for Georgia Tech right now, but the idea can be pretty easily extended to other public transit systems, especially ones that are tracked on NextBus. The backend is written in Python using Flask and the frontend is all just javascript.

Code is here.