Sunday, November 6, 2016

A Proposal to Fix an Unnecessary Freeway back up in the Bay Area.

Why did they screw up my freeway when they put in a diamond lane?

I've seen this referenced in the local RoadShow columns.   Highway 280 going south backs up behind Magdelena Road exit in Los Altos Hills, just past Foothill College. This is kind of amazing since 1/4 mile past Magdelena road there is an extra inserted diamond lane? Why would adding a lane back up traffic? The answer it doesn't. The backup occurs because the the last two exits both shave an entire lane off of the freeway.

Displaying screenshot-www.google.com-2016-11-06-14-47-36.png


It's straightforward to do the math that these two exits become the bottlenecks when the freeway is near to capacity load elsewhere. Four lanes of traffic cruise along at 65 mph, bumper to bumper. Unless there was an an entire lane of exiting cars at full speed exiting the freeway (which there isn't, this is pretty much the middle of nowhere) this will obviously be a bottleneck and limit the throughput of the freeway. It's a simple queueing problem.  I guess they don't teach queueing to traffic engineers.

Ah, but you say they do teach queueing to traffic engineers.  So what are they trying to optimize when they design a freeway system? You've got a couple of choices. You can minimize travel time at a certain time of day or you could maximize carrying capacity. This design does neither. Are they purposely slowing down traffic before the diamond lane starts? Seems misguided, but there doesn't appear to be any other choice.





In my opinion, you should minimize the travel time (which means maximizing the average speed.) This will give you a large throughput also, probably very close to the maximum. The remarkable things about these intersections is that they have been purposely designed to cause a traffic jam. I defy anyone to come up with another explanation.  As we can see in the curve above, the WDOT claims that maximum throughput of 2200 cars per hour per lane occurs at 45 MPH and drops to half that amount at 30 MPH and 60 MPH. The latter because the spacing between vehicles increases, the former because you're just going too damn slow.




So Let's look at throughput predicted. One lane goes away to an exit, cutting the flow from four to three lanes. Then the onramp merges into those three lanes, then 1/4 mile down the road you get a fouth diamond lane back. What a nightmare.





Without the disappearing lane the maximum throughput would be 8800 cars per hour, just like it is everywhere else on 280, except for these two intersections. However, there's now a missing lane. What does this cause? First we make the assumption that Exit Flow is less than the lane flow, in fact it can only be half because it comes to a light.  And that's being generous. So this lane backs up.

We use the following notation:
  • Arrival Rate =  = 2200 cars per hour
  • Departure Rate =  = 1100 cars per hour
Utilization Rate  = 2
So the expected average number of vehicles in the line is = 0? No, there's a divide by zero error (this formula is only good for when the utilization rate is less than 1, otherwise it predicts an infinite number of vehicles in line), the exit lane has infinite backup, you keep adding more cars than you take off. So if you take off exactly half of the cars you get an infinite backup. Great. Seems like a bad idea. So, let's assume that you take off a little bit less than half. The other cars have to merge into the lane next to them. Overloading that lane and driving it to a halt. No matter what you do here, the size of these exit lanes will cause a backup here at capacity. How could you get rid of it? 

Pave the lane through. That way you get exactly what you have everywhere else. Same throughput as before and you can control the back up by on ramp lights. Why don't they do this? Who knows. There's plenty of paved space. It used to be this way. They ran out of paint?
I say we should do an experiment. There are two similar to this in front of the diamond lane. Let's change the last one and see if the backup disappears. All it takes is some paint and some Bott's Dots. It should be easy. Don't tell me about it until it's done. You might need a sander, some pry bars, epoxy, a cement cutter. Okay, it's harder than it looks, but if they can do it san francisco, we can do it in Los Altos.
One of my employees, in his spare time is writing a tool that gives the average travel time between any two points on a google map (He wants to drive to work at the time that miminizes his wasted car time.) We can use this to measure the before and after speeds and capacity. If adding a lane doesn't increase the throughput... I'll not encourage anyone to do the same thing at the previous intersection. 
Time for some public activity on the roads. 
Thanks for reading,
 -Dr. Mike





Monday, September 5, 2016

Fast and Slow Thinking: Why sophisticated language makes us human.

There are essentially three different systems in the brain.

1. Fast thinking neural nets (emotions), systems that integrate sensory signals and put out a signal that indicates something else. We can't 'see' inside these systems, we can only believe their outputs are appropriate or not.

2. Slow thinking memory that uses language and ideas to make estimates and calculate future possibilities.

3. You. The thing that decides what to think about.

We know almost exactly how systems 1 & 2 work.[1]  We've given out several nobel prizes for these topics. We reproduce them in the lab and we make them better every day. We use artificial versions of them to make our lives easier every day. (Have you used Google search lately?) And they'll continue to get smarter, faster and more reliable.

We also recognize that system 2, which relies on language, is what makes us most diffrerent fromt he rest of the species on this planet.

However, we have little idea of how system 3 works. Maybe that's best. If we don't have a system 3 then we don't have to worry about the systems 1 & 2 becoming 'super intelligent' and taking over the world.  They remain black boxes that can 'think' faster than we can, but have no motivation.

Thanks for reading,
 -Dr. Mike


[1] Thinking, Fast and Slow, Daniel Kahneman, published by Farrar, Straus and Giroux; Reprint edition (April 2, 2013) 
  • ISBN-10: 0374533555
  • ISBN-13: 978-0374533557

SETI - A new proposal to search for extraterrestrial intelligence.

Why don't we see any aliens?

A significant problem is the vastness of space. Despite piggybacking on the world's most sensitive radio telescope, Charles Stuart Bowyer said, the instrument could not detect random radio noise emanating from a civilization like ours, which has been leaking radio and TV signals for less than 100 years. For SERENDIP [A3] and most other SETI projects to detect a signal from an extraterrestrial civilization, the civilization would have to be beaming a powerful signal directly at us. It also means that Earth civilization would only be detectable within a distance of 100 light-years.[89]
"With available instruments we are unlikely to detect Earthlike planets or civilizations," Airieau said. "This sort of detection will not come within our realm for another few decades." c. 1998.

The only thing that overcomes the vastness of space is the vastness of time.  The best way to detect alien civilizations is to send something to where they are, to get closer to the signals, then they'll be easy to detect. This is what we have been doing and will continue to do as long as we can.  We've been sending robots out to our solar system and beyond.  Let's assume this continues for millions of years. What would be the state of the galaxy after those millions of years?

