Saturday, April 20, 2024

Following nature, and an SI experiment

 kw: book reviews, nonfiction, biomimetics, simulated intelligence, evocative images

You may have heard of the Lotus Effect. Nanotexturing on lotus leaves prevents or greatly reduces the ability of water to wet them, such that it beads up and easily runs off. This also makes the leaves self-cleaning. This principle is being used to make self-cleaning windows—imagine if you hire someone to clean house who says, "I don't do windows," and you can answer, "No problem!"

This is one of the examples in the book Biomimetics: How Lessons from Nature can Transform Technology by Brian Clegg. Another is Velcro®, which was inspired by cockleburs.

When you get right down to it, these two examples are the two primary biomimetic products that have proven to be economical and widely useful. Others have not. For centuries, flying machines were attempted, based on the flapping flight of birds. There are toy ornithopters, but nothing large enough to carry people has become practicable. Frankly, riding a large ornithopter would probably be unpleasant: Surge, surge, surge. Vomitorium country! The first true powered aircraft, by the Wright brothers in 1903, had fixed wings. However, it did use wing-warping for steering, which is based on the flexing of the pinions on birds' wings. Soon, wing-warping was replaced by ailerons (flaps), which are easier to control, and a rudder was added for further control.

If there were no flying animals, no birds, bees (nor flying insects of any kind), or bats, would humans have yearned to fly with such intensity? The idea of flight was based on biology that we see daily, but its implementation has moved far from what biology can produce. Thus, the author makes the point repeatedly in this little book (~150 duodecimo-sized pages), that biomimetic engineering and technology may use a biologically/evolutionarily developed mechanism for inspiration, but must move rather far afield, conceptually, to be realized as a practical product.

For example, robots in fiction, beginning with the Golem of 16th Century folklore, and moving through the robots in R.U.R. by Karel Čapek and the "positronic robots" of Isaac Asimov, all were more or less human-like. Yet practical robots such as those used by the millions in manufacturing, are seldom more than articulated arms of various sizes and other specialized shapes. Human-appearing robots such as Asimo are still pretty much sideshows, although Boston Dynamics is having some success producing humanoid and canoid (doglike) robots. It turns out that, for most uses, a wheeled vehicle is more useful than one with legs and feet. And while a legged robot can traverse terrain that defeats wheels, it appears that flying drones will take over that niche. It's questionable whether a legged robot uses less energy than a drone, except where there would be the need to carry a heavy load (such as rescuing a person). And, as we see in a later chapter of Biomimetics, a self-driving car is a robot, one that has to see and perhaps feel to do its job.

Neural networks, the technology behind "AI" these days, are inspired by the way neurons interconnect in animal brains, but are only glancingly similar. Such a network relies on raising or reducing the strength of each of millions or billions or trillions of connections, either literally wired connections or, much more commonly, simulated in software. "Machine learning" is nearly all accomplished nowadays with software-emulated neural networks. For comparison, the "neural network" we call the cerebral cortex has more than ten thousand trillion connections, and they have more complex action than just "on/off" with various strengths.

Just by the way, I object to the term "artificial intelligence". While the mechanisms are indeed artificial—that is, produce by artifice—they are not intelligent, having no insight or understanding of what they perform. I much prefer the term "simulated intelligence", or SI. These mechanisms simulate activity that is similar to activities of animals, including humans. But we are no closer to producing AGI, or artificial general intelligence, than the Rabbi of Prague was, when he put a slip of paper bearing the name of The Lord into the mouth of a pottery humanoid figure. Well, enough on that for the moment.

This is the first book about biomimetics that I've seen (there are many) that doesn't go all goo-goo-eyed about the subject. Slavishly following nature doesn't produce useful results. For one thing, evolution doesn't fully optimize any of its "designs" (to anthropomorphize a bit). Consider the human body, sometimes called the "pinnacle of creation": an underdesigned back that is prone to slipped disks and muscle spasms; eyes that get myopic when we read or spend too much time doing close work; muscles that require constant exercise to retain their strength and flexibility… On that last point, most other primates don't need constant exercise, not just because they are more active than sedentary westerners; even when an ape is sedentary in a zoo setting (and usually bored out of its mind!), its muscles retain their tone. Somewhere along the way, humans lost the maintenance mojo, so that "use it or lose it" applies to us more than to nearly all other animals!

What a refreshing and informative book! Much recommended.

Now, to add a bonus subject: The image at the head of this article was produced by Dall-E3 from the prompt "An image that captures the essence of biomimetics." It was the best of eight very diverse images based on that prompt. Another by DE3 is shown here.

One great thing about the generative art programs is that most of them give you four images at each try. So, I "hit" DE3 twice and picked two from the eight. Having several other options, I ran the same prompt by the newest, Google's Gemini. Just below are two images, of eight produced, that I particularly liked.


Note that Gemini tends toward photographic realism, and has to be told to be fanciful. It caught the "bio" part, ignoring the "mimetic" part. Also, Gemini images are 1536x1536, and it tells me that "soon" we'll be able to ask for any size up to 2048x2048. I reduced these to half size.

Then, the Playground AI environment has three "engines". This pair of images came via the Stable Diffusion XL engine:


The second image used the Mysterious filter. One can request different aspect ratios, so these are 1024x576, a 16:9 ratio. SDXL also aims at photorealism unless told otherwise.

Now, with the Playground v2 engine:


No filter was used for either of these. All the images from which these were selected had a whitish theme. Lastly, using the Playground v2.5 engine:


This engine is deliberately more "creative" and produces more colorful images than the others. The second image used the Masterpiece filter (Mysterious is only available for SDXL). Whatever goes on with the Masterpiece filter, the result is the least "biomimetic" of the bunch.

Simulated Intelligence can do wonderful things. I suspect it is more free than a human artist would be, because the artist would have a lot of background knowledge that the generative art programs lack.

Monday, April 15, 2024

Volcano viewing is going on my bucket list

 kw: book reviews, nonfiction, earth science, geology, volcanology, planetology

My uncle was a professor of geology. He had a "volcano fund". Whenever he got news of an interesting volcano beginning to erupt, he would try to go to see it. This often required getting someone to fill in for him to teach a few days of classes. He had to be selective, with 20-40 or more active volcanoes spouting off on any given day. For example, "interesting" included "rather safe" and also, erupting day after day to give him time to get there and have a good chance of seeing the eruption in progress.

On the other hand, although I have degrees in geology, I have never seen a volcano erupt. Time's-a-wastin'! I'm not getting any younger, so I'd better get on the volcano grapevine. A big component of that grapevine is the Current Eruptions page at the Smithsonian Institution, something not available when my uncle was alive. The map shows the current situation as of April 15, 2024, of volcanoes that are "in continuous eruption", but you need to read the definition of continuous…

Dr. Robin George Andrews is certainly on that grapevine. He's in the enviable position of being able to go see volcanoes pretty much at the drop of a hat. His book Super Volcanoes: What They Reveal about Earth and the Worlds Beyond brings us very informational stories about what volcanoes are, where they are to be found, and how they help us discover the dynamics of a planet. By the way, note that the title is not Supervolcanoes but Super Volcanoes, as in "Volcanoes are Super" but with a less juvenile connotation. Supervolcanoes, including Yellowstone caldera, occupy one chapter.

