Showing posts with label thinking. Show all posts
Showing posts with label thinking. Show all posts

Wednesday, July 11, 2012

Computer Science

  At the risk of boring some readers of The Berkeley Write, I've decided to review the remarkable history of computer science, from its barely existing a half century ago to being at the core of almost everything now.  That history is remarkable not merely because computers have become so ubiquitous, but especially because computer science has fundamentally changed the way we solve problems. 

  When I was an electrical engineering undergraduate at MIT in the late 1940s, I was dumbfounded to find that a classmate was studying Boolean algebra, an algebra of logic.  As one who was steeped in the mathematics of the continuum, I asked him why he was interested in an algebra having only two values—0 and 1.  He told me that he wanted to study digital computers. 

  I couldn't understand why he would be wasting his time.  Although I had worked on electro-mechanical analog computers during the summer after my freshman year, I scarcely knew what a digital computer was, and had absolutely no inkling at all of the revolution they would shortly ignite.  In my own exculpation, I should say that there were only a handful of them in existence at the time, and that even Thomas Watson, founder and then-chairman of IBM, had a few years earlier estimated their ultimate world-wide commercial market to be about five.  (To paraphrase John Kenneth Galbraith's remark about economic forecasting: The only function of engineering forecasting is to make astrology look respectable.)

  In 1960, when I joined the faculty at UC Berkeley, digital computers were much more widespread, but the term "computer science" was still an oxymoron: few could perceive any science there at all.  The study of computers at Cal, as elsewhere, was embedded in the department of electrical engineering, where the few courses on computers involved only the design of their electronic circuitry, peripherals and elementary programming.  Later in the decade, a few faculty members started going beyond those engineering issues, into basic research on the limits on digital computation and the theory of programming languages—i.e., computer science.

  Computer science has since come a very long way, now equally sharing with mathematics the role of fundament of all the sciences, and being central to many non-science disciplines as well.  Most particularly, it has largely changed our way of solving problems, from classical analysis to algorithmic procedures.

  In mathematics and the sciences, classical analysis is characterized by theorem proving and by the formulation of problems so that they can be solved by equations.  You had doses of that way of thinking in your high school geometry, algebra and physics courses, if not further.  For example, you encountered the quadratic equation, y = ax2 + bx + c (often arising in the physics of motion), and were asked to find the values of x for which y = 0.   The two solutions of that problem turned out to be x = - (b/2a) ± ((b2 – 4ac)1/2)/2a.  That's pure analysis.

  On the other hand, algorithmic thinking is characterized by a step-by-step, iterative procedure, the modus operandi of computers.  The process for such thinking is often described by a flow chart such as that below, which is taken from one of the forms of the federal income tax return.  You start at the box at the upper left, and step through the chart by answering a series of yes/no questions.  If you get to the box labeled "You must figure your penalty," you then proceed to a set of forms that, rather than giving a formula for calculation of the penalty, guides you through a sequence of "if-then" statements to make the calculation, one step at a time.  That's a pure algorithmic procedure.


  Computer science now occupies a central role in the physical sciences and elsewhere because many problems are too complex for mathematical analysis—for example, the behavior of chaotic systems such as the weather or population dynamics, or of economic systems with a large numbers of variables and participants. To investigate such a problem, a sophisticated algorithmic procedure is designed to model the system at hand, and the procedure is then run on a computer to provide insight into the system's performance.  It's not just a matter of using the computer as a glorified calculator; to get accurate results in reasonable amounts of time and formats, investigators must be as steeped in the fundamentals of computer science as their predecessors were in mathematics.

  Even though computer science didn't start flourishing until the 1960s, it had its ur-moment in 1935 in England in the work of Alan Turing.  He posited a machine that manipulates symbols in a step-by-step fashion.  The device, now called a Turing machine, is quintessentially algorithmic.  Turing never built one.  His genius consisted in specifying an iterative procedure that even now models any computer program and therefore any computer.

  Turing, a superbly talented mathematician, also used the concept of his machine to address a question his contemporary Kurt Gödel had tackled: the completeness of mathematics. Gödel's Incompleteness Theorem showed that some true mathematical statements can't be mathematically proved to be true.  Turing approached the question differently, from the viewpoint of the computability of algorithms.  In a result very much related to Gödel's theorem, he showed that not all problems are solvable computationally in a finite amount of time.

  The question of computability is now front and center in computer science.  Even if a problem is theoretically computable in a finite amount of time, the time needed may be unreasonably large, given the exabyte (quintillion byte) data sets that are becoming common in such scientific and commercial operations as the Large Hadron Collider, the Sloan Digital Sky Survey, the World Data Centre for Climate, Amazon, YouTube, Google, etc.  (The first of these generates a quadrillion bytes of data—more than the information in all the world's libraries—every second!)  This "big data" challenge goes to the heart of computer science: how to effectively organize huge data sets, and how to formulate algorithms that handle them both efficiently in computation time and accurately as the size of the data set increases. 

  An indication of the current importance of big data is the establishment this year of a major research institute at UC Berkeley with a private $60-million grant from the Simons Foundation.  The institute will bring together researchers from around the world to study efficient algorithmic approaches to such important big-data subjects as evolution, the immune system, maintaining privacy while doing data analysis, and climate modeling. You will surely hear much more about big-data research in the next decade.

  So, to repeat: in my own professional lifetime, computer science has come from barely existing at all to being "at the core of almost everything," even of disciplines that were not previously thought of as particularly quantitative.  I find it a stunning story.

Wednesday, June 20, 2012

Neurons and the Internet

  Socrates would have much to say about the Internet if he were alive today—and he would not be complimentary.
 
  In his own time, Socrates was distressed by the increasing use of writing in the place of bardic recitation, oral discourse and philosophical dialog.  That may be why we have no writings directly from him.  We know of his concern only through Plato, in whose Phaedrus we find Socrates recounting objections by mythological Egyptian god-king Thamus to the gift of writing: "[It] will create forgetfulness in the learners' souls, because they will not use their memories; they will trust to the external written characters and not remember of themselves; … they will appear to be omniscient and will generally know nothing." 

  A reincarnated Socrates would no doubt have the same reaction to the Internet.  He might paraphrase Thamus by saying, "The Internet will create forgetfulness in its users, because they will not use their own memories; they will trust external websites and not remember of themselves; they will acquire broad knowledge but it will be shallow." 

  Neurologically speaking, Socrates would be onto something.  Modern research has shown that neuronal circuits in the brain, including its memory, wax and wane in response to demands placed on them.  For example, would-be London cabbies are required to memorize the location of every street and landmark within six miles of Charing Cross and the best routes among them.  As they train to meet this requirement, their brains' posterior hippocampi—which store spatial representations and navigation information—get bigger. After a cabbie's retirement, the hippocampus returns to normal size.

  Persistent use of the Internet might be causing similar brain changes.  Recent studies show that people who heavily multitask and hyperlink find prolonged concentration difficult. They are much more easily distracted by irrelevant environmental stimuli.  They tend to have less control over working memory—the temporary memory involved in ongoing information processing, which is sensitive to interruptions.  They have more difficulty in the formation and retention of both short- and long-term memories.

  It would seem from these observations that neuronal circuits such as long-term memory, which depends on intense and repeated concentration to thrive, are being weakened in chronic Internet users, and circuits involved in rapid scanning, skimming and multitasking are being strengthened.  This is an atavism of a sort, a throwback to the days of cave people, who may not have been deep thinkers but were supremely alert to sudden events like motion in the peripheral vision that might warn of a predator.  Today's sudden events consist of arriving email and texts, hyperlinks, and the like, which deflect us from current tasks onto others.

  These topics and many more are discussed in a fascinating book by Nicholas Carr, The Shallows: What the Internet is Doing to Our Brains.  Carr's main thesis is that today's Internet-dominated activities are indeed causing our brains to rewire themselves.  He aptly quotes the Jesuit priest and media scholar John Culkin: "We shape our tools and thereafter they shape us."  Carr notes that it has ever been thus, from the writing that so worried Socrates, through the map, the clock, the compass, and so on to modern times.  Each new tool has broadened our ability to understand and control our surroundings, but each has exacted penalties in the form of loss of previous skills and the societal attributes that they underpinned. 

  The balance of benefits and costs of an new tool is not always apparent at the start.  It turns out that the original Socrates was wrong to worry that writing would be preponderantly harmful: the forgetfulness he feared did not occur.  Rather, at least until multitasking recently came into play, book-reading forced us to concentrate deeply and linearly, actually enhancing our abilities both to stay with a single task and to commit the knowledge we thus gained to long-term memory.  On the other hand, our modern-day Socrates might turn out to be right about the detriments of the Internet.  It does appear to be driving us in the opposite direction, toward spasmodic, superficial scattering of our attention; outsourcing our memory to the Web; and a possible intellectual destiny in "the shallows" of Carr's title.

  The counterbalancing upside of the Internet is of course substantial: the ease and efficiency with which so many workaday tasks can now be done. The balance between benefit and detriment will take a long time to become clear.  I suggested in the most recent of my several previous postings concerning the Internet—click on "Internet" in the index to the right to see those postings—that a final assessment might require a century or two to achieve. 

  (Did you deflect your attention to the index?  Did you click on the suggested hyperlink and peruse those previous postings?  Even if you did neither, did your working memory fail to maintain the first part of the sentence in mind during the interruption, forcing you to read it again?  Voila!  The world of online reading.) 

  I have two reasons for contending that it will take generations or centuries to fully assess the impact of the Internet.  First, Internet Age technologies are still unfolding in a now unknown way, with unknown consequences.  Second, the brain will likely show itself more malleable in adapting to the Internet's demands than Carr and others credit.  There is already evidence that the working memories of heavy multitaskers are expanding in order to retain temporary information on several tasks simultaneously.  Further, the brains of those raised on the Internet are still engaged in their initial wiring, which won't be finished until they are 25 years old, say 2020 for the earliest Web babies.  That generation and its successors will probably end up wired much more effectively for life in the Internet Age than their elders like Carr, whose brains must be rewired helter-skelter from earlier configurations, which they might not want to surrender.  (There's even an evolutionary implication here, which I am not addressing, for then we would be talking of waiting millennia for a verdict, not merely generations or centuries.)

  Then, will our latter-day Socrates be as wrong about the Internet as the original Socrates was about writing?  We can't know yet.  Patience is the name of the game.

Tuesday, June 5, 2012

Gödel and God

    Kurt Gödel, whom some have called the greatest logician since Aristotle, undermined the very foundations of classical mathematics with his Incompleteness Theorem (and, by the way, thereby reaffirmed his belief in God).  To mathematicians, his work was nothing short of cataclysmic.  To most of the rest us, it is merely counter-intuitive, paradoxical and maddening.  I invite you down the rabbit hole into a realm of paradox worthy of Alice.

  Until Gödel proved his theorem, it was thought that mathematics—alone of the sciences—was self-contained, not having to refer to anything outside mathematics.  Mathematics was created by mathematicians as a complete, fenced-off entity, while other scientists had to discover the outside world.  More precisely, mathematicians held that any true statement in any properly set up mathematical system (say arithmetic or algebra) could be shown to be true by using solely the axioms and rules of that system.

  Gödel proved the opposite.  His theorem shows that any properly set up mathematical system containing arithmetic has true statements within it that cannot be proved true by using solely the axioms and rules of that system.  Mathematics is therefore not complete unto itself as was supposed.  Confirmation of the truths not provable within mathematics can only be found outside of what had previously been assumed to be a self-contained mathematics.  This is where God came in for Gödel—but more about that later.

  It all started at the turn of the twentieth century, when Bertrand Russell realized that mathematical logic would always contain contradictions.  He illustrated this by using a folksy paradox about a lone, male barber in a town where every male keeps himself clean-shaven either by shaving himself or being shaved by the barber.  Then, Russell asked, who shaves the barber?  There's the paradox: If the barber doesn't shave himself then he (the barber) must shave himself; if the barber shaves himself, then he (the barber) doesn't shave himself.

  Such paradoxes are called self-referential.  In this one, all males must refer themselves to the barber if they don't shave themselves.  The barber, being male, must thus refer himself to himself to be shaved if he doesn't shave himself, setting up the paradox. 

  The proof of Gödel's Incompleteness Theorem is very complicated, but its core consists of the construction of a true, self-referential arithmetical proposition that is shown to be unprovable within arithmetic.  A taste of the core argument can be found in a much simpler argument about a supposedly self-contained truth-telling machine:

1. Imagine a truth-telling machine M that can answer all questions allowing solely a yes or no answer about the truth of any statement submitted to it, but by axiom can only answer correctly; that is, it cannot lie.  (M stands in the stead of Gödel's starting point of arithmetic.)

2.  Consider the statement S, that “M will never say S is true.”  (This is akin to the self-referential proposition in arithmetic that Gödel constructed, for the statement S is defined in terms of the statement S.)

3.  Ask M if S is true.

4.  If M says S is true, then "M will never say S is true" is thereby falsified, so M has incorrectly answered a question.  Hence, M cannot say that S is true, since by axiom it gives only correct answers.

5. Step 4 confirms that M will never say S is true, verifying that the statement S in step 2 is indeed true.

6.  Here’s the dilemma:  S is true but M cannot say so.  M is consequently an incomplete truth-telling machine.  The answer to "Is S true?" lies outside of M. 

  Gödel's theorem, which rocked the world of mathematics, didn't shock Gödel.  He had been a lifelong Platonist, believing with Plato that anything we can see or conceive of is just a poor shadow of an eternal, objective ideal that exists beyond the real world.  It was hence no surprise to him that there are mathematical truths that mathematics cannot prove.  He concluded that proofs of those truths are part of the omniscience of an eternal God who is external to the real world, thus strengthening his long-held theism.  In his later years, Gödel even tried to construct a formal logical proof of God's existence.

  Gödel published his theorem in 1931, when he was just 25.  He fled the Nazis from his native Austria in 1938, and spent his last forty years at the Institute for Advanced Study in Princeton, where he became Albert Einstein's closest intellectual companion until Einstein's death in 1955. 

  As I suggested at the outset, understanding paradoxes like those I've described can be maddening—perhaps just reading this blog posting has had that effect on you.  Worse, they might quite literally drive mad those whose life work involves them, and perhaps that's what happened to Gödel.  In a great irony, Gödel died in 1978 in a self-referential sort of way, so convinced that people were trying to poison him that he refused to eat and died of starvation.

  If you want to read more about Gödel—the man, his life, his times, and details about his theorem and its proof—I recommend Incompleteness: The Proof and Paradox of Kurt Gödel by Rebecca Goldstein.

Wednesday, May 2, 2012

Neurons and Creativity

  I've been puzzled ever since I posted "Intuition and Expertise" about a month ago. If you read it, you may remember a central postulate of Daniel Kahneman's book Thinking, Fast and Slow: people use two distinct mechanisms in thinking.  These are a fast and intuitive "System 1" and a slow and analytical "System 2."  It's a model that left me with nagging questions, unaddressed by Kahneman.  Are the two systems merely metaphors that don't have discrete neurological counterparts?  Or is each system instantiated at a specific neurological site?

  I was therefore excited to hear an interview on NPR in which Jonah Lehrer discussed his new book Imagine: How Creativity Works.  He talked not only about intuitive and analytical thinking in creativity, but also about particular neural circuits that are their loci.

  Thankfully, Lehrer is a journalist, not a scientist like Kahneman, so his book is short and relatively crisp.  (Good! I thought. I didn't want to plunge into another tome like Kahneman's.)  The book has two parts, "Alone" and "Together," which respectively address individual and communal creativity.  Just the first part is concerned with the details of neural activity, so I will confine myself mostly to it.  But the other part is of sufficient interest to warrant a brief outline.

  Together.  Lehrer asks why such places as fifth century BCE Athens, fifteenth-century Florence, late sixteenth-century London and today's Silicon Valley came to have "clots of excess genius"—rare agglomerations of creative people.  He maintains that they have in common a vital combination of ingredients: a dense population, relative affluence, and civic and social institutions that encourage creativity. Together, these ingredients foster frequent interactions among imaginative individuals, resulting in their interchanging ideas.  Each individual's creativity, the "alone" kind, is stoked by bumping into other creative individuals at random.  The environment in turn attracts still more of the brightest and most original, driving a positive feedback loop.

  For example, late sixteenth- and early seventeenth-century London had one of the densest populations on earth; a relative lack of censorship; an amazing near-50% literacy rate nurtured by the English Reformation's rendering of the Bible into the vernacular; ardent and supportive theater-goers; and a plethora of coffee houses, which acted as milieux for chance meetings.  The result was a "clot of excess genius" containing the likes of Jonson, Marlowe, Shakespeare, Milton, Kyd, Spenser and Donne.  English literature has never again seen an efflorescence like that in such a short time period.

  Many modern companies try to mimic this clotting phenomenon.  At the insistence of Steve Jobs, for instance, all of the most-frequented spaces at Pixar and Apple—cafes and cafeterias, mailboxes, meeting rooms, even bathrooms—were clumped together centrally, so that people would be forced by happenstance to bump into each other, chatter and exchange ideas.  It seems to work, for Pixar and Apple are among the most creative companies ever established.

  Alone.  Still, while people can be prodded into creative acts by their surroundings, the act itself is usually individual.  That's where System 1 and System 2 thinking come into play.  Lehrer provides a fine insight into how these two forms of thinking occur in the brain.  Here are some of the facts he presents, with a few of my own comments interpolated.

  As I argued in my posting on intuition and expertise, System 1 leads to the Aha! moments that we all experience.  Finding the part of the brain where those epiphanies are generated has recently been made possible by using functional MRI (fMRI) measurements, which perceive increases in neural activity as surges in blood flow to those neurons.  Such measurements show that the anterior superior temporal gyrus (aSTG), a small fold of brain tissue above the right ear, becomes especially active a few seconds before an insight.  The aSTG functions subconsciously, apparently by obsessively searching for relationships among the myriad pieces of data that are stored in the brain.   When it finds a significant relationship, it "lights up" in the fMRI scan, like the light bulb above a cartoon character's head indicating an intuitive flash.  We may trigger an aSTG search because we are stumped in the analysis of a particular problem, probably because we are looking at the wrong data, or it may happen autonomously.  Interestingly, the aSTG seems to be most active when we are relaxed, possibly daydreaming.  That may be why Archimedes got his Eureka! moment while in a bath.

  On the other hand, System 2 thinking, the analytical kind, is in our conscious mind all along; we know that it is happening because it is effortful, concentrated work.  That work takes place in the prefrontal cortex (PFC), located behind the forehead.  The PFC has associated with it a short-term working memory that allows it  to focus on the very pieces of data it presumably needs to solve a problem—akin, I think, to a computer's RAM.  By not paying much attention to the vast amounts of other data in the brain (data "on disk" so to speak), the PFC emphasizes the fine-tuning of an emerging solution, but doesn't provoke epiphanies.  We gain incremental understanding from its activities, piece by piece.

  Part of the PFC may actually inhibit our full creativity: the dorsolateral prefrontal cortex (DLPFC), which is most closely associated with impulse control.  It constrains our thoughts and actions so that we don't make fools of ourselves or violate social norms—a sort of straitjacket that the mind places on itself.  It can therefore prevent us from thinking "out of the box."  Tellingly, it is one of the last areas of the brain developed by children, which may explain both their relative lack of social inhibitions and their as-yet unbridled creativity.  fMRI studies of jazz musicians while they are improvising show their DLPFC activity to be suppressed, as if they are purposely inhibiting their inhibitions so as to be able to jam; this suppression doesn't occur when they are merely playing a set piece.

  Another connection, or actually lack of one, between creativity and the PFC is quite amazing.  When we are asleep, the PFC shuts down!  Our analytical abilities and our inhibitions—our sanity checkers—are gone.  The brain is then free to run amok, dreaming uninhibited thoughts and making "insane" connections among its memories.  Occasionally connections that do make sense occur in this maelstrom.  Perhaps that is why we sometimes decide to "sleep on it" when we are trying to solve a particularly vexing problem.

  These few facts about the neurology of thinking are of course not the whole story.  No matter. They are the beginning of an answer to the "nagging questions" Kahneman left me with.  My inner scientist is very pleased.  I love it when observational data can be understood in terms of underlying physical phenomena!  

Tuesday, March 27, 2012

Intuition and Expertise

Originally published March 21, 2012: 

  Today I challenge Nobelist Daniel Kahneman on his own ground.  Wait!  Let me have my say before you cry chutzpah!  Then you can decide for yourself whether I'm bonkers or not.

  In a recent book for the lay reader, Thinking, Fast and Slow, Kahneman summarizes his life's work: understanding how we make decisions.  He postulates that we use two mental mechanisms for this purpose.  One is fast and intuitive ("System 1"), the other slower and more analytic ("System 2").  System 1, the focus of the book, probably developed evolutionarily so that we could reflexively act when we sensed the presence of a saber-toothed tiger.  We still use it to jump out of the way of a speeding car.

  But Kahneman asserts that System 1 also makes snap intuitive decisions in non-emergency situations.  These are more likely than not to be wrong, he says, because we are led astray by factors irrelevant to the problem at hand.  We are influenced by special insights we think we have and biases we do have. We may unwittingly replace a hard problem we are trying to solve with an easier problem we know how to solve.  Or we simply may be dyspeptic from a meal we just ate.  Kahneman lists many such extraneous factors, of which we are generally unaware, and demonstrates their deleterious effects by presenting data from numerous sociometric and psychometric experiments. 

  I have no quibble with him so far.  I agree that our distant ancestors, in learning to leap away from saber-toothed tigers, made it all too easy for us to leap to conclusions.  But Kahneman has given intuition an unwarrantedly bad name.  The thrust of his work has been to show that we largely act through irrational, error-ridden intuitive impulses.  He therefore gives short shrift to a huge domain where the intuitive impulse is rational and reliable: expertise-driven intuition, or expert intuition for short.

  Kahneman has relegated this domain to a tiny sliver of his book, only one of 38 chapters, where he describes his extended "adversarial collaboration" with Gary Klein, a defender of expert intuition.  In other chapters, Kahneman harps monotonously on examples of "experts" being derailed as readily as non-experts by extraneous factors.  Alas! the poor man has spent much of his life--and most of this book--studying "experts" like stock market analysts, CEOs and pundits.  Not my kind of expert or expertise, nor Klein's.

  As I use the term, expert intuition involves the years-long migration of expertise developed by System 2 into System 1.  Even Kahneman notes that while a chess novice might spend minutes or hours slowly thinking through the likely results of any move (System 2), a grandmaster can intuit the same results from a glance at the board (System 1).  Klein has studied how experienced firefighters can intuit from subliminal sensory cues when a building is about to collapse, without knowing quite how they do it, and act instantly on that intuition. 

  Kahneman and Klein did come to some agreement, among them conditions under which the intuition of experts can be valid, namely an environment that is sufficiently regular to be predictable, and an opportunity to learn these regularities through prolonged practice.  Those conditions apply to problem solving in engineering, so it is a good platform from which to launch my paean to intuition.

  I was fortunate to have been taught by a grandmaster of engineering intuition: MIT Professor Ernst Guillemin.  I still smile almost 65 years later, remembering how his gnome-like body would practically dance across the front of the classroom, showing us how he thought an electron would think and act in trying to make its way through a circuit he had drawn on the board.  "You have to think like an electron to understand this circuit!" he would exclaim. 

  Many years later my daughter Abby, then a pre-architecture student taking a structures course, was given the problem of constructing a truss from a given amount of poster board.  The function of the truss was to support the greatest amount of weight when suspended between two table edges separated by a given distance.  I told her, "You have to think like the truss!  Imagine yourself suspended face down with hands on one table, feet on the other, a weight tied to your midriff.  Where would you hurt most?  Use your limited resources to reinforce the truss in those places."  I am proud to say that her truss supported more weight than any of her classmates', even more than her professor's.

  In 1976, I wrote an article, "In Praise of Intuition," for a student engineering magazine.  I tried to define intuition as applied to engineering problem-solving and to show how it can be developed.  A precise definition of engineering intuition still eludes me, but, as then, I think it consists of at least the following abilities, successively refined over a long time:

  -- To know how to approach the problem without quite being sure how you know.

  -- To recognize what is peripheral and what is central, without having fully understood the problem.

  -- To perceive in advance the general nature of the solution.

  -- To instantly connect a problem in one field to analogous problems in other fields and import the analogous knowledge into the problem at hand.

  -- To sense when a solution must be right, just because "it feels right," and to suspect a solution that feels wrong and continue to gnaw at it.

  I suspect that Kahneman would vigorously argue against at least the last ability, calling it an "illusion of validity" likely to be biased by overconfidence.  But I hold my ground.  For engineering problems, and likely much more broadly, I think it is indeed possible to learn the abilities I listed above, including the last, through inculcation of certain habits of mind.  Among these habits are:

  Systematically fashioning knowledge and experience into an integrated whole.  Like a piece of a jigsaw puzzle, a new idea snaps into place more easily as you amalgamate your knowledge into a coherent pattern and as you gain experience at fitting pieces into that pattern. And the more complete the overall pattern, the more easily you sense what is missing.  This pattern of knowledge embeds itself into your intuitive thinking.

  Persevering in understanding.  Studiously avoid shrugging off the mysterious as beyond your ken.  What is novel and counter-intuitive on first exposure can become part of your intuition after repeated, usually laborious re-examinations.

  Looking at a problem and tentative results from multiple viewpoints.  If you are a mechanical engineer examining an electrical circuit, think of its mechanical analog, which you are more likely to understand.

  Projecting the general from the particular and checking the particular against the general.  Like Archimedes in the bathtub with his famed Eureka!moment, if you find that 3+9=9+3 and 4+2=2+4, immediately conjecture that x+y=y+x.  Conversely, if someone asserts that x+y=y+x, immediately make sure that 3+9=9+3 and 4+2=2+4.

  Focusing on the core of a problem without initially getting bogged down with matters of peripheral importance.  If your car's engine isn't running, forget for now about waxing it.

  Perhaps hardest, not fearing mistakes.  Don't be frozen into indecisiveness because "all the facts aren't in yet."  You will never have all the data you need, but you can still make a decision based on your expert intuition, knowing that you might be wrong.  The hard trick is to know when to act.  I believe that comes from learning the boundary between when a solution feels right and when it still feels wrong and needs more gnawing.

  I don't think expert intuition can be taught in a straightforward manner, beyond championing the rules above and demonstrating them in practice, as Professor Guillemin did for me.  If anything, teaching expert intuition is a process like the Zen Buddhist use of koans: that is, teaching intuition intuitively.  But even if not easily teachable, expert intuition can nonetheless be learned, by inculcating these habits of mind over tens of thousands of hours of practice. The discipline of doing so, Kahneman's pessimism notwithstanding, can inure one to many of the destructive influences he cites.  And there's a bonus: That discipline will apply beyond the field in which one spent all of those hours.  The habits of mind themselves will migrate into System 1, available for more general problem solving.