Sunday, December 20, 2009

Science Fiction Physics, and Biology

The January 2010 Scientific American article "Looking for Life in the Multiverse" analyzes how much the laws of physics might differ while some form of life is still possible. It specifically shows that carbon-based life is still possible when the weak nuclear force is eliminated. The authors are less supportive of non-carbon-based life popular in science fiction, and still find support for the anthropic principle ("conditions that are observed in the universe must allow the observer to exist") in the precise value required for the cosmological constant.

Also, in an earlier post I claimed that all life on earth is dependent on the sun for energy. This is incorrect. The black smoker sea vents on the ocean floor support complete ecosystems including archaea, clams, and tubeworms. Here the energy comes from the interior of the earth instead of the sun.

Monday, December 14, 2009

Science Fiction Morality

In an earlier post I questioned the existence of atheist essentialist philosophers. I had been looking in the area of Philosophy of Science. Turns out a better place to look is Moral Philosophy. Moral Philosophy presents a moral spectrum, from Moral Nihilism (nothing is moral or immoral), to Moral Relativism (morals are relative to individual, social, cultural, or historic circumstances), to Moral Universalism (applies to "all similarly situated individuals") to Moral Realism (moral statements can be objectively true, and subject to rules of logic). In Moral Realism moral rules are similar to Platonic Forms or Ideals. Moral Realism is often grounded in religion, but is also supported by some atheist philosophers (example: Quentin Smith).

The boundaries between the positions are often fuzzy, with various proponents subtly repositioning other prominent philosophers. A historical stumbling block has been determining how a Universal Morality can be possible without recourse to a deity (and this is the basis of the "argument from morality", a proof of God's existence). More recently, based on research in Evolutionary Psychology, Steven Pinker wrote a great essay on how a human moral sense or instinct may have evolved. He presents many rules which are specific to the evolved nature of humans, and some which may be more universal. He says:

"Two features of reality point any rational, self-preserving social agent in a moral direction. And they could provide a benchmark for determining when the judgments of our moral sense are aligned with morality itself... One is the prevalence of nonzero-sum games. In many arenas of life, two parties are objectively better off if they both act in a nonselfish way than if each of them acts selfishly... The other external support for morality is a feature of rationality itself: that it cannot depend on the egocentric vantage point of the reasoner..."

It is interesting to consider how many rules the Moral Realist propose are universal, versus specific to the evolved nature of humans. I wonder how much science fiction Moral Realists read. A common theme in science fiction is the presentation of different alien races, and the different moral imperatives which naturally arise from their different evolutionary heritage. Examples are the K'kree (herbivores) and Hivers (one sex) from Traveller. And aside from other planets, we can similarly consider how morals would differ if radically different earth species (sharks? praying mantis? naked mole rats?) had evolved sentience. The Moral Realists imply that all creatures, regardless of evolutionary heritage, will always converge on the same universal morality (or that creatures which are unable to meet the standard can't achieve sentience). This may be a realistic assumption for a few of the meta-universals proposed by Pinker, but I don't think it applies to the much larger set of rules proposed by the Moral Realists. And without this universality the attempt to use rules of logic falls apart.

Sunday, December 6, 2009

The Fish Balance of Hobbiton

Like everyone else I've been trying to make sense of the arguments between the Keynesians, Austrians, etc. over the financial crisis. Lately I've been trying to puzzle out the National Financial Balance Accounting Identity:

Household FB + Business FB + Government FB + Foreign FB = 0

Described here. The importance of this equation is its use in justifying government deficits:

"We’ve said it before and we’ll say it again. As a matter of national accounting, the domestic private sector cannot increase savings unless and until foreign or government sectors increase deficits. Call this the tyranny of double entry bookkeeping: the government’s deficit equals by identity the non-government’s surplus." Marshall Auerback

From the first linked article, some definitions:

Financial Balance FB = income - expenditures, or saving - investment
income = profits + wages = P + W
spending = investment + consumption = I + C
normally (when FB=0) total income = total spending, so P +W = I + C

In discussing households we simplify by assuming no profits, so P=0

savings = W - C
FB = (W - C) - I

The author of the first linked article criticized an earlier author who claimed it was possible for all sectors Financial Balance to be simultaneously positive, so the Accounting Identity would not have to sum to zero. He claimed this would only be true in a primitive barter-based "Hobbit Shire".