An example of seeing the dynamics of Earth is quite visible in the map above: the "ring of fire" around the Pacific Ocean. This has been known about for centuries, but it was only explained after the discovery of plate tectonics in about 1960 by Marie Tharp and others. The Pacific Ocean is slowly shrinking, being "subducted" under moving plates bearing the continents all around it; the Atlantic is growing at the same rate. The motions are mostly in the range of 2-5 cm/year, about the speed a fingernail grows. The very different style of (now extinct) volcanism on Mars and Venus indicates that plate tectonics did not happen on those planets, or if it occurred very early on, it didn't last long, and hasn't operated for at least three billion years.

By contrast, this image of the moon Io shows us a smallish body with a surface that consists entirely of volcanoes and lava flows. The blue plume is an erupting volcano. Although Io doesn't seem to have plate tectonics, it is kept hot (about the boiling point of sulfur: 445°C or 832°F). How? Its orbit around Jupiter is elliptical, and the orbit is kept from being "rounded out" by resonance with the orbits of its sister moons. The elliptical orbit results in tides that stretch and squeeze Io, heating it halfway to boiling in the process. For the curious, Io is pronounced "EE-oh".

You may have heard that some of the moons of Jupiter and Saturn have subsurface oceans, probably of salty water beneath a thick (20-50 km) crust of ice. Io has a subsurface ocean of molten rock! Actually, it is kind of a slushie with crystals of high-temperature minerals in a broth of lower-temperature mineral melt.

Earth has three ultra-famous volcanoes. One of these is Kilauea, in Hawaii. It is huge, and it tends to erupt more than half the time. For the past several days it has not been erupting, but mini-earthquakes are going on all the time, indicating that magma is moving around beneath the crater. It could start again any time, and it might then erupt for a few days, or months, or even several years.

The most beautiful volcano, in the eyes of many including me, is Fujisan in Japan. It is often called Fujiyama, but in Japan most mountains are given the suffix "san" rather than "yama". Both suffixes mean "mountain". This view is from the southwest end of Ashinoko ("foot-shaped lake"), in the Hakone area, a national park. I have seen this view from this spot, but in the springtime, when these maple trees were green. Fujisan is considered dormant, but it is not entirely inactive. Its most recent eruption was in 1707.

The most feared volcano by many, the one usually called a supervolcano, is the Yellowstone caldera in northwestern Wyoming. This is one of several, probably at least 20, on Earth. The Supervolcano page of Wikipedia states that at least 60 "VE8" eruptions are known to geologists. The Volcano Explosivity Index is logarithmic, and the biggest events, dubbed VE8, yielded at least 1,000 cubic km of ejecta, either lava or ash or both. The most recent such eruption was 26,500 years ago in New Zealand. Of the five known VE8-size eruptions by the Yellowstone hotspot, which has moved across the northern US for 40 million years, the most recent was 640,000 years ago, and barely makes the grade as a VE8. The largest known eruption from this hotspot occurred just east of southern Idaho, and was about three times that size, 2,800 cubic km. That makes Yellowstone a rather small supervolcano! At least four supereruptions elsewhere exceeded 5,000 cubic km, and two, one in Canada (half a billion years ago) and one in Indonesia (75,000 years ago), may have exceeded 12,000 cubic km of ejecta. For reference: the abyssal plain of the Ocean has an average depth of about 4.5 km, so 12,000 cubic km would fill 2,650 sq km of the ocean, or about 40% of the area of Delaware or 65% of the area of Dubai.

The author discusses the Yellowstone hotspot and other hotspot supervolcanoes for a full chapter, and tells us we have little to fear from Yellowstone. The hotspot's current location is at the eastern edge of the Yellowstone Caldera, and it is moving eastward a few cm/yr. To be accurate, hotspots don't actually move, the continents above them move. The North American Plate is moving almost due westward, while the Yellowstone hotspot periodically pushes magma into the crust and starts a new volcanic province, at intervals of about a million years. The current motion is bringing a thicker piece of very resistant crust over the hotspot, and it may not be able to cook its way through the crust again until the rest of the continent crosses over it, in 60 million years or so.

There is much, much more, but this is a taste. Super Volcanoes is super fun to read. A final volcano image, this one imaginary:

Wednesday, April 10, 2024

Speculative synthesis

 kw: book reviews, nonfiction, popular culture, history, conspiracies, paranoia

Paranoia begins in the cradle. It is our natural, honed-by-evolution response to the unknown and particularly the unexplained. What's the message of numerous fairy tales? That they really are out to get you. But who is "they"?

  • "Jack and the Beanstalk" among many others: giants.
  • "Little Orphant Annie" (by James Whitcomb Riley): goblins ("…the Gobble-uns'll git you Ef you Don't Watch Out!"), one of the first poems I learned.
  • "Lord of the Rings": Sauron, orcs, balrogs, etc.
  • "Snow White": the Queen.
  • Many "Knights of the Round Table" stories: dragons, black knights, wicked kings, etc.

Then there's "stranger danger", which is nothing new; 60+ years ago we were told not to accept candy, or anything else, from a stranger, particularly a grownup.

In the Bible: Satan (= the Devil), demons, fallen angels, Nephilim (and several other names for "giants").

A more nuanced view is found in the lyrics of "Somebody's knockin'", sung by Terri Gibbs:

Somebody's knockin',
Should I let him in?
Lord, it's the devil,
Would you look at him!
I've heard about him
But I never dreamed
He'd have blue eyes and blue jeans.

Akin to this is the semi-joke: "Who wins in a lawsuit? The lawyers."

And this from Ronald Reagan: "The ten most frightening words are, 'I'm from the government, and I'm here to help you.'" <emphasis supplied>

Which brings us to a wonderful book, Stuff They Don't Want You to Know by Ben Bowlin, Matt Frederick and Noel Brown, who produce a podcast by that name. The subject is conspiracies and conspiracy theories.

I have long since learned that, in nearly all cases, the words "…don't want you to know" is a preface to a scam. And these days, the most common goblins out there are scammers. In the case of this book, the authors want to equip us to discern fact from fantasy…at least a little.

It is a sad fact that genuine conspiracies abound, and sadder still that the views so frequently denigrated as "conspiracy theories" are so frequently based on facts. The trouble comes when people connect the dots and get it wrong. Dot-connecting is what we do, for example, when a spaced series of odd noises gets our attention; the cave dweller deep in our brain goes on the alert, "Is it a tiger?" Even when it turns out to be two birds and a squirrel, it takes a while for our adrenaline to subside. The cave dweller of 100 generations ago did well to be prepared for a tiger, because sometimes it really was a tiger! People who didn't go on guard became tiger lunch and have left no descendants. We're all descended from those who outwitted the tigers.