There would be a robot in every star system.

Image result for curiosity rover pictures
We build killer robots, won't everyone else?
What does this imply? This implies that there is an alien robot (actually many alien robots) in our solar system. There are certain fundamental limits on how these robots can communicate. We can make some general observations of how these robots and their communications systems would be designed.

First, we can assume that they will use the most power efficient transmission systems possible. There's only a certain amount of energy in the universe, so the aliens would like to use it as efficiently as possible.  We then know how they would choose to send electromagnetic signals by some calculations that  Professor Emeritus David Messerschmitt has made in [1].  This paper assume s that the only signals that go between star systems are electromagnetic.  In our case we can relax that assumption and assume that the signal receiving civilization actually designed the signal sending apparatus (the robot) and thus has control over both ends of the system.  Professor Messerschmitt looks at the consequences of this in a newer paper [2].  He doesn't quite get all the way to robot to robot communication (or as he likes to call it, starship to starship communication) but, we can use the formulation in the paper to make that estimate.

Second, we can assume that they will try to have their robots remain undetected, as if they were detected there's a good chance they could be subverted or destroyed.  This means they are going to be fairly small, but not too small as they have to have enough power to actually get there and stop.  Let's assume that they would make themselves small so they'd be harder to detect. What are the limits on size detection? Right now we can detect 90% of the asteroids that are one kilometer in diameter, but soon. with advanced signal processing techniques, we'll be able to detect asteroids that are 45 meters in diameter. So let's assume these robots could be 10 times smaller than this (why we haven't seen them.) This would limit the robots to about 5 meters in size.  With this limit we can calculate the power that these robots would transmit per bit.

Since we are assuming that the robots will be talking to each other and there's one at every star, then the average distance they will be sending data is about 5-10 light years. The two antenna will be about 3 meters in diameter.  The transmitted power per bit will be 46 watt-hours per bit.  (See [3] Table III in [2], the only difference is the receive antenna will be 100 times smaller than one on a planet.) This then sets the limits on what we need to use to detect to find these robots.

We can use these limits to propose a new Search for Extra-Terrestrial Intelligence.  I like to call this the Search for Alien Killer Robots (SAKR.) These assumptions point to several new methods of conducting SETI.  We can look towards all the closest stars to try and pull out these minimal energy signals from the light of the star. Another idea to detect these robots is to send our own robots out towards the nearest stars then look back towards the solar system.  The signals will be much larger since we are much closer to the transmitting robots. And if any robots are found, we can then go get them.

One proposal would be to send some wide band receivers toward each of the stars and have them listen in the direction of the star as well as in the direction of the solar system. I believe that if we sent enough of these detectors we could also have the largest synthetic aperture radio telescope in (or out) of the solar system. This array of detectors could be used to look at many other possible signals as well as being used as a transmitter to talk to those potential starships we'll be sending out.

In future posts I will go over the costs of running these new SETI searches, how to optimally design the detection systems [4], and what else we could do with such a system if we build it.

Thanks for reading,
 -Dr. Mike


[1] Optimum end-to-end interstellar communication design for power efficiency, David Messerschmitt, UC Berkely, published in astro-ph.IM on 28th July 20132. arXiv:1305.4684v2

[2] Design for minimum energy in starship and interstellar communications, David Messerschmitt, published in astro-ph.IM on 29th March 2014. arXiv:1402.1215v2

[3]
TABLE III
EXAMPLES OF ENERGY REQUIREMENTS AT THE FUNDAMENTAL LIMIT


Parameter
Starship
Civilization
Units
Tx antenna diameter
3
300
meters
Rec antenna diameter
300
300
meters
Distance
10
1000
Light years
Received energy per bit
8
8
photons
Transmitted energy per bit
0.46
0.46
Watt-hours


[4] Insterllar Communication: The Case for Spread Spectrum, David G. Messerschmitt, UC Berkeley, arXiv:1111.0547v2 [asro-ph.IM] 2 Dec 2011.





















Tuesday, July 5, 2016

What's the matter with US politics?

One of the front runners in the race to become president of the US uses personal attacks, not logic or plans to bolster his position, but emotional appeals.  It's obviously the Donald who is using his skills honed as a reality TV show actor (Reminds me of another President and a few governors who started as actors.) Some have claimed that he is untruthful about 70% of the time (contradicts himself even) and slanders people the rest of the time. He has proposed few concrete plans, except those that would bankrupt the country or siphon off more money to the existing rich and powerful.  He panders to a set of disenfranchised constituents so that they can pour their blame on to the other: the immigrant, the government, anyone except who is really responsible. How would you assign the blame? And how would you fix it?

Donald's technique of calling people names is the classic propaganda technique of scapegoating or dehumanization. See Scott Adam's evaluation.  This isn't by accident but by design. It seems like a New York or maybe construction industry state of mind. Apparently it is acceptable to lie in a negotiation, the other side should expect it. And it's frightening to think that he might win. Many others have used these same techniques to win elections elsewhere. Here's a short list of what Umberto Eco wrote in 1995 about Fascism, which allows a small group or a single man to change a democracy into a one party state. Umberto grew up in Italy during the rise of Mussolini.  I think Umberto knows what he speaks of. So does Donald.

The best hope is that Donald is confusing the roar of the arena crowd for the will of the voters.
See if Umberto's description rings any bells...

