Database vs. Expert System Teaching Paradigms: Using Organic

A database and an expert system can serve as useful paradigms for the analysis of radically different teaching approaches. A content-driven lecture th...
0 downloads 0 Views 86KB Size
In the Classroom

Database vs. Expert System Teaching Paradigms: Using Organic Reaction Mechanisms To Teach Chemical Intuition1 Paul H. Scudder Division of Natural Sciences, New College, Sarasota, FL 34243 College courses appear to be ever so gradually moving from a lecture teaching style (derived from a time when books were rare and in the possession of a learned few) toward a more active-learning form of instruction. It is often said that the primary goal of a college education is to teach the student how to think. Hierarchical, fact-intensive, lecture courses in which students rarely have an opportunity to challenge the incoming information are not very conducive to that goal. It is possible to use a database and an expert system as paradigms for the analysis of radically different teaching approaches. Memorization-oriented courses treat the student as an empty database to be filled as completely as possible with facts and concepts. Unfortunately, memorization learning is the most volatile. In the end, the student database is always inadequate, for courses like organic chemistry commonly have relatively high student attrition. Even successful students of a database-style course often have poor chemical intuition and have trouble when asked to extrapolate beyond what they have been taught. An expert system is a computer program that tries to encode the knowledge of an expert (1). A comparison of the block diagrams for a database and an expert system (2), Figure 1, demonstrates what is missing when the student is treated as a passive receptacle of knowledge in the database model. Besides the user interface and knowledge base, the expert system contains two additional program modules that endow it with a modicum of artificial intelligence. The inference engine is the program module that searches for a route from the start (question) to the goal (answer) state. The control knowledge guides the search engine so that the best route is chosen. The inference engine discussed in this paper is one in which all initial alternatives are generated and the best ones explored first. To determine which alternatives are best, certain rules (such as Markovnikov’s rule) are used as control knowledge. Classroom teaching can benefit from an expert system approach. Teaching students how to reason scientifically

User Interface Database

Inference Engine

The Database Teaching Model: Tyranny of Content The teaching of organic chemistry poses a challenge for science education; organic has a well-deserved reputation for difficulty, memorization, and information overload. Most textbooks are well over 1000 pages, and the instructor feels the pressure to fit in as much as possible. This “tyranny of content” discourages novel approaches to teaching. Time pressure to cover the material increases as the field expands. Lectures become writing contests in which the professor’s notes become the student’s notes without going through the mind of either. Too often, such a course is an exercise in recall rather than reasoning. The very thing that makes science interesting is sometimes left out of introductory courses in the time pressure to cover all the material. A lecture that relays facts and concepts to be memorized and regurgitated on an exam is easiest for the instructor, but does not teach the student how to think. Usually, problem-solving algorithms are not explicitly taught; examples are worked by the instructor, and problems are assigned for homework. At best, the less important material is forgotten, trends are assimilated, and with luck an internalized problem solving algorithm develops. Often, students still do not see the similarity between assigned problems and exam problems. However, it has always been done this way, and there are few alternative books. The Expert System Teaching Model: Teaching as a Subversive Activity

Knowledge Base

User Interface

and designing an expert system have much in common. Expert system design forces the identification of essential rules, cross-checks, and trends. In order to teach students how to think like experienced chemists, one must characterize the problem-solving process, which involves articulation of the inference engine and the control knowledge. Students must be taught how to evaluate their own guesses and all incoming information. How do experienced chemists judge whether a hypothesis is reasonable? What can be gained from expert system design that is applicable to teaching? Can a simple expert system for organic chemistry be designed to run, not on a desktop computer, but on a “necktop” computer?

Expert System Control Knowledge

Knowledge Base Figure 1. A comparison of the block diagrams of a database and an expert system.