What do we do when confronted with a purported conspiracy? In each of the nine chapters the authors dig into at least one genuine conspiracy. The perpetrators are very often in government; others are big businesses; and some are genuine cabals in the shadows. In the latter case, the authors conclude that there really isn't a deeply conspiratorial group "pulling all the strings", but that there are plenty of shadowy groups out there who would do so if they could. They proclaim this book as "an important tool, a way to further our argument that the world is both understandable and worth understanding." It's just work to do so, and most folks are too lazy. Thus so many take the easy way of believing the next paranoiac to come up with a new "theory".

The authors are dissatisfied with the term Conspiracy Theory. In science a theory is the synthesis of a set of tested and verified hypotheses, backed by observations and experiments, and it explains some collection of phenomena in a way that one may make predictions about the behavior of a system. Conspiracy theorists connect dots—and there are plenty of dots to connect—but find gaps; they get into trouble when they "invent" a few dots to fill those gaps. Thus I prefer the term Speculative Synthesis.

It is very hard for a scientist who has formulated a few hypotheses into a germ of a theory to set it aside if new information, the results of new experiments or observations, contradict the formulation (synthesis). Much of scientific training is aimed at developing habits of mind that help a scientist divorce feelings from facts. In my experience, it works part of the time, but less than half the time. Thus scientific journals are full of royal battles over conflicting views of how certain "findings" are to be understood. Without the benefit of a scientific education, or the blessing of a wise mind at the outset, most folks simply cannot back away from a comforting, if scary, "theory". They get an emotional attachment, which seldom is broken.

So, to pick one example, does the US government engineer "regime change"? It has apparently made more than 50 attempts since 1945! Some have succeeded; a detailed case of the overthrow of the government of Guatemala in 1954 illustrates just what it entailed. That was a business-led operation in which the government willingly cooperated "for the good of the country" (and for the banana company).

From another chapter: has it occurred to you to wonder where the word Propaganda came from? Of course, the word is Latin, and sure enough, it traces back to the Medieval Catholic Church, which in 1622 set up Sacra Congregatio de Propaganda Fide, or Sacred Congregation to Propagate the Faith. Propaganda is for propagation of an ideology: gain people's minds and one can affect their actions. But, wait a minute! What about salesmanship? What about persuasion in general? Formally speaking, propaganda is salesmanship, it is persuasion, with a political rather than mercantile goal. Under the banner, "All is fair in love and war," propaganda is recognized as a kind of lie, at least by omission. Otherwise known as "shading the truth" by leaving lots out. "Blatant propaganda" may contain no truth whatever.

In the ultra-polarized America of today most of us are on one side or the other, looking with intense suspicion at "them", the other side. The fact is, on both sides of the divide, small numbers of the most committed people really are carrying out, or attempting to carry out, some kind of conspiracy to ensure that "their" side wins the next election, or takes over this or that school board or county council, or gets a certain law enacted, or gets an otherwise forgettable product a larger market share. I feel sorry for the always-offended snowflakes out there. We all need to grow a thick skin, and develop near-infinite sales resistance. For most of us, the worst we'll have to contend with are the phone calls about solar energy "for free" (don't make me laugh), or extended warranties for car or house, or multitudes of "charities" you've never heard of.

But if you get involved in the "truth" business, learn to resist going down some infinite rabbit hole. Reading this book is a good start.

Monday, April 08, 2024

Numbers that forced us off the number line

 kw: book reviews, nonfiction, mathematics, complex numbers, introduction

It is rare for me to post the cover of a book I am reviewing. In this case, when I saw in the subtitle "square root of minus fifteen", I just had to show it. The picture made me think, "What is the beeth root of a yellow tulip?" That's a lot harder to imagine than any even root of a minus number!

I found Imagining Numbers: (particularly the square root of minus fifteen) by Barry Mazur to be a very thorough leading-by-the-hand-gently introduction to "imaginary" numbers (those based on the square root of minus one), and the "complex numbers" that derive from them, . A Complex Number is a two-part quantity; one part is "real" and the other part is a real number times the square root of minus one, called i or j. Thus 1+j and 3-2.4j are complex numbers.

I was introduced to the concept of a number named i (for imaginary) in a high school math class, but in college I primarily studied engineering, where I learned that engineers prefer it to be named j, to get away from the notion of "imaginary." However, for the graphical expression of complex numbers, the horizontal axis is equated to the number line, and is called the R or Real axis, and the vertical axis is called the I or Imaginary axis; there's no getting away from it. One may call the R part the "scalar" part of a complex number, but the other part just doesn't have a good alternative to "imaginary". This paragraph touches on concepts that occupy 2/3 of this book. The latter third focuses on graphical representation.

I was introduced to the graphical expression of complex numbers this way: First it was emphasized that 1 has two square roots, 1 and -1. Then, by analogy, we learned that -1 also has two square roots, j and -j (which is -1×j). Before going further, we got to experiment with multiplying various quantities with j. Then we were asked to imagine how j or -j could be "halfway" between 1 and -1, without being equal to zero. Finally, someone asked, "Then where does that go on the number line?" At that point we were shown that a second number line crosses the usual number line at right angles, forming a Cartesian coordinate system in which the x-direction was the R part and the y-direction was the I part of a complex number. Furthermore, going from 1 to j to -1 to -j and back to 1 again was seen to be a rotation. Doing some multiplication and addition of various elementary complex numbers with one another showed us how they had graphical analogues. Complex numbers are an alternative notation for a polar coordinate system, one based on distance-plus-angle rather than horizontal-plus-vertical. This fixed the concept in our minds. Understanding this was essential to getting the hang of engineering calculus.

Dr. Mazur's genius is in understanding that anyone who can do basic algebra can learn to understand complex numbers. This book takes elementary, easy steps, first through the history of how i was very gradually understood to be something very useful, and not at all "imaginary," and then through the way graphical representation that helps us get the concept and fix it in our minds. Complex numbers and complex analysis are essential for engineering, particularly when cyclical processes are being designed or analyzed.

I must admit to a bit of ennui at times. The author tells us several times that the book is really written for those who don't already understand complex numbers. Anyone who has not delved for decades into engineering math, as I have, will probably find the book a bit challenging, but not boring, and it will draw one along to take in concept after concept.

I must admit, I never did find out why the square root of minus fifteen is emphasized in the subtitle…

Thursday, April 04, 2024

Food, Food, (not so) Glorious Food

 kw: book reviews, nonfiction, food, secrets

OK. The title is The Secret History of Food: Strange but True Stories About the Origins of Everything We Eat, by Matt Siegel. Right off the bat I would replace the word "Everything" with "a Few Interesting Things".

Mr. Siegel seems to be torn between celebrating food and suspicion about it. He tells us of the process of making vanilla (Ch 6), with a side note about saffron, which is an even more arduous process. The description itself takes no more than a couple of pages, and then we are treated to a history of the uses of vanilla, which remains the most popular flavor of ice cream, as it was in the time of George Washington. It is also the basis of a great many popular perfumes. I learned from a realtor that a few drops of vanilla extract on a piece of cotton, placed on a sunny windowsill during house showings, can lead to larger offers for a house purchase. Of course, vanilla is so popular in so many foods that the natural product can supply only 15% of market demand. The rest is produced chemically. The word "vanilla" has become a metaphor for "ordinary", for example in the sex trade: an "alternative" sex act, one that cannot produce a pregnancy, is something besides "vanilla". When I was a software engineer, my colleagues and I would refer to a program or system that we used right-out-of-the-package without modifying it as "vanilla"; usually we modified stuff.