1. The first feature of Fascism is the cult of tradition. As a consequence, there can be no advancement of learning.
2. Traditionalism implies the rejection of modernism. It is mainly concerned with the rejection of the Spirit of 1789 (and of 1776, of course). The Enlightenment, the Age of Reason, is seen as the beginning of modern depravity. In this sense Fascism can be defined as irrationalism.
3. Irrationalism also depends on the cult of action for action’s sake. Distrust of the intellectual world has always been a symptom of Fascism.
4. No syncretistic faith can withstand analytical criticism. For Fascism, disagreement is treason.
5. Disagreement is a sign of diversity. Fascism grows up and seeks for consensus by exploiting and exacerbating the natural fear of difference. The first appeal of a fascist movement is an appeal against the intruders. Thus Fascism is racist by definition.
6. Fascism derives from individual or social frustration. That is why one of the most typical features of the historical fascism was the appeal to a frustrated middle class, a class suffering from an economic crisis or feelings of political humiliation, and frightened by the pressure of lower social groups.
7. To people who feel deprived of a clear social identity, Fascism says that their only privilege is the most common one, to be born in the same country. This is the origin of nationalism. Besides, the only ones who can provide an identity to the nation are its enemies. Thus at the root of the Fascist psychology there is the obsession with a plot, possibly an international one.
8. The followers must feel humiliated by the ostentatious wealth and force of their enemies.
9. For Fascism there is no struggle for life but, rather, life is lived for struggle. Thus pacifism is trafficking with the enemy. It is bad because life is permanent warfare.
10. Elitism is a typical aspect of any reactionary ideology, insofar as it is fundamentally aristocratic, and aristocratic and militaristic elitism cruelly implies contempt for the weak. Fascism can only advocate a popular elitism.
11. In such a perspective everybody is educated to become a hero. In every mythology the hero is an exceptional being, but in Fascist ideology, heroism is the norm. This cult of heroism is strictly linked with the cult of death.
12. Since both permanent war and heroism are difficult games to play, the Fascist transfers his will to power to sexual matters.
13. Fascism is based upon a selective populism, a qualitative populism, one might say. In a democracy, the citizens have individual rights, but the citizens in their entirety have a political impact only from a quantitative point of view—one follows the decisions of the majority. For Fascism, however, individuals as individuals have no rights, and the People is conceived as a quality, a monolithic entity expressing the Common Will. Since no large quantity of human beings can have a common will, the Leader pretends to be their interpreter. Having lost their power of delegation, citizens do not act; they are only called on to play the role of the interpreter. Because of its qualitative populism Fascism must be against “rotten” parliamentary governments.
14. Fascism speaks Newspeak. Newspeak was invented by Orwell, in 1984, as the official language of Ingsoc, English Socialism. But elements of Fascism are common to different forms of dictatorship. All the Nazi or Fascist schoolbooks made use of an impoverished vocabulary, and an elementary syntax, in order to limit the instruments for complex and critical reasoning.

Donald seems to have learned all these lessons very well.

He's learned to exploit them. Can the US public withstand the siren song of Donald?
It's the easy way out, if you don't understand what's going on.
Can we take the hard way out? The way that requires us to figure out what is wrong and fix it rather than just blaming the other?
Can the US do real intellectual work? Being a racist is so much easier and very seductive.
I hope a majority of the voting electorate can avoid this.

I guess we'll just have to wait and see.

Thanks for reading.
-Dr. Mike







The Power of Big Ideas

What should be the next big ideas?
What are some of the recent big ideas?
When did the world change last?

Language. Writing. Books. Farming. Swords. Governments. Gods. Towns. 

But what have we done lately?

The Renaissance. The invention of the scientific method.  Galileo invents the telescope and observes the universe.  Humans look at the world, believe what they see and try to understand and predict.

The Scientific Revolution. How to go from observations to theory, make predictions that are reproducible.

The American Revolution. Government exists by the consent of the governed.  All people are created equal. Life, liberty and the pursuit of happiness.  Inalienable rights to religion, speech, press, arms, etc. Enforcement of contracts and private property.

Abolition of Slavery and Suffragism. Government exists by the consent of the governed, all of the governed. Every single one of them, whatever their heritage, whatever their sexual proclivities, whatever their beliefs. The power of the peaceful revolution. Again, all perople are created equal.

The Industrial Revolution. The invention of the steam engine makes it possible to amplify human capabilities.  Railroads.  Mills. Automobiles. Planes. Rockets. Oil and gas. Renewable energy. Exoplanets.

The Darwinian Revolution. We are all cousins, with all life. We are made from a program of DNA; all life is. If we can breed together, we are the same species.

The Medical Revolution. The Germ theory of disease. Vitamins. Double-blind studies. Immune system. Vaccines. Neurobiology.

The Electrical Revolution. The Industrial Revolution comes to the home and more. Maxwell's equations. The telegraph. Long distance communication. The light. The telephone. Radio. Television.

The Quantum Revolution. Quantum Field Theory. The transistor. Digital transmission. 

The Computer Revolution. The computer. The network. Compression and encryption. Smart phones. Artificial Intelligence.

Freedom of Movement. Free trade. Free travel. Floating exchange rates. National parks. Environmentalism. 

The Information Revolution. Google. Facebook. Amazon. Uber. 
Happy Human
Secular Humanism. Using the Scientific method to "improve the well-being of every person on the planet." The biggest idea. The most important idea in the last 10,000 years. 

And some big ideas that were not so good and took a long time to discredit:

Lies.
God.
Supernaturalism.
Slavery.
Religion.
Heresy.
Warlords.
Theocracy.
Royalty.
Colonialism.
Eugenics.
World wars.
Fascism.
Scapegoting and dehumanisation.
Industrial pollution.
Unpaid Externalities. More to say about this one later.
Not taking care of the average citizen.
Allowing unregulated monopolies.
Taking things on faith.
Suicide bombings.
Violence instead of persuasion.

Never stop fighting a bad idea. 

Never stop promoting a good idea.

The key: Learn to distinguish between them.

Ask who benefits? Who loses? How much does it cost? Who's paying for it? How do we increase the economic pie? How do we share it fairly?  What happens if we don't do it? What happens if we do?

And what's next? 

Mind recording and downloading. Immortality. 
Virtual reality. Manufactured religion. Hell? Heaven? The nerd rapture.
Robots? Self driving cars. Self flying quad-copters. The end of work?

Leaning how to distinguish emotions from logic when making decisions? Nope. Never going to happen. Unless the killer robots take over.

Thanks for reading.
 -Dr. Mike




Saturday, May 28, 2016

How to Estimate Anything From Nothing...

or How to be a Good System Engineer

This will be a discussion of how to estimate something from little or almost no information.
We call this making a Scientific Wild-Ass Guess or a SWAG.

I've been pretending to be a system engineer for a long time.  And I have to admit that I still have to go look up the average wait time in a queue or the Poisson distribution. Typically estimates are extensions of known data, the more data the better.  But what happens when you know hardly anything about the data that answers the question, because it doesn't exist?

Something from Nothing...