Let's build one. Assume our world economy only consists of Hobbit households. No businesses, no government, no foreigners, no money, no outside investment. One primary resource: deep sea fish. Household "Wages" are the daily catch of fish. "Consumption" is eating fish. "Savings" is storing fish in the snow (Eskimo Hobbits :-) for later. So in good times (summer?) the net FB "Fish Balance" of all the Hobbit households is positive, while in bad times (winter?) the FB can be negative. This doesn't match the original Accounting Identity, but we can make it sum to zero by adding a new often-negative "Natural Resources" term to the equation.

Hobbit Household FB + Natural Resource FB = 0

This forms an interesting analogy to arguments against evolution based on the Second Law of Thermodynamics. Life on earth is not a closed system. It depends on a constant supply of energy from an outside source -- the sun. Life on earth is also dependent on heavier elements produced in prior supernovas. Similarly human economics is dependent on many raw material inputs which are not initially generated by (or often even owned by) humans. For the above Hobbit example I chose deep sea fish as a renewable resource owned by no-one. Other renewable resources include timber, food crops, textile crops, livestock, etc. Non-renewable resources include oil and minerals. Think AH Civilization or Settlers of Catan. And note these raw materials also ultimately come from the sun or supernovas.

This introduces the question of why the real Accounting Identity doesn't include a Natural Resources term. Obviously the real one is about money, not about resources. But if gathering natural resources creates value within the system, shouldn't it be represented? It is also not clear how many other aspects of value creation (such as a household purchasing an income-generating asset, rather than investing in the business sector) are represented.

This also brings up how new money is injected into the system. If the currency were gold-backed, money would be a resource. But a fiat currency is created by central banks. I assume the government deficit spending advocated in the quote above is fiscal spending, and the Government FB is budgetary spending. Alternately could they be advocating monetary stimulus, and the Government FB is that of the Federal Reserve? Does inflation matter in the equation, or is it irrelevant?

I think some of these questions are at the heart of the debates between the Keynesians and the Austrians. The Austrians focus on productive versus wasteful uses of resources, like my Hobbiton Fish Balance (to the extent they recognize the Financial Balance version they see it as an argument for returning to the resource-based gold standard). The Austrians claim recessons are caused by misallocation of resources. Keynesians are more focused on the flow (especially velocity) of money inside the Financial Balance Accounting Identity. Some claim our current problems are due to government not carrying out its proper role: running deficits.

Saturday, October 31, 2009

What's really wrong with Ayn Rand

Ayn Rand was the author of the novels The Fountainhead and Atlas Shrugged and the founder of the philosophy of Objectivism. Recently several humorous articles have made fun of adolescent enthusiasm for Rand, and pointed out the real dangers of retaining this enthusiasm into adulthood [see Alan Greenspan]. But critics often miss the fundamental flaw in Objectivism: the attempt to combine essentialism with atheism. Rand claimed her favorite philosophers were Aristotle and Saint Thomas Aquinas, both of whom placed God at the core of their essentialist philosophies. Rand also wanted to be an essentialist, to help her derive axiomatic proofs of her absolutist moral and economic theories. Essentialism (and the related ideas of universals and Platonic forms) was strongly criticized by more recent scientifically-minded philosophers such as Hume, Popper, and Quine. Rand has never gotten much respect in academic philosophy, and I am unable to find an academically respected philosopher who is both an atheist and an essentialist. I suspect the combination just doesn't work.

As implied in the linked articles, this combination of essentialism and atheism is probably also key to Rand's appeal to a very specific type of adolescent: one who has recently left their absolutist religious faith behind.

Tuesday, October 6, 2009

Dawkins on Essentialism

For the mind encased in Platonic blinkers, a rabbit is a rabbit is a rabbit. To suggest that rabbitkind constitutes a kind of shifting cloud of statistical averages, or that today's typical rabbit might be different from the typical rabbit of a million years ago or the typical rabbit of a million years hence, seems to violate an internal taboo. Indeed, psychologists studying the development of language tell us that children are natural essentialists. Maybe they have to be if they are to remain sane while their developing minds divide things into discrete categories each entitled to a unique noun. It is no wonder that Adam's first task, in the Genesis myth, was to give all the animals names.