The second chapter of the book brings us the history of pies in the West. We may remember nursery rhymes such as "four-and-twenty blackbirds baked in a pie." Prior to a century or two ago pies in England, Europe and America were mostly meat pies of numerous varieties—seldom fruity desserts—with a thick, inedible crust that was used as a container and dinner plate. The crust would be discarded. The more recent "chicken pot pie" is a slightly more edible remnant of this tradition…and a shuddery memory of my childhood. The light, flaky pie crusts of today, which are not only edible but can be good for you if made with liquid oil (the way I make them) rather than lard, were an innovation that began in the 1700's.

Many of the stories are about things done to food to make it more profitable for the seller, and often more dangerous for the eater. The scandal about melamine in dog food in 2007, and similar scandals about "fillers" in food for pets and humans, are just recent cases in a centuries-long list of things like chalk in milk, water in wine, and motor oil in "olive" oil. 

The author doesn't get much into food poisoning due to contamination such as E. coli in lettuce (and a whole lot of other kinds of produce). There's a limit to the size of such a book. He has a goal: to show certain trends over time. Foods once considered toxic, such as tomatoes and potatoes (which are nightshades), are now "healthy choices". Of course the Keto crowd eschews potatoes because they are so starchy, so the "progress" is a mixed bag. The leaves and flowers of nightshade-family plants are very toxic. But the fruits (tomatoes) or roots (potatoes) are not, with the caveat that if potatoes are green from sun exposure, they are toxic.

In Chapter 8, titled "The Choices of a New Generation", he starts with the notion of Cockaigne, introduced in Ch 7. As a child I learned the song "Big Rock Candy Mountain", about the bubble-gum trees and the lemonade springs, and so forth. It is in the tradition of fantastic places of plenty, hedonistic heavens. He says, "We're living in a modern-day Cockaigne, a utopian fantasyland where food has no limits and our choices defy natural order." Giant container ships such as the one that recently destroyed a major bridge in Baltimore usually include foodstuffs in their cargo, so we can have oranges from Chile in the wintertime and "winter melons" in summer.

Food, which once required much of our day to earn, obtain, and prepare, has become super-abundant in at least the First World. A typical grocery store stocks 50,000 to 100,000 distinct varieties; so much so that certain store chains such as Aldi pride themselves on a much reduced stock—20,000 varieties or so—of items that are touted as more carefully chosen and better values. Even 20k varieties would shock the leggings right off of our Colonial ancestors (or our great-great grandparents in the Old world).

The book is great fun to read. Perhaps a few parts, such as those about what gets into adulterated food, aren't such wise reading at mealtime. Otherwise, enjoy!

Friday, March 29, 2024

So you think you know money

 kw: book reviews, nonfiction, finance, personal finance, money management

We'd all like to have a mountain of money. I get it. Two problems arise: what to do to obtain it, and how to keep from losing it. Kevin O'Leary gets it also, and he has advice on both fronts. His 2012 book may be twelve years old already, but it is exceedingly relevant.

In Cold Hard Truth on Men, Women, and Money: 50 Common Money Mistakes and How to Fix Them Mr O'Leary, AKA "Mr Wonderful" on Shark Tank, offers multifarious advice from one who may be a billionaire, but hasn't forgotten when he wasn't one.

I could get into the weeds on many points. I'll touch only on a few (of the 50!), because you really won't learn much from me, but you can learn much by reading for yourself, and by taking notes where he suggests that you do so.

One point is reiterated, because it's a hard one to learn. Emotion and envy are enemies of effective finance. I'd put it this way: Emotional decision making is a very expensive hobby, exceeded only by Envy. One tool offered to counteract these enemies is this list of questions to ask yourself about any durable purchase, from a book or a tool to a house:

  1. I have given this purchase sufficient thought?
  2. Buying this item will not create debt for me or anyone else?
  3. I not only want this item, I need it?
  4. This item is more valuable than the interest I'd earn if I saved the money instead?
  5. This item will matter to me in a year?

If you can't answer with five YESes, don't buy. Questions one through four are also relevant to consumable purchases (food and drink, tobacco, lawn fertilizer…), but ongoing maintenance purchasing is taken up elsewhere in the book. Particularly for purchases which have the potential to create debt (Q#2), these questions need to be answered YES by both you and your significant other. I don't mean, "It's a good idea to consult with…" but "NEED"; a requirement. These questions are accompanied by a pledge card that O'Leary wants you to sign, cut out, and keep with you, on page 50.

Here is an idea that never occurred to me, from his advice to his daughter: "Have a separate no-fee, low-limit credit card for purchases online." This limits the damage a fraudster can do if (when) an online account is compromised (hacked). This is something I'll discuss with my wife. Getting a credit card is a meta-purchase, a facilitator of purchases.

On the "gaining money" side of things, he has advice about investing. Of course, you may have heard that it is best to first invest in yourself and your skills, by obtaining as much education or training as you can afford…but not more. Going into debt to get a degree hasn't worked well for most people (I have a good friend with four degrees, a BS, two MS's and a PhD, and his wife has a BA and MFA. He worked at a great engineering company, making lots of money, and it took them until the age of 50 to pay off all those student loans. I worked my way through, so it took seven years to get a BS and another six to get a MS. When I was in my thirties, my wife and I were debt free, and this friend and his wife were just beginning to dig their way out.).

But what about investing. Your education is over. You have enough income to save some; this can always be the case if you are careful with money, and Mr. Wonderful has excellent advice about just what "being careful" really means. Anyway, what to invest in? He recommends dividend-bearing stocks. He writes, "The culture of companies mandated to pay dividends is different from that of those whose mandate it is to simply grow market share and create profit." (p.70) Their CEO's pay attention to maintaining a balance sheet that keeps paying dividends to stockholders. This make a company both stable and prone to gradual, balanced growth. 'Tain't sexy, but it's effective. I encountered similar advice long ago, and it has worked for me.

The other half is hanging on to whatever you have gained. I know someone who won several million dollars in a lottery. After a few years, they confessed that it nearly ruined their life. They had to fend off grasping relatives, "acquaintances", and frivolous lawsuits by random people. They were cheated by money managers. They also found how easy it is to pick up expensive habits. They managed to learn a few things very fast, and sock away some funds before everything was gobbled up. They didn't quite lose everything. It could have been even worse. O'Leary has advice about dealing with all these things and more.