The modern method of how to estimate something from no information at all is the classic paper: "Implications of the Copernican principle for our future prospects" by J. Richard Gott III [1]. Sounds innocuous, but is probably one of the best tools ever invented for doing system analysis when information is lacking. It's almost as important as Baye's theorem that allows one to adjust their estimates of a probability given new information.  With these two tricks you can make an estimation of almost anything, and correct it as you learn new information. Some might call that science, but it's more like 'practical science' or what most people call engineering.

How long will the Berlin Wall stand?

If you were standing beside the Berlin Wall when vacationing in Berlin, you might ask yourself that question.  But how could you predict something like that?  Go collect data about all the walls in all the cities in the world by type, size, lifetime and then use that data to predict how long the Berlin Wall will live by finding all the walls that are similar to it? That's a lot of work. But it will almost certainly give you a fairly accurate lifetime prediction for the Berlin Wall. We can make a SWAG without all that additional data, it will be more inaccurate, but maybe it's accurate enough for whatever other calculation you are doing.

Gott's Copernican theory goes like this: If I am at a random place and time and I observe something that is N years old, with a 95% confidence level I can say that it's extended lifetime will be between N/39 and 39N.

Or a 2/3rds chance of having a 1/6 to 6 times longer lifetime.  Why?

This is because if you are observing the lifetime of an object at random, you can be there at any time during its lifetime. This means that if you assume that lifetimes are randomly distributed and your appearance is random, half the time you will be in the last half of the object's lifetime and half the time you'll be in the object's first half of its lifetime. Continuing on, there's a 2.5% chance you'll be in the object's first 2.5% of its lifetime or 1/40th of its life. Double that for a 95% confidentiality limit, so 1/39th and then 39 times for the odds in the other direction.  For instance, Gott was a tourist in Germany in 1966.  He saw the Berlin wall.  He read a plaque that told him the wall was built in 1957. He then concluded that he was seeing the wall at a random time during its lifetime.  He wasn't there to see the wall, he just happened upon it. Since at that time the wall was 9 years old, with 95% confidence, he expect it to last another 9/39 years (12 weeks) to 39*9 years (351 years). It came down in 1984 after 27 years. He expected it to be there 1.5 years to 54 years 2/3rds of the time. Whats the most likely time to live? 50 % of the time it is between 3 and 18 years. The most likely time is 9 more years.[2]

How Long will North Korea's communist state survive?

They were founded in 1952.  That was 64 years ago.  With a 95% confidence level the state of North Korea will be around for 64/39 years (1 year, 7 months) to 64*39 years (2500) years. Wow, that's scary. Maybe we should figure out some way to 'nudge' that around.

See how easy it is! There's been many arguments about why exactly this formula actually works.  Its been tried on Broadway show run lengths and found to be accurate and I've read about it on the Internets, so it must be true. Let's use it to calculate something interesting: How long will the human race survive? (From [1]) The human race is a species. It's been around for about 200,000 years. You are alive today at some random time.  The human species, with a 95% probability will be around for another 200,000/39 years (6000 years) or 200,000*39 years (9,321,000 years.)  Hmm. Looks like not enough time to settle the galaxy, but it depends upon how fast you can travel. It doesn't say that we might not create some other species to settle the galaxy... but it seem unlikely that we could by ourselves. Seems like it's going to take killer robots to settle the galaxy or nothing.

Thanks for reading,
 -Dr. Mike

[1] Nature, Vol. 363, 27 May 1993
[2] reference

Sunday, May 1, 2016

The Case for Intelligent Design.

What is the Case for Intelligent Design? 

First we have to define Intelligent Design.  In the common sense of a replacement for "creationism" it is obvious that there is no case for it.  It's actually a negative argument: since things are so complicated they must be made and could not have happened by accident. That makes some sense: particularly complicated things are unlikely to be made by accident, so things that look like they are designed probably are. This doesn't apply to humans, though; we haven't evolved by accident: we evolve by the random mutations but they are passed along by survival of the fittest.  If the mutation has a small chance of making the entity survive long enough to have a better chance to reproduce, then this mutation will eventually be passed onto more of the members of the species as time goes on.

This was the insight that Darwin (and many others) had 150 years ago.  Darwin was the first to understand that the assumption explained many, many things and he struggled to make the argument irrefutable.  And he did a great job of it, and others have admirably extended his argument. This theory actually begin a science of biology that has driven biological research ever since.  It has driven us to understand genes, DNA, and the history of life itself. The theory has been greatly expanded and the idea that anything in biology has been "intelligently designed" is not believable, there are just too many counter-examples of bad design in evolution to even contemplate this.

Except for Craig Ventnor's latest work. Craig has actually "designed" a live cell by picking fragments of DNA from multiple bacteria.  Our theory of evolution (mutations, inheritance and survival of the fittest) is a statement about the past; in the past evolution occurred without intelligent design, going forward this in no longer true. And of course, the intelligence designing creation in the future is human intelligence, not some supernatural intelligence. In fact, the new capability given by CRISPR to edit individual pieces of DNA in living beings shows us that intelligent design can happen. So I would have to say that Intelligent Design is now a fact, not in a pseudo-scientific version of creationism, but in reality.

What should be Intelligently Designed?

This leaves us with two remaining interesting questions. The first: Should people be intelligently designed? In my opinion the obvious answer is yes.  But there must be limits on the usage of this new technology. Just like there are protocols on how to handle and study dangerous infectious bacteria, there have to be limits on the study and use of gene altering techniques.  I won't go into where the limits should be, but there should definitely be protocols to contain the damage that this research could do. What other limits should there be?  Elon Musk and Sam Altman have brought up the idea that Artificial Intelligence research should have protocols and limits.  I think they are partially right, protocols need to be set up to make the research safe, not limits.

Where else should we limit Intelligent Design? The world has agreed that biological weapons and other weapons of mass destruction should only be researched under certain protocols and the actual moral high ground is to not research them at all. You want to make sure that your research won't cause the human race to earn the last Darwin Award.

And I would claim that you don't want anything to be designed by a 'supernatural' intelligence. Who would trust anything outside of your control or influence? I put supernatural in quotes because I think it is a word without a meaning in reality.  It certainly affects reality by influencing the way people think.  But the very idea of supernatural is the ultimate oxymoron.  What does supernatural mean? It means 'attributed to some force beyond scientific understanding or the laws of nature.' But what does nature mean? Nature is everything.  But maybe not?