A very important part of the scientific method is making a well-educated guess when presented with experimental data, rather than parroting back the current scientific dogma. This ability to postulate a reasonable hypothesis can be taught, but it requires that students be confronted with the decision-making rules and heuristics (i.e. the expert system) employed by organic chemists. The essence of the field must be extracted: the conceptual tools, the general rules, the trends, the modes of analysis—everything used to construct an expert system. With an expert system–based teaching method, students begin to think like experienced chemists. With reduced pressure to teach the entire mass

Vol. 74 No. 7 July 1997 • Journal of Chemical Education

777

In the Classroom of facts, the instructor can spend more time teaching how experienced chemists approach and solve problems, using active learning techniques that intellectually engage the students. The inference engine and the control knowledge are of utmost importance. A student should challenge all incoming information with, “Does this make sense?” Ernest Hemingway once commented, “In order to be a great writer a person must have a built-in, shockproof crap detector” (3). If the inference engine and control knowledge are mastered well, the knowledge base can be incomplete. In reality, the knowledge base is always incomplete, and the student will know to go to a reference text. There is definitely a need to install a functioning “crap detector” in our science students. This paper presents an expert-system-designed course that has worked well, complete with detailed explanations of the search process and the control knowledge. Instructors may wish to analyze their own thought processes to come up with additional control knowledge rules, but that is certainly not required. Before such an example search can be shown, more background is needed on the process itself. Organization of the Knowledge Base Students need to develop the ability to generalize and conceptualize in order to manage the sheer mass of data. The knowledge base can be organized and reduced in volume by classification into generic types. Reactions can then be considered as simple combinations of generic electron source with electron sink. Beginners can easily get confused by insignificant changes in the hydrocarbon part of a reactant; they often “slip on the grease”. Once the students learn to classify into generic groups, they are no longer treating each reaction as a special case and risking severe information overload. The knowledge base can contain archetypal reactions in generic form, and thus is much smaller. Twenty examples of the same reaction need not be included; it is sufficient for synthetic strategy that the student know that the particular transformation can be accomplished. Toward the Inference Engine: Elemental Mechanistic Processes Our expert system must be simple and have a manageable number of rules; a good algorithm is needed to predict reaction products of unfamiliar reactions and to rationalize known transformations. Mechanisms unite all reactions with a common logical thread. Just as a proper sentence uses known words within a grammatical framework, a reaction mechanism is an assembly of a limited number of recogniz-

able mechanistic steps. A student will need to know this mechanistic vocabulary and the grammar of reasonable energetics to make a sensible mechanistic sentence. For a decade, twelve common mechanistic steps (listed below) have been used in my course (4). In essence, a mechanism is assembled from known pieces. If one wishes, these twelve mechanistic steps can be condensed into only five arrow operations: ionization, neutralization, 1,3-electron-pair displacement, 1,3-electron-pair abstraction, and 1,5-electronpair displacement (5). Viewing the Problem Space as a Tree: The Combinatorial Explosion Problem The problem space that is searched by an expert system is usually viewed as a graph called a tree. The binary search tree with n levels has 2n possible final states (Fig. 2). If our search tree were to consider 12 mechanistic processes at each level, it is painfully obvious that the tree would become unwieldy in just a few levels (3 levels produce 123 or 1728 final states to consider). The generic electron sources and sinks limit which elemental processes can occur, but do not always prevent a combinatorial explosion of the search tree (6). In expert system design, there are three common methods of searching a tree: A depth-first search dives down into the search tree, ignoring all the other options at each node. If a dead end is reached, it backs up to the nearest node and makes another choice. A depth-first search works well if there are few choices at each node and several possible goal states, but wastes too much time exploring dead ends and stops with the first solution found. A breadth-first search explores all possible choices from each node, then proceeds to the next level and repeats. It guarantees that all choices are examined and finds the shortest route to the goal; this search strategy can be very slow if there are many choices at each node. A best-first search is a breadth-first search in which only the best nodes are explored at each level. The other nodes are retained in case a dead end is reached. The number of nodes is manageable, even if there are many choices at each node and the search proceeds to deeper levels. Control knowledge is required to determine which nodes are best at each level. It is this best-first search strategy that the students must master; if they learn how to perform a deliberate best-first search, it will become internalized with practice. It is important that students generate all reasonable options and then select the best, rather than proceed to the next level with the first idea that strikes them (an undesired depth-first search).