One final item I'll mention: consumable, large expenses such as weddings. Do you really need a $30,000 open bar at your wedding or anniversary party? O'Leary mentions on page 171 spending a total of $10,000 on his wedding. To me, that is a lot. My wife and I are both quite frugal, she even more than I. Our wedding "venue" was the house of a friend. One of her friends made a dress for her. Her sister made a wonderful cake. I cooked a main course for 100. One of my friends baked the bread and made salad. Another prepared a vegetable course. Nearly everyone present was a teetotaler, so no alcohol needed to be bought; those that wanted a drink were free to head to a tavern afterward. Our honeymoon was at a cabin near a national park; we both love walking and hiking. That was 49 years ago. No regrets.

I note that four of O'Leary's five books are Cold Hard Truth on money in various aspects. If you really want to know money, particularly if your life experience indicates you don't know it well enough, any or all of these four books will fill plenty of gaps.

Monday, March 25, 2024

I am so glad to learn that Copy Editors still exist

 kw: book reviews, nonfiction, copy editors, copy editing, punctuation, word usage, grammar, memoirs

Mary Norris is one of those wonderful people who make sure that "everything that's fit to print" is also "fit to read". Her 2015 book is Between You and Me: Confessions of a Comma Queen. She is a long-time copy editor for The New Yorker. One of her mentors actually had a "comma shaker", a decoration at her desk, to emphasize that the style favored by TNY incorporates plenty of commas, but not too many. A big bone of contention between different schools of copy editing is the serial comma. Some know it as the Oxford comma, apparently because at one time it was universally used in publications at Oxford (not so much, these days, I understand). 

And just what is this mysterious comma? It is the one used after "and" in a series such as "red, white, and blue". Most publications these days don't use it, preferring, "red, white and blue". However, while it is OK to leave the comma out of that particular list, consider the sentence, "The singer was accompanied by his two ex-wives, Kris Kristofferson and Waylon Jennings." Here, a comma before "and" would make it clear that the two men mentioned are not former wives of the famous singer! The list refers to four persons accompanying him.

So, copy editing. You might think the subject is going to be dull. I assure you, it is not. In this author's hands, it's delightful.

Any memoir begins with an obligatory chapter or two about one's early life. By the end of Chapter 1 the author has been accepted into the august halls of TNY, and she can get down to the business of regaling us with stories of solecisms and how they are exterminated…or not. Here we meet the formidable Lu Burke and her comma shaker, and others who guided Ms Norris's career, sometimes catching her slips, and sometimes grinning in chagrin when she catches one of theirs. Several pairs of eyes scrutinize a manuscript or galley proof before it ever hits print, the work's author (and often several friends and relatives), the intake editor (the one an author might think of as "My editor"), the typesetter (although these days most authors submit electronic text, sidestepping the typesetter), the copy editor, a supervising editor, and someone in the print shop who at least glances over the text while making sure the layout is proper.

Many of the details of a copy editor's job, as described throughout the book, are relevant to a time before word processing and the ubiquitous PDF file: Lots of hand markup, and markup of markup, and an author's "STET" where he or she doesn't want a certain change to be made (I had to do a ton of STET's while negotiating with a copy editor for a British journal, who tried to de-Americanize my text, while I wished to retain my own voice, not sounding like a warmed-over Brit). It isn't clear how does all these revisions and re-revisions electronically. I should ask my brother, who publishes a book every few years!

[For this image I had no success getting Playground/Stable Diffusion to show a comma shaker, but a different query popped out this kettle of question marks]