Maybe there's an unseen space beyond what we can normally sense.  That would sort of be in a 'different' nature as it's hard to detect. And maybe beings in that space can affect things in nature.  Maybe. Has this ever been measured in a reproducible way?  Not really.  It could happen.  It's not likely.  It could explain souls.  The soul could exist in this other realm and be attached to your brain and control it. It could happen.  And if it does happen, we'll know pretty soon, so it won't go undetected.  It won't be outside of nature, it will be measurable and recognizable.  As I said, being beyond nature is an oxymoron.

What else should be intelligently designed? Other than everything.  I would argue that the most important thing to be intelligently designed are morals.  So question two: Is it moral to intelligently design morals?

Intelligently Designed Morals

Why do morals need to be intelligently designed? Hasn't this already happened? I would argue no. What's happened is that evolution has design a 'moral code' into humans, the problem is that evolution is random, driven by individual survival.  It's not a moral code but a survival code.  And a survival code is not moral, it's selfish, it's brutal, it's just not right.  This tells me that we can't depend upon our inner moral sense to design a moral code.  We have to start from first principles.

The first requirement of a moral code is that it must be designed from overriding principles.

People have attempted to design morals many times; however, I think we need to add a framework for the intelligent design of morals.  We need to set some goals. What kind of goals should a moral code have?  Why do we need a moral code?  We need a moral code to decide on how to be good vs. evil, or do we? Our internal compass is already a good guide.  We need a moral code to make sure our inner guide is correct.  There are many logical traps that we can fall into just listening to our moral intuition.  Why this is so has been studied in economics (with many Nobel prizes awarded); a great example is: "Thinking Fast and Slow" by Daniel Kahneman.  The brain has many biases and only clear thinking and real logic can prevent us from making mistakes.

It's obvious to me that all religions have been designed by men.  This doesn't mean that they can't have reasonable moral codes. Many religions claim to have been inspired by or dictated by God or gods, but they all seem basically unchanged if the gods don't exist.  Which is a good thing as there has yet to be a god that actually does anything real or useful as far as I can tell from the historical record. The idea of a god is useful, the god itself, not so much.  In my opinion religions and morality should just stay separated as they've done such a poor job of them in the past. (Slavery, equality under the eyes of the law, torture, discrimination, child abuse, wars, the list goes on...)

The second principle of moral code design is that it can't depend upon reputation for correctness.

Morals are too important to not be examined, debated and understood. Depending on God or tradition will lead to serious problems with moral codes, it can be a good start, but if the proposed morals aren't carefully vetted, you can run into big problems.  If you don't have an overriding principle, you can't verify a moral code, so principles one and two work together. 

I would claim that we want to design morals for conscious beings.  If a thing isn't conscious, morals don't apply to it. Why is that?  Only conscious beings have experiences, without experience there is no morality. So that will be our third principle: Morale codes are for conscious beings.

Moral codes set the standards for interactions of conscious beings.

If you want to design a morality for all conscious beings it leads you to start with certain postulates. You can design a moral code that is not fair for all conscious beings. Almost all religious moral codes have been designed this way.  In Christianity the moral code is for all humans to be treated equally (animals and lesser beings need not apply.) Jewish morals actually care somewhat about some animals. Islam is very clear that believers and non-believers are treated differently. I'm not an expert in religions, but this is what I see around me. I'm happy to be corrected in any assumption or manner.

It appears that morals designed by religions are sorely lacking in morality. Not to be so unexpected as they were designed thousands of years ago typically, when we were somewhat more ignorant than we are today.  Even the religions invented recently have dropped the ball.  Think of Scientology and Mormonism; not much break through in morality from either of those religions.

I'm gong to discuss moral codes that treat all conscious beings as being worthy of respect. I don't necessarily like the consequences of the moral codes they create, but that's besides the fact. How do you rank moral codes?  If we can use reputation, what can we use?  You could use the criteria of which ever moral code makes you happier or increases your well-being. Makes sense.  But I would argue that it is incomplete and leads to unfair and immoral moral codes.  You need to judge a moral code more broadly, it's not just you that needs to agree it's best, it's everyone.  This puts severe restrictions on how to judge a moral code.

A moral code needs to be evaluated in how well it treats any conscious being in any situation.

Wait, you're saying, any conscious being?  An insect? A mouse? A slime mold? Yes, any conscious being that has experiences must be taken into account by a moral code. Different levels of experience could be treated differently or expected to act differently and be treated differently (can a mouse even understand a moral code?) I think this requirement is paramount in building a real moral code. It's not just about human beings it's about conscious beings. Different beings have different levels of consciousness and different levels of intelligence that allow them to foresee the consequences of their actions, or not, so should be treated differently by moral codes.

Finally a moral code should maximize the amount of well-being or happiness (in the philosophical sense of flourishing) of conscious beings. Just like medicine works to increase your good health.  We don't know what perfect health is, but we can usually tell in what direction good health is: less pain, longer lives, more opportunities, etc.  Same for well-being.  While we don't know what the perfect well-being is, we can usually figure out what direction it is in: better health, more flourishing, less pain, more opportunities, more consciousness, etc.

A well designed moral code must maximize the well-being of conscious entities.

Let's recap. Moral codes tell us how conscious beings should interact, they must be designed from first principles and evaluated on how well they treat all individual conscious beings and how well they maximize well-being for all conscious beings. That's a tall order. All the moral codes I've seen are seriously lacking in many of these attributes, so I would claim in great need of fixing.  I'm pretty sure that the ultimate moral code has not yet been designed. However, viewing a moral code in this light gives us hope that we may be able to propose moral codes and tune them for best effects.

The world is overdue for good science and good engineering to be done on moral codes. There are many falsifiable hypothesis that can be made on moral codes given this framework (science) and many ways to run experiments to decide if one part of a code is better than another (engineering.) It's about time to stop reasoning about morals using philosophy and religion and to start reasoning about morals using the modern practices of science and engineering.

It's time for morals to be intelligently designed.

We've come a long way since we learned to speak and write. No reason to stop progressing now because someone told you they already have the answer. Question it. Evaluate it. Review it. Find the flaws. Improve it. Never forget. My inspirations:


Thanks for reading.
 -Dr. Mike










Sunday, April 10, 2016

Perfect Pitch: is it possible?