Twelve Elemental Mechanistic Processes 1. Proton transfer to and from an anion or lone pair 2. Ionization of a leaving group 3. Trapping of an electron-deficient species by a nucleophile

Start

4. Electrophile addition to a multiple bond

First level

5. Electrophile loss from a cation to form a pi bond 6. 1, 2 Rearrangement of a carbocation 7. The SN2 substitution

Choice A

Choice B

Second level Choice C Choice D Choice E

8. The E2 elimination

Choice F

9. The AdE3 addition 10. Nucleophilic addition to a polarized multiple bond 11. Beta elimination from an anion or lone pair 12. Concerted six-electron pericyclic

778

Figure 2. A binary search tree with just two levels has four final states, choices C, D, E, and F.

Journal of Chemical Education • Vol. 74 No. 7 July 1997

In the Classroom Control Knowledge To Guide the Inference Engine: Trimming the Search Tree To build a student’s ability to make a best-first search, one needs to teach cross-checks and rules to guide the search process (4). These cross-checks and rules are important tools and should become second nature through frequent use in lecture, study, and homework. They need to be made most explicit in the teaching process; students need to be actively and frequently confronted with situations that require them to make decisions using these cross-checks, trends, and tools. This decision-based, expert-system approach lends itself easily to Socratic-method- and activelearning-based teaching strategies. ∆pKa rule.—The leaving group or anion produced in a reaction should be no more than 10 pKa units more basic than the incoming nucleophile or base. This powerful heuristic is from Jorgensen’s CAMEO expert system (7). Coulomb’s Law. —Anions are electrostatically attracted to cations and vice versa; furthermore cations do not attack cations nor anions attack anions. Dications or dianions are rare. Electron Flow Check.—In each step, the electron flow indicated by the arrows should start with a good electron source, end at a good electron sink, and proceed by a known elemental mechanistic process (electron flow path). Proton transfer Keq calculation.—Proton transfers tend to form the weaker base. A proton transfer Keq less than 10{10 is not useful; this can be considered just a subset of the ∆pKa rule. Stability Trends.—The stability of intermediates such as carbocations, carbanions, and radicals can be used to select between reasonable alternatives (e.g., Markovnikov’s rule). Reactivity Trends.—Identifying the most reactive nucleophile and electrophile in the reaction mixture is essential to finding the most probable reaction partners. The student should be able to rank the relative reactivity of lone pair nucleophiles, acids, bases, organometallics, leaving groups, carboxyl derivatives, electron donating groups, and electron withdrawing groups. pK a span.—No medium can possibly be both strongly acidic and strongly basic. A pKa span of 8 units between species in equilibrium is acceptable, but a span of 14 pKa units or more is probably not useful. Medium pH.—The route proposed must be consistent with the pH of the medium; acidic media contain powerful electrophiles and rather weak nucleophiles, whereas basic media contain excellent nucleophiles and weak electrophiles. ∆H of reaction calculation.—“Bonds broken minus bonds made” gives a crude approximation for comparing the relative stabilities of neutrals with neutrals and can be used to select between competing products in reversible systems. HSAB principle.—“Hard with hard, soft with soft” can help explain the dual reactivity of many systems under irreversible conditions (large drops in pKa), such as ambident electrophiles (e.g., organometallic addition to enones) or ambident nucleophiles (e.g., enolate alkylation). Access & alignment.—Steric hindrance can drastically limit some reaction paths, such as the S N2. The E2 requires the carbon–hydrogen and carbon-leaving group bonds involved to be nearly coplanar. Kinetics.—The search tree can be trimmed by determining what processes are expected to be the fastest. For example, proton transfers are usually exceptionally fast and often comprise the first step in many reactions. This rule must be tempered with the fact that proton transfers be-

tween carbon acids and carbon bases are slow enough to allow nucleophilic additions to compete. Typo check.—Check Lewis structures, formal charges, charge balance, etc., for errors and omissions. The Problem Solving Algorithm for Students: A Recursive Best-First Search •

Classify generic electron sources and sinks first. Identify the best electron source and sink.



Generate electron flow paths using the electron sink and the possible process (substitution, etc.)



Select the most probable path using the tools, trends, and cross-checks discussed above.



Repeat for the next level. If a dead end is reached, return to the previous level and explore the next best route.

The classify step groups compounds together by similar mechanistic behavior. Table 1 shows the classification of electron sources into generic types. The best electron source is located by searching for the most reactive species first: organometallics, metal hydrides, and reactive metals, then electron-rich systems such as enolates and lone-pair nucleophiles, followed by normal pi bonds, and finally aromatics. Likewise the classification of electron sinks, Table 2, looks first for electron-deficient species, then for good leaving groups, and then for polarized multiple bonds. Since each generic type has its own internal reactivity trend, the student should be exposed to examples from actual reactions that allow for reactivity comparisons between generic groupings. At this step, one must also check if the medium is acidic or basic and locate the most acidic and basic groups present. Table 1. Sorting the Common Electron Sources into Eight Generic Types Generic Source Class

Examples

Organometallics

Alkyllithiums

Group 1 metal hydrides

Sodium hydride

Complex metal hydrides

Sodium borohydride

Active metals

Lithium metal

Lone pair nucleophiles/bases

Alcohols, amines

Allylic sources

Enolates, enamines

Simple pi bonds

Alkenes, alkynes, dienes

Aromatic rings

Benzene

Table 2. Sorting the Common Electron Sinks into Eight Generic Types Generic Sink Class

Examples

Electron-deficient species

Carbocations, boron trifluoride

Acids

Hydrogen chloride

Single bonds between heteroatoms

Bromine

Leaving groups on sp 3 carbons

Methyl iodide

Carboxyl derivatives

(sp 2-bound

L)

Heteroatom–carbon multiple bonds

Acyl halides, anhydrides, esters Aldehydes, ketones, nitriles, carbon dioxide

Conjugate acceptors

Enones, acrylates

Redox-active metals

Chromium trioxide

Vol. 74 No. 7 July 1997 • Journal of Chemical Education

779

In the Classroom OH2 + H2 O + Cl OH H3 O + Cl

Level 2

SN2

DN

C H3 O + Cl + OH

DN 1

SN2 2 Cl

E2 3

4

5 O

2H 2 O

OH2

Level 3 H3 O + OH

H3 O

+ HCl

C

p.t.

p.t.

H3 O

+ HCl

E2 OH

Cl Level 1

p.t.

2H 2 O + Cl

H3 O + Cl

DE

AN Cl

H2 O + Cl

+ OH

2H 2 O

(and isomer) H3 O + Cl + H2 O

H3 O + Cl + H2 O

Figure 3. Level 1 of the tert-pentyl alcohol to tert-pentyl chloride tree. Alternative 1, DN, ionization of a hydroxide leaving group; alternative 2, S N2, substitution of hydroxide by chloride; alternative 3, E2, elimination of hydroxide by chloride; alternative 4, p.t., proton transfer from the alcohol to chloride; alternative 5, p.t., proton transfer from hydronium ion to the alcohol.

Figure 4. Levels 2 and 3 of the tert-pentyl alcohol to tert-pentyl chloride tree (trimmed). DN, ionization of a leaving group followed by AN, trapping of an electron-deficient species by a nucleophile, completes the SN1 process. Note that the E1 elimination minor product is also generated: paths DN, ionization of a leaving group followed by DE, electrophile loss from a cation to form a pi bond.

The generate step makes use of the type of electron sink to find the relevant electron flow paths. For example, if the sink is an sp3-bound leaving group, then substitution and elimination paths are common; if it is a polarized multiple bond, then addition paths are generated instead. Always, proton transfer possibilities are checked. Energy surfaces, often confined to graduate-level texts, are used to map out the possible routes. Surfaces not only are easily understood by undergraduates, but also provide them with a powerful tool to interrelate paths like the E1, E2, and E1cb. Students easily grasp the idea of the surface tilting to favor the E1 as the carbocation is made more stable, or folding to favor the E2. The corresponding addition paths, the AdE2, AdE 3, and AdN 2, can likewise be related to each other with a similar surface. The select step is the core of the algorithm. As a model for a true scientific method process, the heuristics discussed in the previous section are used to rule out alternative routes. The most general cross-checks are the ∆pKa rule and the stability trends. If none of the alternatives survive the selection process, then most likely the generate step was incomplete. Critical thinking requires the student to thoroughly examine any alternative before accepting it. This critical-thinking ability is fostered by seeing multiple examples of the results from actual reactions linked to the decision-making rules and heuristics in the algorithm. A typical exercise in class introduces a new reaction and begins with the questions, “What are the best electron sources and sinks? Which general processes (proton transfer, addition, elimination, substitution, rearrangement) could be expected to occur?” The possible elemental mechanistic processes for each step are generated with student help. The class can often come up with alternatives that have not occurred to the instructor, which they need to see subjected to the selection process. At each level of the tree, students must be actively involved in the process of judging which path is reasonable, for the core of the course is the students’ learning the selection process. Because the search process is repetitive and the cross-checks are used frequently, the process is naturally reinforced throughout the semester as each new reaction is introduced in the same manner. An example search would begin, “How does the reaction of concentrated hydrochloric acid with tert-pentyl alcohol to produce tert-pentyl chloride work?” The class would then “brainstorm” to generate alternatives for the first step

(Fig. 3) and then select the best alternative making use of the control knowledge. Option 1 fails, for three conditions must be satisfied for a facile ionization: the carbocation is tertiary or better, the solvent is polar, but the conjugate acid of the leaving group should have a negative pKa, and hydroxide does not. Option 2 fails, for the site of attack is much too hindered for an SN2, and the conjugate acid of the leaving group should have a pKa less than about 10 for an SN2 to work well. Option 3 fails, for this process climbs 23 pKa units, violating the ∆pKa rule. Option 4 fails: the proton transfer Keq is 10{26, well below the minimum of 10{10 for a Keq to be useful. However, option 5 passes, for the proton transfer Keq is just 10{1 , and this is chosen as the best alternative for the first level of the tree. From the best alternative, students gradually would generate the rest of the tree (Fig. 4), triggering valuable discussions about SN 2 steric requirements, carbocation stability, and substitution versus elimination. On occasion, more than one route may seem reasonable, which leads naturally to a discussion of laboratory testing of mechanistic alternatives. As students become more adept at the generate-and-select process, they can see a greater depth into the tree and begin to predict the answer intuitively. Further examples of the search process can be found in reference 4. There are four common errors by students learning the algorithm: (i) classification error—failure to recognize more unusual leaving groups is relatively common; (ii) depth-first search—students often go with the first idea that occurs to them and not back up to consider alternatives until they hit a snag; (iii) failure to cross-check— automatic use of control knowledge is essential for the algorithm to work, and students often forget to check proton transfer K eq, carbocation or carbanion stability; (iv) premature exit—before enough levels are explored to reach a solution, the impatient student decides to finish the problem by using a volley of arrows and, in as few steps as possible, rearrange the lines and dots of the reactant structure into the lines and dots of product. This last difficulty is especially common after an unproductive depth-first search. All these errors become less common as the inference engine and control knowledge become established. Group problem-solving is very useful in overcoming these difficulties; groups have a natural tendency to generate multiple approaches to problems, requiring the participants to decide which approach is best.

780

Journal of Chemical Education • Vol. 74 No. 7 July 1997

In the Classroom Testing the Program The typical student concern, “Is this going to be on the exam?” mandates that the methods of testing must also change to match the teaching approach. Exams in this course test students’ ability to understand the tools and trends, use the control knowledge, and make reasonable decisions. A typical first-semester final would include a trends section for ranking leaving groups, nucleophiles, electron donating groups, electron withdrawing groups, base and acid strength, carbocation and carbanion stability, etc.; a mechanisms section for rationalizing several familiar and unfamiliar reactions; a tools section asking the students to predict the “hot spots” for nucleophilic or electrophilic attack on a molecule, use the ∆pKa rule, calculate a proton transfer Keq, use ∆H to predict the most stable product, classify into generic groupings, select a molecule’s most acidic H; a prediction section asking them to give the expected product of a set of reactions, predict substitution versus elimination, select a reagent to cause a transformation to occur, provide a possible reactant given the conditions and the product; a theory section requesting them to draw an energy diagram, interpret some experimental result, explain the reactivity of a species; and finally a section of miscellany, nomenclature, definitions, structure elucidation, etc. A pKa chart and a bond strength chart are provided with each examination. Successes of the Program The expert systems teaching approach, used at New College now for a decade, has worked well for both majors and nonmajors. It has been used in classes of 20 to 40 students and should work well within the recitation sections of larger lecture courses. Student evaluations of the course have been overwhelmingly positive, with this comment from one nonmajor as typical: “I feel that I have a working knowledge of organic that will serve me for years to come; the tool-using approach allowed me to like learning the material and to approach it reasonably and rationally.” Chemistry graduate schools report back that our students “know how to think” and do excellently in their programs. Al-

though New College is small (550 students), in the last ten years 33 of 34 chemistry graduates went or are applying to graduate or professional schools. From the last five years, 59% of our natural science graduates, most of whom take this course, went on to graduate study or professional schools. Biology alums have commented with surprise that they are considered the “organic expert” among the graduate students. The draw of the sciences is the mystery of a good puzzle; few students enter the field because they love to memorize. Figuring out a possibility for how a reaction “works” is very appealing. Students have much less tendency to write nonsense with arrows because they are assembling proven mechanistic units. They gain confidence as they discover that even unfamiliar, complex mechanisms yield to their methods of analysis. They feel empowered by cross-checks that allow them to judge whether a mechanistic hypothesis is reasonable. Finally, students develop a chemical intuition and a method of analyzing complex systems that extrapolate into biochemistry and other fields. Note 1. Presented in part as a poster at the 25th Reaction Mechanisms Conference; Notre Dame, IN; June 10–14, 1994.

Literature Cited 1. Collins, H. M. Artificial Experts: Social Knowledge and Intelligent Machines; MIT: Cambridge, MA, 1990; Winston, P. H. Artificial Intelligence, 3rd ed.; Addison-Wesley: Reading, MA, 1992; Luger, G. F.; Stubblefield, W. A. Artificial Intelligence and the Design of Expert Systems; Benjamin/Cummings: Redwood City, CA, 1989; Cartwright, H. M. Applications of Artificial Intelligence in Chemistry; Oxford Univ.: Oxford, 1993. 2. Marshall, G. Advanced Students’ Guide to Expert Systems; Heinemann: Oxford, 1990. 3. Postman, N.; Weingartner, C. Teaching as a Subversive Activity; Dell: New York, 1969. 4. Scudder, P. H. Electron Flow in Organic Chemistry; Wiley: New York, 1992. 5. Wentland S. H. J. Chem. Educ. 1994, 71, 3–8. 6. Scudder, P. H. J. Org. Chem. 1990, 55, 4238–4240. 7. Salatin T. D.; Jorgensen W. L. J. Org. Chem. 1980, 45, 2043–2051.

Vol. 74 No. 7 July 1997 • Journal of Chemical Education

781