And it is no wonder, in Mayr's view, that we humans had to wait for our Darwin until well into the nineteenth century. To dramatize how very anti-essentialist evolution is, consider the following. On the 'population-thinking' evolutionary view, every animal is linked to every other animal, say rabbit to leopard, by a chain of intermediates, each so similar to the next that every link could in principle mate with its neighbors in the chain and produce fertile offspring. You can't violate the essentialist taboo more comprehensively than that. And this is not some vague thought experiment confined to the imagination. On the evolutionary view, there really is a series of intermediate animals connecting a rabbit to a leopard, every one of whom lived and breathed, every one of whom would have been placed in exactly the same species as its immediate neighbors on either side in the long, sliding continuum. Indeed, every one of the series was the child of its neighbor on one side and the parent of its neighbor on the other...


Richard Dawkins, The Greatest Show on Earth: The Evidence for Evolution, p. 23-24.

Sunday, September 6, 2009

More Shedskin Python

Previously I discussed Shedskin Python, a Python compiler I used on my ACO TSP test program. My ant.py test program is now being included as one of the example programs with Shedskin.

The earlier discussed version of Shedskin used intermediate templated C++ code to support the parametric polymorphism (generic functions) inherent in dynamically typed Python programs. In the most recent versions this templating has been dropped, as it was found to be complex to maintain and rarely useful. So my palindrome examples no longer compile.

In testing ant.py could also be sped up by 1.5x with the following shedskin flags:

-b --nobounds Disable bounds checking
-r --random Use fast random number generator
-w --nowrap Disable wrap-around checking

Sunday, August 9, 2009

Backpacking Gear Test



After hauling my camping gear to the airport for RAGBRAI, at the magazine stand I noticed the cover of the latest issue of Backpacker: "Your Lightest Load Ever!" Intrigued, I read all about Ultralight Backpacking and the newest lightweight tech. Then I started shopping. I ended up backing off from ultralight, and now could be classified as lightweight+: 23 lbs base weight (without food, water, fuel).

Gear Weights (spreadsheet)

All listed weights measured myself with a Cuisinart kitchen scale.

I took all the listed gear to Pinnacles National Monument as a test. One night in the campground, day hikes to the Bear Gulch (2.4 miles) and Balconies (5.4 miles) caves, plus 2 miles with full pack. Impressions follow.

North Face El Lobo 65 Pack



This was the one non-"ultralight" purchase. I considered several other recommended ultralight packs, including the North Face "Flight" series Skareb 65, but wasn't able to convince myself of their durability or gear hauling ability (assuming I didn't commit to ultralight for everything else). The El Lobo has some useful features over the Skareb, including a separate sleeping bag compartment and a detachable lid converting to a padded fanny pack. I used the lid pack to carry two 0.7 L water bottles plus food and flashlight for the day hikes. According to spec the El Lobo (at 4 lb 4 oz) was only supposed to be 8 oz heavier than the Skareb (at 3 lb 12 oz). However, my scale shows the El Lobo at 5 lb 6 oz -- over a lb above spec.

In the field the pack worked fine. Held all my (new) stuff, comfortable on the trail. Built-in hydration compartment (common in new packs) is great for hiking, though an internal leak would be very messy. Katadyn water filter (tested at home, not on trip) does provide quick-connect fittings for the drinking hose so the reservoir doesn't have to be opened or removed to refill. Hopefully this will reduce the odds of mishap.

Sierra Designs Vapor Light 2 XL Tent

This tent replaces my 1990 North Face Coriolis 2-person tent (7 lbs with footprint). The Vapor Light saves over 2 lbs, while still being a 2 person tent -- so far I find one-person tents too claustrophobic (plus I like keeping my pack inside). I do expect the Vapor Light to be less durable; I would rather have the North Face in an Iowa Tornado. The stakes it came with (middle) are a joke:



So I replaced them with REI stakes (top) similar to those provided by North Face with my old tent.