We're going to explore how good someone's perfect pitch could be. How well can a human discern the frequency of a sound? Then we'll show how this pertains to the ability to throw and hit the perfect pitch.

How accurately can you hear pitch?

The measurements that show how many frequencies a person can distinguish show that humans can discern about 1500 different pitches.  How do they do this?  It's done by a vibrations picked up at the ear drum then transmitted to the cochlea via three tiny bones (that server to amplify the vibrations due to leverage.) The cochlea is a small tube that's about one inch long (rolled up) and gets smaller the further away from the entrance point the smaller the tube gets.  This causes sounds of different frequencies to have peak intensities at different points along the cochlea.  The intensity causes the hairs that line the tube to fire in proportion - hence which hairs fire tells you the frequency (pitch) and how many fire (and their rate) tell you the loudness.  

Now the cochlea is only about 3.2 cm long.  So 1500 pitches imply you can differentiate a peak of sound intensity every 20 microns (a micron is a millionth of a meter or about a thousandth of an inch, commonly called a mil.)  Since there are only about 16,000 to 20,000 of these hairs, your brain can figure out the peak of the intensity distribution to about 10 hairs.  Pretty amazing signal processing going on!

How does this help with pitching the perfect pitch?

The perfect pitch is one that the batter can't predict where it is going. Mariano Rivera was the expert at this. Here's what you have to understand to make the perfect pitch.  First spinning a ball can cause the ball to move due to the Magnus force.  (You can read all about the details in my old physics professor Adair: The physics of baseball and some more detailed work is here.)  But all you need to really know is that all the spin of the baseball around the direction of travel makes no difference to the path of the ball.  You can imagine this as a ball coming toward you and spinning either clockwise or counter-clockwise; this spin makes no difference in the path the baseball takes.  However, if it's spinning in any other direction, it tends to move in that direction. What this means is that you have two directions of spin you can put on a ball. One of them causes the ball to move in the direction of the spin, the other doesn't do anything to the direction the ball moves.

 How does this help us throw the perfect pitch?  Baseball players pick up the spin of a pitch by the color of the baseball.  This is shown below in a graphic from a reddit discussion.

What's the trick that some pitchers have figured out?  The trick is that in addition to the spin that makes the ball move, you can rotate the ball clockwise or counter-clockwise and not effect it's movement.  Thus you can take any of the pitches shown above and add additional spin that blurs the characteristics of what the ball looks like.  If you can spin the ball in the right direction you can make all pitches look just like a four-seam fastball.  

This was Mariano's big secret.  This is also the secret of the 'no-dot' slider.  You add additional spin to the ball to move the 'dot' either above or below the line of sight.  Now the batter can't tell what you are throwing, so they have to guess, because there's not enough time to figure it out by looking at the trajectory of the ball.  If you try to do that it won't work as you have to wait too long to start your swing, you'll miss the ball.  Typically a hitter has to decide where the ball is going to end up at the plate when it's only traveled about 20% of the way to the plate.  The only way to do this is to look at the color of the ball.  And maybe the arm action of the pitcher.  Mariano's arm action varied by less than 2% between the two pitches he used (a cutter and a fastball) so there was no help there.  Once a pitcher learns how to remove the color cue, they become the perfect pitcher.

Can you pitch the perfect pitch?

You can't completely hide the spin, but you can obfuscate it. Can you obscure it enough so that the perfect batter can't differentiate your pitches?  Let's see how many sensing signals a batter gets to use to determine the spin/color of a baseball.  The batter has to figure this out when the baseball is 50 feet away.  A baseball is approximately 3 inches in diameter.  At 50 feet this subtends about 3 (inches) / (2 * pi * 50 (feet) *12 (inches/feet) ) (=% of circumference) * (360 degrees/circumference) or about 0.3 degrees of the batters field of view.  Since One degree of visual angle is equal to 288 µm on the retina (Drasdo and Fowler (1974) this image is about 10 microns (or millionths of a meter) in size.  Sound familiar?  That's about how accurately the hairs in your middle ear could determine an intensity peak. It ended up being about 10 hairs.  

How does this compare to the retina?  

There's approximately 17,500 cones in 1 degree in the most sensitive part of the eye. A cone makes a signal depending on the intensity of light hitting it. The image of the baseball covers (0.3 * 0.3 = 9 %) of this area (called the fovea.)  This means that the image is seen by about 1,500 cones.  There are three types of cones that respond to different colors.  To figure out what color the baseball is there are three measurements of 500 different signals.  The ratios of these signals map to our perception of the color.  A cone can distinguish about 100 different colors, so technically you can see around a million different colors (100 * 100 * 100.) However, since a baseball is essentially red and white, the batter isn't really seeing different colors, but different intensities or hues of the same color.  It turns out that the batter can also discern about 100 different hues. 

How many different hues can a pitcher give a baseball?  Let's assume, that like for hearing, it takes about 10 sensors to make a measurement.  This means that the eye gets about 50 separate spatial measurements of the hue of a baseball when it's 50 feet away.  That's why the batter can see 'tracks' or 'dots', they can measure the relative intensity of the color red in about 50 spots on the baseball.  By spinning the ball clockwise or counter-clockwise, in addition to the spin that makes the ball move, the pitcher can make the color of the ball the same regardless of the pitch they are throwing.  Thus, it doesn't even matter that the batter can see all these different hues!

What's the best batting average against the perfect pitch?

First we have to figure out how close the batter has to get to guessing where the ball is going to cross the plate so that they can hit it.  In other words, when someone is swinging at a ball, how much can they adjust the swing of the bat so that they can still hit the ball on the sweet spot? According to this paper, the last 150 to 200 ms of ball travel are totally unusable by the batter.  Also, according to Ted Williams, you've identified what type of pitch it is in the first 100 ms.  You do that by the spin.  Now you can't do that anymore.  So you have to guess what kind of pitch it is.  If the pitcher only has two pitches, like Mariano, you get it wrong half the time. The batting average of batters facing Mariano over his career was .209.  The average batting average during this time was about .265.  So not knowing which pitch was going to come dropped the average by 20 %.  If the batter guessed wrong and couldn't adjust the drop should be 50%.  Thus the batter can adjust 60% of the time.