The author's career at TNY really began when she caught an error all others had missed: the word "flour" spelled as "flower". Homophones are hard to catch, and are so far impossible for "spell checkers" in software to detect. They're one big reason we still need copy editors. Some chapters are devoted to grammatical solecisms ("solecism" is the grammarian's term for "sin"). Others to punctuation marks and their use/misuse. She alternately rhapsodizes and agonizes over the way one must edit poems by Emily Dickinson, who used dashes of several lengths—sometimes half a line—in favor of most other punctuation. Opinions vary as to how many "buckets" to use for her dashes. The usual set, more than plenty for most of us, numbers four:

- Hyphen, also used for a preceding minus sign, sometimes.

– En dash (the width of a capital "N"), usually used for the minus sign; it's the same width as the +.

— Em dash (the width of a capital "M").

—— Long dash, which doesn't have a code in Unicode, but is entered as two Em dashes strung together. It runs the risk of the two Em dashes being separated at the end of a line.

Plus, there are rules at TNY about when to surround a dash with spaces, and when not to do so. Other punctuation marks that get lengthy treatment include the semicolon, colon and apostrophe. A few pages are devoted to dangling participles, such as, "Over tea in the greenhouse, her mood turned dark." It wasn't her mood that was hovering over the tea, so the sentence was rewritten, "As we drank tea in the greenhouse, her mood turned dark." That made it clear that one of the tea drinkers possessed the darkening mood (or was possessed by it).

In these reviews I have noted when I've found more than one or two evident errors in a book's text, and I have complained about the evident lack of competent copy editors (often, total lack…). I note that I have used an ellipsis (…) a couple of times. Ms Norris tells us of a writer who uses the ellipsis almost to the exclusion of other punctuation marks. I lends a breathless quality to the writing, and one hardly knows where to pause and recollect one's thoughts. It also leaves a copy editor quite unable to do much.

I cannot close without adding my 2¢ to the chapter on "you and me", which these days is so frequently replaced with "you and I", as in, "My brother called for you and I." Hardly anyone would write, "My brother called for I." Rather, we would write, "My brother called for me," which is the clue that the pronoun is the object of "called", not the subject. A side issue is that, while my generation was taught to always mention oneself last, that practice has also been gradually eliminated. Now we hear, "such-and-such happened to me and him," for which at least the pronouns are back in the correct (objective) case. I was taught that anything other than "…to him and me" is impolite. My 2¢? AMEN! The book ends with the author, at a memorial event for Lu Burke, having mentioned "Alice or me." Correct, right up to the finish.

Wednesday, March 20, 2024

...and just who might be listening back?

 kw: book reviews, nonfiction, SETI, extraterrestrial life, philosophy

Seth Shostak is an idiot…or to be more charitable, he is dramatically misled by his own idealism. He is a very prominent proponent of sending messages toward possible alien intelligences, and he is the senior astronomer for the SETI Institute. He minimizes the possible risks we face from becoming known to "the Universe". If someone is out there listening, how will they react to learning that we exist?

In The Contact Paradox: Challenging Our Assumptions in the Search for Extraterrestrial Intelligence, author Keith Cooper lays it out plainly. He sums it up nicely in a paragraph on page 295:

We search the Universe for evidence of extraterrestrial life to make contact with others, for humanity to be able to share the Universe with others. Yet we find ourselves in a position of not being confident about whether we should try and make contact.

We dream of learning wonderful, life-changing things from superintelligent, hyper-advanced space aliens, or ET's (ExtraTerrestrials). All too often, the idealists in particular ignore the fact that every human being is both good and evil. Under some circumstances, we are altruistic, even heroic. Under others, every single one of us is capable of murder and larceny. There are no exceptions. Can we expect anything better of the denizens of another solar system? What are the chances of any intelligent species that arises due to evolutionary processes becoming unfailingly altruistic not only among themselves, but toward others to whom they are not remotely related?

The author makes a deeper point: by searching for "others" we search for ourselves. We project our hopes and dreams on them. It reminds me of a Chinese parable:

A man prayed daily for the Dragon to come. He dreamt about meeting the celestial being, imagining the wonderful things he might learn. One day there was a knock at the door; really, more of a crashing sound. The man opened the door and he saw him: scaly, fiery orange and red, forty feet long, with eyes the size of saucers and teeth like daggers. He screamed in fright, "Who are you?" The voice hissed and roared through him, "I am the Dragon. Am I not what you wanted?"

More succinctly: Be careful what you pray for; you just might get it.

A rather unbalanced segment of American society (few people elsewhere are as enamored of ET's as Americans) lives in combined fascination and fear of "flying saucers" and the "space aliens" that might "abduct" them to do "genetic experiments". Such sexual anxiety says a lot more about these people than it does about ET's. Is it really possible that Earthly genetics can have anything to do with ET's?

Sidebar: People with biological education (whether schooled or self-taught) usually know the Central Dogma of Genetics: DNA→RNA→Proteins. More recently, it has become clear that more than half of the DNA for which we know a function does not follow this dogma directly, but is regulatory, and modifies what happens when a "coding gene" is expressed to RNA and then to a protein. The key to how this works is the coding table, or The Code, which translates 64 codons into 20 amino acids plus a "stop" signal.

A little known fact about The Code: There is one Standard Code for the nuclear DNA of nearly all eukaryotic organisms, and it is also used for the DNA of most prokaryotic organisms (bacteria and archaea, which are bacteria-sized). But on Earth there are 25 other codes! See the details at this NCBI site. A few of these alternate codes are used by simple protozoan creatures, while many are for the mitochondria in various eukaryotes, and the rest are for various families of prokaryotes. This is just for Earth life. How many alternate codes are possible? Will any aliens out there have DNA like ours, and if so, will it be based on "our" Code?

The calculation P[64:20] yields 2.1x1036 permutations. In common terms it is 2.1 trillion trillion trillion. That is one estimate of the number of possible DNA-to-Protein Codes. However, while there are as many as six codons per amino acid, the codons are grouped, so the number of efficient DNA codes may be smaller by a factor of a billion or so. Even then, we are left with a 28-digit number. It is extremely unlikely that an alien species from any other star system will have any genetic similarity to Earth life. Further, there is no guarantee that the same 20 amino acids will be used everywhere. It is actually more likely that, of the hundreds of possible amino acids, there would mostly be species with hardly any proteins that are "compatible" with any of ours. The aliens may not even be able to eat Earth foodstuffs (ourselves included!).

The book has an illuminating and comprehensive history of SETI and a detailed discussion of "things to look for" besides radio signals: flickering laser or maser light, "biosignatures" (such as the presence of both oxygen and methane together), and technosignatures other than radio (such as anomalies in a star's light caused by immense clusters of solar arrays). There is no need for me to get into detail; it's hard to beat the author's writing!

The book is a great joy to read. We have a lot to think about as we consider Who Is Out There.

Monday, March 11, 2024

Creeping toward the Matrix

 kw: book reviews, nonfiction, cosmology, simulation, modeling

I was for several years, in my career of writing scientific software, the leader of a "Modeling and Simulation Group". One of our products had three sections, simulating first the geochemistry of crude oil generation from organic matter in deep rocks (up to a few kilometers), then the upward migration of the petroleum liquids through porous rocks, and finally their entrapment against nonporous, or less porous, rock layers to form oil and gas reservoirs.

I was sent to a few exploration offices to show off the software. In one instance, after the geologist set up access to a set of grids based on seismic data, I ran the software, which displayed the progress through time of oil and natural gas collecting under the trapping layer some half-kilometer beneath our feet. At the end of the run, he pointed to one green blob on the map, saying, "This is X field," and to another, "This is Y field." Then he pointed to a third one between them, asking, "But what is that?" I answered, "That could represent a lot of money." As it happened, the company had decided to sell that property to another company. That oil company made the money! But the software found the oil before the property was drilled. Later that year I spoke about the experience at a Research Review. My talk was titled, "Finding Oil in a Computer."

It was with great relish that I read The Universe in a Box: Simulations and the Quest to Code the Cosmos by Andrew Pontzen. If you buy the book feel free to download this image to print a bookplate; it's 1024x1024 px. Use Upscayl or something similar if you want it rendered at higher resolution. I produced it using Playground AI; the only prompt was "Cosmology". I tinkered with Samplers and other parameters, looking for something else. Getting this image was a side benefit.

The author could have delved deeply into sundry technical issues—there are many! Instead, he has skirted these, providing just a taste of some of them, in favor of the philosophy and motivations for making computer simulations of natural phenomena.

The terms "simulation" and "modeling" have overlapping meanings. In principle, a Model is the framework and the sets of parameters that define the physical structure and the physics rules to be followed, while a Simulation is the operation of the Model over a chosen span of time, producing a series of output data sets that describe the expected physical state of the modeled "thing" at one or more points in time, whether past or future. Note that a simulation can be done on equipment other than a computer. One story of the book is about a galaxy simulation done with light bulbs and photocells and a glorious tangle of wires.

Weather forecasting is one very visible result of computer simulation, seen daily (or hourly) on newscasts and in the various weather apps on our devices. There are a couple of dozen important models used by weather agencies the world over. One expression of these is the Spaghetti Plot of a hurricane's forecasted track, as produced by several models. The models differ in the importance they place on various aspects of the modeled system, including whether it represents the whole Earth or a hemisphere, or a couple of continents.

All weather models are based on a global General Circulation Model, in which the atmosphere and the land and sea surfaces in contact with it (and sometimes a surface layer of the ocean) are divided up into roughly ¼ to ½ million quasi-rectangular portions. Half a million to a million "cells" is about the most that modern supercomputers can handle. In general, spatial resolution is likely to be as large as 200x200 km! The Earth's surface area is about 127 million km², and the models have between 20 and 40 vertical layers (at present). A 40-layer model would have more than five billion cells of 1x1x0.5 km, so to get the count below one million requires using cells with an area of more than 5,000 km², which is 71x71x0.5 km, and most models are set up for grid squares of about 100x100 to 200x200 (and half a km thick). The physics rules, primarily those relating to pressure and temperature relationships, are applied at the boundaries between grid cells.

To get a "future radar rain" map with finer detail requires using "sub grid" rules, and partial simulations over short times and restricted areas, a subject that Dr. Pontzen discusses. Compared to Earth, the Universe is immensely more complex, and the problems of building an appropriate model and running simulations that may span billions of years, but don't take billions of years of computer time, are truly tough!

For example, consider a galaxy. On the scale of the while Universe, galaxies are tiny and far apart.


This is the Hubble Ultra-Deep Field image, which shows about 10,000 galaxies (only one star is in the field, the really bright point with spikes caused by diffraction). The area of this image on the sky is 0.038°x0.038°, or about 0.15% of a square degree. It is about the size of the smallest thing you can see with your eye.

To a very rough estimate, although galaxies vary a lot in size, the really big ones seen here are a lot closer than the really small ones. The six or eight largest ones in this image are seen to be far from one another. If their intrinsic size is a little smaller than the size of "our" galaxy, the Milky Way, they are about 50,000 light-years across, and the average spacing between them is one or two million light-years. But larger-scale observations reveal that nearly all galaxies are strung out along strands in an immense web, with voids that contain no galaxies at all but span hundreds of millions of light-years.

One problem of computational cosmology that the author dwells on is that it is really hard to produce a cosmological simulation that doesn't result in a much larger number of galaxies. According to most models, this image "should" contain so many galaxies that there would be very little black space seen between them! A conundrum of computational cosmology is, "Why is space so empty?" I suppose all I can say is, "Stay tuned." I await a follow-on book on the subject as more is learned!

The smallness of galaxies compared to the intergalactic web, and the incredible smallness of the stars that make up the galaxies, and even more amazing smallness of planets, moons, and everything "solid" that we are familiar with, produce a huge problem of "stiffness" in any kind of simulation that seeks to span the entire range of sizes. Mathematical equations that drive simulations are called differential equations (DE's). By their nature, DE's produce one or more side effects, which mathematicians deal with using various schemes, and such schemes are embodied in the computer codes that run simulations. However, these schemes are seldom perfect, and runaway effects can swamp the simulation if it is run outside of a carefully chosen range. If a simple simulation includes two processes, and one runs 100 times as fast as the other, it is necessary to cater to the faster process or the results blow up. This time-scale contrast is called "stiffness". One must use time steps shorter than the time scale of the faster process, even though during such short steps, the slower process doesn't do much. Now consider what happens if the time scale varies over a range, not of 100 to one, but millions to one, with numerous processes all across the time spectrum. Not only that, if 99% of the volume is empty, and the remaining 1% has similar ranges of "spatial stiffness", the problem compounds dramatically. A lot of the book deals with such things, but using more accessible language.

The author also discusses dark matter and dark energy. Dark matter is probably quite real. It is needed to keep the stars in their orbits about their galactic centers, because the visible mass is not sufficient. This is not a small effect: the "extra gravity" needed is about five times what would be exerted by all the visible stuff we see. The current theory is that 70+% of the matter in the Universe isn't affected by electromagnetic radiation, so we can't see it. Scientists are working hard to find out what kind of stuff could be so invisible but so heavy.

Side question for the author or other cosmologists who may come across this review: Do black holes consume dark matter that encounters them?

Anyway, dark matter and the properties we infer for it must be included in cosmological models for their simulations to make any sense.

Dark energy is the term applied to an odd effect seen when very distant supernovae are studied. They seem too dim. Their distances are determined from the redshift calculated from their spectrum and, if possible, the redshift of their host galaxies. There are distinct "lines" in the spectrum of any astronomical body that allow us to determine its composition and the speed with which it is moving, radially at least. The Hubble Constant (named for Edwin Hubble, not the space telescope which was also named for him) characterizes the velocity-distance relationship.

Determining the actual brightness of a distant object is not straightforward. Dust and gas in and between galaxies absorbs some light. The relationship between distance and "intergalactic extinction" ("extinction" to an astronomer means light is being absorbed) is thought to be well understood. When such calculations are applied to certain supernovae, a discrepancy is found between how bright they are and how bright they "should" be. The farther away they are, the greater the discrepancy. This indicates that they might be farther away than their redshift would indicate; the "Hubble Constant" would then be not so constant! This implies that cosmological expansion is speeding up, not slowing down as we would expect.

I personally look at two matters that need more study before I will seriously consider that dark energy is real. 

Firstly, it is not mentioned in the book that the kind of supernovae one must study to discern dark energy are Type 1a. They are produced by a special mechanism. Most supernovae result when a large star (8-20x the mass of the Sun) runs out of fuel and its core collapses. About a quarter of supernovae result from a white dwarf star being loaded up with matter from a nearby red giant that is shedding mass. The maximum mass of a white dwarf is 1.44 solar masses; at this point it collapses and erupts as a Type 1a supernova. Because of these mechanics, Type 1a supernovae have very similar maximum brightness, making them a "standard candle". However, I have looked in the literature for an indication that the composition of the white dwarf and/or its red giant companion might affect the brightness of a Type 1a supernova. In the very early Universe there was hardly anything except hydrogen and helium. The first supernovae were all Type 2, when large stars, that had been forging hydrogen into more helium, and then forging helium into heavier elements, up to iron, exploded. Over time, the abundance of heavier elements in the Universe increased. To astronomers, all elements from lithium on up are called "metals" for convenience. Metallicity is a measure of the percent of "metals" in a star or galaxy. Our Sun's metallicity, at its visible surface, is 1.3%. Its age is 4.5 billion years, and it has not undergone fusion reactions that could change its metallicity, but an unknown amount of interstellar "stuff" has fallen into it; this is probably quite small in proportion to its total mass. Thus, a little over 1% probably represents the metallicity of this part of the Universe 4.5 billion years ago. The metallicity of the stars in a galaxy varies with distance from the center also, but not over a huge range. The bigger difference is seen between "Population I" stars, that are younger and have higher metallicity, and "Population II" stars, that are older and have something more like the metallicity of the Milky Way when it first formed, perhaps 10-12 billion years ago. This is roughly 1/10 or less of our Sun's metallicity, or less than 0.1%.

Very early galaxies and their stars had very small metallicities, ranging from 0.001% down to nearly zero. Therefore, so do the earliest Type 1a supernovae. A question I have not seen answered:

We know that white dwarf stars are composed primarily of carbon and oxygen. They are known to have some metals, because they are diagnosed by lines of silicon. BUT: Is the peak brightness of a Type 1a supernova significantly affected by the proportion of elements heavier than oxygen?

Secondly, is it possible that dark matter interacts very slightly with electromagnetic radiation? Simply put, the Universe's age is considered to be 13.8 billion years. At an age of 1.38 billion years, its "size" was 1/10 of its present "size", and the concentration of both ordinary matter and dark matter would have been, on average, 1,000 times greater. Somewhere along midway, say at an age of 4.4 billion years (the square root of 1/10 times 13.8), the "size" would have been about 0.32 of the current size, and the concentration of both ordinary matter and dark matter would have been about 32 times greater than at present. If there is even a slight interaction, "dark matter luminous extinction" could be a genuine effect, yet we would be very hard put to determine whether the dark matter that must be all around us has a measurable influence on light.

For the time being I consider that it is much, much more likely that "dark energy" is a phantom, and will eventually be found not to exist.

That is a significant digression from the discussion of the book. The author discusses the utility of cosmological simulations of various kinds. They aren't just a way for us to have a "pocket Universe" to play with, but they help us understand what might have occurred at various stages of the evolution of the Universe, or of groups of galaxies, or of stars and star clusters. Unlike weather forecasting, Universe simulation focuses on retro-casting, trying to reproduce how things worked out over some interesting span of past time, whether measured in centuries, millennia, or billions of years. To know where we really are we need to know what came before. Looking at distant things, as the Ultra Deep Field does, lets us look back in time. Things were different way back then, and computational cosmology is a powerful tool to help us understand it all. We've made a bit of a start; we're just getting going!

The author also asks whether it is plausible that we are living in an über-simulation inside some super-Matrix run by super-beings. He gets into that because he gets asked about it frequently. I'll mention one thing that he does not: one human brain has complexity of the same scale as a good chunk of the non-human Universe, and all of us together are more complex than the whole rest of the Universe (unless there are lots and lots of alien species!). In the Cosmos series by Carl Sagan, decades ago, it was stated that there are probably 100 billion galaxies in the observable Universe, with an average population of 100 billion stars each. The number of galaxies is probably more like a trillion. The number of stars is thus a number with 23 digits.

What's in a brain? The cortex has 16 billion neurons and the cerebellum has 70 billion. Each neuron has about 5,000 connections to other neurons. The 100 billion smaller "glial cells" also contact numerous neurons and large numbers of each other. The number of connections is thus a number with 15 digits. The number of humans is about 8 billion, a 10-digit number. So the "total human connectome" is about 100 times as great as the number of stars in the Universe. Another number of similar size is the number of molecules in 18 grams of water (a quantity known to chemists as a "mole"), which is a 24-digit number starting with the digit 6. If one could somehow use each water molecule in a tablespoon of water as a computer bit, it would take ten tablespoons to have enough molecules to devote just one "bit" to each connection in the sum total of all human brains. That's the bare bones of what's needed to produce The Matrix. And that's just one intelligent species on one planet. I'd say that if Moore's Law gallops along unimpeded long enough (but it won't, it's already faltering), it would take hundreds of doublings, or at least 1,000 years, for a big enough, fast enough computer to be produced (by Someone) that could simulate the entire Universe in real time. Of course, by making the computer's time steps for each second of real time actually take, say, a century, a much smaller computing system could to the work. How could we tell? Dr. Pontzen doesn't know, and neither do I.

A very enjoyable book. You don't have to be a computer geek like me to understand it.

Saturday, March 09, 2024

Guidance Parameter in Playground AI

 kw: experiments, ai art, generated art, artificial intelligence, simulated intelligence, comparisons, photo essays

Another parameter to explore in Playground AI is Guidance. This influences how closely the generated image conforms to the prompt, so they say. I decided to find out. In earlier experiments I had kept a few images I particularly liked. One had the seed 260650348, and I decided to use that for this experimental project, and to use only the Euler a Sampler.

The three Models have very different sets of Guidance parameters:

  • Stable Diffusion XL (SDXL) has levels from 0 to 30, and Guidance above 30 is available to subscribing (paying) users. The default is 7 and in FAQ's they recommend primarily using between 7 & 10. After some pre-work I decided to use 2, 4, 7, 11, 16, 24, and 30.
  • Playground v2 (PGv2) has levels from 0 to 5. The default is 3. I determined that levels 0, 1, and 2 produce identical results, so I decided to use levels 2, 3, 4, and 5.
  • Playground v2.5 (PG25) doesn't use a Guidance parameter. It also doesn't have multiple Samplers. It's a "point and shoot" generator.

I've learned from others' reviews and some "help" YouTube videos that longer prompts give the software more to work with. It stands to reason that there could be a greater difference among Guidance levels with a long prompt, compared to a short one. I decided to test four prompts of a wide range of lengths; the word counts below are "meaningful" words, ignoring articles:

  1. 1 word: Cosmology
  2. 5 words: Quaint village near a mountain stream
  3. 13 words: A rocky beach grading into a sandy beach below sea cliffs beneath a partly cloudy sky
  4. 28 words: Fantastical clock with a big dial for the time using roman numerals, the second hand on a small dial of its own, and indicators for month and day and phases of the moon

I'll present the resulting images half size (512x512) in pairs or groups of 4, beginning with PGv2 and Prompt 1.



A number of trends are seen as Guidance (G from now on) goes from 2 to 5:

  • The sky arch begins with a look like a multiverse, and goes to more of a dynamic universe look.
  • The observer is bigger at G4 and 5, while the child seen at G2 turns to a rock which progressively shrinks.
  • Trees appear at G3 and move around.
  • The nebula of G2 gradually turns into a galaxy.
  • Sundry planets come and go.

However, there is no dramatic change in the overall look of the image.

Next, 7 images from SDXL, plus one by PG25.





The SDXL images all have a Medieval look to them. The two that look best are the third and fourth, with G07 and G11. Above G16 they kind of go off the rails. At G30 in particular the frame is quite detailed, but the rest of the image has lower quality, as the FAQ warned. The PG25 image is quite fetching, similar to the central portion of the PGv2 images, with a kind of swirly surround. This one could be fun to run a bunch of with random Seed turned on.

Now for Prompt 2, the village by a stream. PGv2 first:



As before, these are all very similar, with added details at each increased G level. Next, SDXL and PG25.





The frame seen in the earlier series is still with us. Here, the overall look gets a dramatic overhaul after G11. The image for G16 has a bookplate look, while G24 and G30 seem to emanate from confusion, perhaps due to conflicting requirements.

The PG25 image is very pleasing, similar to any of the four PGv2 images, but more detailed and dramatic. Next, the beach scene, PGv2 first.



The differences between these are a matter of increasing detail. I note that the main cliff attains an overhang in the fourth image, and while it looks like the sun is higher, it's just that the second headland is lower, with a notch in it. Now for SDXL and PG25.





I see that these retain the frame. The first two images, at G02 and G04, are from a high perspective; it would have taken more words to specify where eye level is. The next one, G07, is about what I had in mind. The fourth image, at G11, is very good and G16 is almost as good, if a little exaggerated. After that things go downhill, and the frame is even breached.

PG25 has a very good look, with more diverse scenery than the PGv2 images. Now for the final series, the clock, beginning with PGv2.



I had something in mind when I wrote Prompt 4, which I'll get into below. Only the fourth image, with G5, appears as if it could be a real clock. All four of these have the "smaller dial for the second hand" concentric with the main dial. That's not what I had in mind, but I didn't specify "next to" or "below" the main dial. Now for SDXL and PG25.





It's pretty clear by now that, however many words one uses, the best range is usually from G07 to G16. The first two images are rather primitive, and the last two go wonky. I suppose the best is at G07.

PG25 has produced an entire clock, not just a dial in a frame. It still doesn't meet all the criteria. 

Here is what I had in mind, a clock with a moon dial and a separate second hand dial above the center. The day indicator is in the square window; numerous variations on showing days have been produced. This is a modern dial, in a style going back 150 years.


Had I specified "many dials" I might have expected something more like this, a French clock from the Louis XIV era. The "dial" at the top signals a speed control, typically adjusted for the seasons as temperature affected the length of the pendulum.

This last image is from a clock tower in Belgium. Clearly, the AI interpretation of "fantastical clock" is still somewhat limited.