I went with the REI-exclusive XL model (93" long, instead of 83" in the non-XL) so it could fit my old long sleeping bag (86"). My old tent was 90" long.

North Face Orion Sleeping Bag (20 deg, synthetic, regular length)

This bag replaces my 1990 North Face Cats Meow (20 deg, synthetic, long length) bag (3 lb 11 oz), saving 1 lb 4 oz. More importantly, the new bag fits in the sleeping bag compartment of the El Lobo pack, and leaves enough room that the hydration pack can be used without the new tent being carried outside the pack. Yes, down could have been even smaller and lighter. I don't want to worry about a wet bag. I decided to go with regular length since most ultralight one-person tents can't hold a long bag. Trying it in the store, regular bags do hold a six-foot person -- if they are sleeping on their back like a mummy.

In testing, I found this doesn't really work for side-sleepers. You get a cold draft over the shoulder, since you can't scoot down to cover unless your legs are bent. I also experimented with the head-cinch cord, which I normally never use (again too claustrophobic). My old North Face bag had a rope cord, and a normal-sized squeeze-lock. The Orion has an elastic cord, and a tiny squeeze lock which gives no feedback as to whether the tiny button is activated. As a result I broke the elastic inside the hood while trying to open it during the night. Frankly this worries me about North Face's "Flight" ultralight product line (including this Orion bag, and the Skareb pack I had considered). With almost 20 years of North Face products (discussed above, plus a ski shell and down jacket) I've never managed to break anything until now. Fortunately I don't use the head cinch anyway. Looking at other bags at REI (including the current Cats Meow) they all use larger squeeze locks and many use ropes instead of elastic. I only found the micro squeeze lock on some ultralight packs.

New Balance 1500 Rainier Hiking Boot

Replaces Vasque hiking boot. Weights are basically the same: 3 lb/pair. Benefit (over many other options) of these New Balance is that they actually come in B widths. No blisters in two days (moderate, hot) hiking.

With a fully loaded pack weight of 30 lbs I didn't want to try just using low-cut trail shoes.

Trimble Outdoors Android G1 Phone App

This was a last-minute Android Market download/purchase, as I didn't want to add 5 oz for my old Garmin GPS (which also has a horrible menu interface, and doesn't support map downloads). I haven't figured it all out yet. I got waypoints for Pinnacles High Peaks Trail onto my GPhone, but didn't download a topo map.



One hilarious part: Help requires web access. Hope you're not too lost.

Next Steps

Turns out my old steel MSR pots are now considered "expedition grade". Ultralight titanium is apparently the new hotness...

Tuesday, June 30, 2009

Pinker Again

In my previous post Sapir-Whorf Revisited I cited Lakoff's theories on metaphor. A much simpler critique of Pinker can be made, based only on Pinker. He says

"...the famous Sapir-Whorf hypothesis of linguistic determinism, stating that people's thoughts are determined by the categories made available by their language, and its weaker version, linguistic relativity, stating that differences among languages cause differences in the thoughts of their speakers". (The Language Insinct, p. 57)

Now simply substitute "culture" for "language":

"...the Revised S-W hypothesis of cultural determinism, stating that people's thoughts are determined by the categories made available by their culture, and its weaker version, cultural relativity, stating that differences among cultures cause differences in the thoughts of their members."

Sound more reasonable? Most of Pinker's critique in his chapter on "Mentalese" would not apply.

Mentalese also appears to have numerous flaws. On a small scale, what is mentalese for our modern word 'telephone'? On a larger scale, for 'cell doctrine'? For 'plate techtonics'? For 'Standard Social Science Model'? For 'physical symbol system hypothesis / computational theory of mind'? All of these concepts are uniquely made available to us by our culture. They were not hard-wired by evolution. They provide categories which determine (or at least cause differences in) our thoughts.

I also doubt human cognition is based on Predicate Logic. We aren't very good at it, and systems actually based on it normally fall apart on the first inconsistency encountered in the real-world (see Carl Hewitt's heroic attempts to fix this in Common sense for concurrency and strong paraconsistency using unstratified inference and reflection).

Sunday, June 28, 2009

Sapir-Whorf Revisited

The Sapir-Whorf Hypothesis asserts that categories in particular human languages influence or even control our possible thoughts. You have most likely heard this presented in its most (in)famous example, about Eskimos having N different words for "snow". I thought this version was well taken-apart by Steven Pinker in The Language Instinct. Recently an Edge essay HOW DOES OUR LANGUAGE SHAPE THE WAY WE THINK? by Lera Boroditsky has made me reconsider.

Using the terminology of Lakoff and Johnson's Philosophy in the Flesh, Pinker's critique is classic first-generation Cognitive Science. Pinker says the brain is the equivalent of a computer or Turing Machine, processing abstract symbols. He asserts that thinking is done in "mentalese", not in a particular human language. Translation to human language is the last step before speaking, so it cannot influence the core of thought.