Let's see how much better a pitcher could be if they had three different indistinguishable pitches.  The batter has to distinguish three trajectories.  I'm guessing that the batter is just guessing when they realize they are wrong.  In this case it would drop the batting average by another 20%!  Look for some pitcher to have a batting average against of 40% below the average, and you'll know why.

Thanks for reading.
 -Dr. Mike


Tuesday, March 29, 2016

Interstellar Trade - wait, how about: Interplanetary Trade? Is it possible?

Interstellar trade makes no sense.

Forget about making interstellar trade possible, even with Einstein's laws of space and time, where it seems that you get to places faster than the speed of light. Just don't try to go back, because 100's of years , if not 1000's of years have passed. There are no physical goods that would make sense to send between stars, except for reproducing killer robots that can grow humans (well, only killing if they ask our permission.)

There have actually been some papers on the effects of interstellar trade (by Pual Krugman, Nobel prize winner!) The main conclusion is that interest rates on the linked star systems should be correlated.  Looking at correlation of interest rates between earth based countries, the correlation is probably pretty low. Let's consider the secondary effects of trade, planets that trade with the planets that you trade with: the effects have to be very, very small.  So you can make any calculations only assuming that you take into consideration the directly nearby stars.

Assuming that all trade between planets is mostly in services, information, and weightless goods, how much of current worldwide trade does that consist of?  The total weightless trade amount was $5 trillion dollars per year or about $700 per person per year (all in 2014); which seems like a lot since a significant portion of the world's population gets by on less than $400 per year.  Since the total economy is about $80 to $100 Trillion (depending on how you count it) this means weightless trade is about 5% of the economy of the world.  Trade in goods(non-weightless goods) is about three to four times bigger. or about 20% of the average economy is now done via trade.  The average GDP per capita world wide is about $10,000 per person per year.  So trade per capita is about $2,000 per year.

Let's look at an analogy to Mars for trade: Hawaii, the most isolated place in the world.  Hawaii imports between $6.7 and 3.8 billion per year; or about $4.2 to 2.5 thousand per person per year. And the imports are mostly energy.

Since the per capita income in Hawaii is about $46 thousand dollars, Hawaiians import about 6-10% of their income.  That's almost twice as much as the average per capita trade of the world average. Mars is going to have to be at least twice that (if not more) so expect the per capita trade to be around 12 to 20% when we have 1.5 million people on Mars.  Earlier, it will be even higher.

So we have a few questions to answer: How long does it take to get that many people on Mars? How much capital does it take? How much trade will they need? How expensive is it going to be to transport that trade? How are you going to get energy to Mars? (all solar? nuclear? Not wind or water.) And maybe, finally, why the hell would anyone want to go to Mars in the first place?  You do know there's no air there?  Terra-forming Mars will definitely take a long time (how long?) and be very expensive.  You won't be able to walk outside without a space suit on for at least a hundred years... Are you nuts?

To be specific: Yes, the human race is nuts; but in a good way.


Interplanetary trade must happen.
  
The question is what form will it take?

So let's figure out what it takes to make interplanetary trade possible.  That would mean Earth to Mars.  Let's assume that Mars will be settled, and probably terra-formed in the near future.  How much capital must we invest in Mars to survive?  How many people are required?  How long does it take?

How much does it cost to get to Mars?

Elon Musk has promised trips to Mars for $500,000 in the year 2025. This includes a ton of cargo (another good question - what do you take?) He's going to send up the first few flights of 1 - 2 hundred people per flight, like a cruise ship.  He's assuming that he can send stuff to Mars for $250 per pound.  Does that make sense?

How much does it take to ship stuff around the earth (which is way cheaper than shipping it to space, by the way.)  And there's an easy way to estimate this, just look at the energy required.  The costs will be relatively proportional.

Recently it costs a max of $50 to ship one ton in bulk anywhere over water ( It costs about $400 to ship a container to the United States from China, about $800 to ship from India, and $1,300 to ship from Sierra Leone. A container can hold just under 40 tons (just like a truck can carry.))  And it costs about $2 per mile to transport 40 tons of stuff over the ground. To go 2000 miles (anywhere on the earth) it will cost $100 to move a ton on the ground.  So you can get one ton of stuff to anywhere on the earth for about $150. <Or you could fly it anywhere: Between 1955 and 2004, air freight prices fell from $3.87 per ton-kilometer to less than $0.30, in 2000 U.S. dollars. don't believe this.> In addition to these costs, getting stuff to the launch site, you have to send the stuff to Mars.

How much energy does it take to move a ton over the earth?  Trucks get 8 mpg and fuel costs about $3 per gallon, so it costs $3/8 per mile or $0.325 per mile per 40 tons or $0.08 per ton per mile.  To get the delta-v needed to get to Mars you need to use 2.7 times the fuel weight over the cargo weight.  How much does 3 tons of fuel cost? That's about 20 barrels of oil, at current prices that's about $800 per ton of cargo. If you took that ratio of energy to costs (a factor of 25) then it will cots about $20,000 a ton to get stuff to Mars.  And Elon is saying he can get the costs done to $500,000 per ton. He's got a 25 x expendable costs.  He definitely needs to reuse that rocket, though, just like you reuse a truck or a ship, because rocket ships are quite expensive.


How big will the Mars transportation industry be?

Currently to cruise around the world on a cruise ship is close to $35,000 and takes about 90 days.  You can do the same thing in a jet for $90,000 and it takes 30 days.  It looks like this business has about 5 participants and they run about 30 flights each with 50 people on each, so total revenue for this industry is about $4 billion ($4,000,000,000.)  The cruise part of the market is probably about 10 times that size or a $40 billion industry.