Lakoff and Johnson's second-generation Cognitive Science can be difficult to grasp, so I'll go slow. It is a big idea, and since you can't see where I'm going, it is easy for me to get too far ahead for you to follow. Simply stated: thinking is largely based on metaphor, and abstract thinking is based on metaphorical analogy to bodily operations in the physical world. Re-read the examples in the first two sentences: "difficult to grasp", "go slow", "big ideas", "see where I'm going", "get too far ahead", "follow". All of these are related to operations or relations in the physical world. Their use in the realm of ideas is much more vague and abstract. It is easy to agree on a measurement for the "bigness" of a tree, but how do you measure bigness for an idea? Works such as Feldman's From Molecule to Metaphor show how evolution started with simple minds able to interact with the physical world, and placed increasing layers of abstraction on top. But abstract thinking still bottoms out at the use of modules originally evolved for physical world manipulation.

So how does this relate to language and Sapir-Whorf? The studies cited by Boroditsky indicate different cultures use different physical-world metaphors for their abstract thinking:

"English speakers tend to talk about time using horizontal spatial metaphors (e.g., "The best is ahead of us," "The worst is behind us"), whereas Mandarin speakers have a vertical metaphor for time (e.g., the next month is the "down month" and the last month is the "up month")."

This is plausible. There is no inherent reason why time should be metaphorically mapped horizontally versus vertically. It can easily be culturally determined rather than hard-wired into the brain. And this puts an interesting new spin on Sapir-Whorf. Thought is not determined by language, but instead both thought and language are determined by culturally transmitted, culturally specific abstract metaphorical mappings. And how is culture transmitted? Primarily through language. So linguistic determinism or linguistic relativity is in a sense correct, but not for the reasons usually proposed.

Friday, March 27, 2009

Brain Scans, Machine Learning, and Trillion-word Web Text Corpus

"The question of how the human brain represents conceptual knowledge has been debated in many scientific fields. Brain imaging studies have shown that different spatial patterns of neural activation are associated with thinking about different semantic categories of pictures and words (for example, tools, buildings, and animals). We present a computational model that predicts the functional magnetic resonance imaging (fMRI) neural activation associated with words for which fMRI data are not yet available. This model is trained via a combination of data from a trillion-word text corpus, and observed fMRI data associated with viewing several dozen concrete nouns. Once trained, the model predicts fMRI activation for thousands of other concrete nouns in the text corpus, with highly significant accuracies over the 60 nouns for which we currently have fMRI data."

Predicting Human Brain Activity Associated with the Meanings of Nouns, Tom M. Mitchell, Svetlana V. Shinkareva, Andrew Carlson, Kai-Min Chang, Vicente L. Malave, Robert A. Mason, Marcel Adam Just, Science, 320, pp. 1191-1195, May 30, 2008.

This research is the most interesting I have seen on the mapping of internal brain structure based on analysis of large bodies of text available from the web. When generating machine-learned models from fMRI data, they found that for their tested set of concrete nouns the most accurate intermediate semantic features were sensory-motor verbs. This matches with others theories of ideas being represented as the convergence of many related sensory patterns. For instance, apple as the convergence of the word "apple", redness, shiny, apple taste, apple texture, picking-by-hand, etc.

Monday, February 16, 2009

Laser Sound




This project is based on the Make Controller I picked up at Maker Faire. It plays tones controlled by the interruption of laser beams. The laser beams are from Laser Levels, and the MacBook software is implemented in the Processing environment.

Details here.

Sunday, January 18, 2009

CUDA GPGPU on MacBook Pro Laptop

I've ported my pthread generic and CUDA GPGPU real-time ray tracers to Mac OS X running on a MacBook Pro laptop. It has a 2.4GHz Intel Core 2 Duo processor and a NVIDIA GeForce 9600M GT graphics processor. The Performance for 1 and 2 software threads is comparable to my older Linux desktop, and the CUDA is within a factor of 3 of the desktop graphics card.

Threads Frames Per Second
1 8.5
2 17.4
GPU 16.7

Sunday, January 4, 2009

TxtView Application for Android



I've written a simple Android application for viewing .txt files from Project Gutenberg. It is still under development.

APK and source available here.