Elon is talking about trips to Mars; he's saying the size of the trip to Mars industry is about $150,000,000 per trip.  This means if he grows the industry to match the existing luxury jet industry then he could have 24 Mars flights and get 3,000 people per year on Mars. If he was to grow that exponentially, well, now we're talking. Let's say that trips to Mars were as popular as the cruise industry: That would be 240 Mars flights and 30.000 people per year to Mars.  How long do you think that would take?  The travel industry grows at about 5.4% per year, for a long time.  That means it doubles in size every 13.3 years.  It would take ~5 doublings to go from 3,000 to 30,000, or about 65 years. Wow. Too long.  Let's say that the Mars tourist industry grows by 24% a year (then it doubles every 3 years, so it only takes 20 years.  That's more like it.  Now how long does it take to get Mars to the size of Hawaii, which has 1.5 million people? Just over 5 more doublings.  Or another 20 years.  Not too bad.  We could get 10 million people up there in about 50 years.

They will need factories to build buildings, since you can't live outside.  They will need factories to build solar panels, since that will be cheaper than importing them (or oil) from Earth? Maybe. What can you sell?  Only intellectual property.  Mars is never going to send anything back to earth except people.  It's going to send intellectual property to earth and expect earth to send it physical things in return. Until there are enough people on the planet to sustain themselves.  How long does that take? And how many people does it require?  Let's say that we need to be as big as France or Germany to be a self-sustaining modern country, or have a population of 50 million.  Or another 5 to 10 years. So it will take 55 to 60 years to get a sustainable Mars colony.  And that doesn't get started for another 10 years.  So we could have Mars settled in 2085 to 2095.  Or around the turn of the next century.


Are we doing better than last time?

What's our nearest historical analogy?  The European settlement of the new world?   Mars is much harder to live in than the new world: no oxygen, no edible foods, no life; on the positive side: no animals or previous inhabitants. So what things do I need to live?  Atmosphere. Water. Food.  Electricity (Power). Transportation. Entertainment. Life. Silicon chips.  Displays. Printers. Medical Care. Housing. Furniture. Pets. We're getting pretty far down the Mazlow hierarchy here. But how many people actually came from Europe to the Americas each year?

According to wikipedia, about 47 million people have emigrated from Europe to the Americas, which now have about a billion people (after 500 years.) The Europeans first came to America with Columbus, but none of them stayed until 105 years later in 1607.  LEt's set the start point of when the first thing got into space (should actually be from when the first person gets to Mars... but close enough.)  That would be 1957 or 60 years ago.  So if having Mars settled is 70 years in the futre, it will take us about 130 years to settle Mars from our first voyage into space.  That seems to be a little bit faster the speed that the New World was settled, since that took about 300 years.

After about 200 years there were 1.2 million people who immigrated and about a total of 4 million in population, which implies that everyone who came over had about 4.1 kids net, per couple per generation.

Since the cross-Atlantic settling took about about 45 days. This implies that over the 400 years 10,000 people per year immigrated, or about 300 people per day, which means about one ship per day.  And since the round trip time is 90 days, we need about 90 ships going back and forth.  Oh wait, there's all the people that went over and came back.  During that time about a quarter of the people returned.  So, it doesn't make that much difference.  Maybe 125 ships.  There were probably more ships that were just cargo ships.

Let's compare that rate of flow to our current expeditions into space.  So far, the longest anyone has stayed in space is one year.  We've essentially had someone in space full time since 1957 (just after my birth day) in various space stations or rockets.  But they've all come back.  We won't really know how fast we can settle another planet until we go to Mars.  It would be interesting to look at the first 50 years of travel to the new world and compare it with our travel into space.  So far, it's hard to tell if we're ahead or behind.  But since the first permanent settlement in the new world took over 100 years, we still have 50 years left.

I think we will kick butt on the settlement time, in a much harsher environment.  We're just oodles of times more intelligent today then we were 500 years ago.  How much more smarter?  You can only look at the world's average GDP (Gross Domestic Product.)  The ration of current  GDP to GDP 500 years ago is about 60 to 1.  And we are growing much, much, much faster since the industrial revolution.  The first steam engine was invented in 1700.  Our growth in GDP didn't take off for 100 years after that. The Victorian era or the 1800's.  The growth changed from 0.1 % to 3 %.  Once we learned how to produce energy our economy's GDP (a measure of what a collection of people can produce) doubled every generation.  And it doesn't look to slow down any time soon.


How many people do we have to seed Mars with?

To make an estimate of how many people we would need to make Mars an independent colony you can look at the smallest viable independent countries. Switzerland or New York (8 million.) Greece (10 million.) Poland or California (38 million.)  France or England (65 million.) Germany (80 million.)  EU, North America, South America are around 400,000,000 people.  These would definitely be survivable number of people.  How about a single country or state? California or France are probably big enough to be an independent unit.  So 30 to 60 Million people.  The economy would be about $1.5 Trillion.  As in the US today, if it was able to import 5 - 10 % of it's economy; at $1000 per kilo transportation costs (not to mention the 6 month delay) Mars can import 150.000 kilos of stuff.  Or about 30 launches/year for trade (not people.)  So almost one launch per week.  Not too bad.  10% of the average that we sen to the new world during the first 400 years.  Wait.  Not sure what the cargo shipping was.  That was a bunch bigger than the people shipping.  Maybe the same size?


Can we get to Mars that fast?

How do you get to Mars?  Well it starts with one launch per year.  Then two launches per year.  Then 4 launches per year.  Then keep growing that exponentially.  What does it look like?  If we double that every year we can fly 10 million people to Mars in 15 years.  That should be a reasonably self sustaining economy.  Let's say you can only double the size every 3 years, then it takes 45 years. With that size of an economy you can have several fabrication plants for chips. You can have a car factory or two.  You can build computers, phones, displays and all the internet type things. You also need buildings and atmosphere and water and food, oh my!

And eventually you want these things outside in the open.  That takes a lot of effort.  And hundreds of years of time.  Not an easy job.  But look at the Dutch. They've reclaimed dirt from the sea for hundreds of years. It can be done.  Humans can take on great engineering projects, and make them happen.  The interstate system.  The phone system. The cable system. Settling Mars. Terra-forming Mars.  Wonder how long that would take?  Could you do it in 50 years?  That would be way faster than the Europeans settled the new world. But let's just assume it's as fast as the new world settlement, 500 years?  From 0 to 750 million.  Doubled in population every 25 years, or about 3% growth per year.  Not too shabby.  Just a slowly increasing exponential growth that overwhelms all the imaginable numbers.


Are we ahead of or behind schedule?

I'm thinking we're ahead of schedule. But it's so early it's hard to tell.  It's hard to imaging that we can't settle Mars in 500 years.  Especially considering that I think it's likely we'll see the first people land on Mars in the next 10 to 15 years.

Thanks for reading.
 -Dr. Mike







The Buddha’s not there.The Illusion of Truth

​ An Ode to Existence in the Prophetic Style. [The Multitheist’s Lament] Buddha looks inside himself and sees the void, the void is nothing....