Remarkably little is known about the cognitive processes which are employed in the solution of clinical problems. This paucity of information is probably accounted for in large part by the lack of suitable analytic tools for the study of the physician's thought processes. Here we report on the use of the computer as a laboratory for the study of clinical cognition. Our experimental approach has consisted of several elements. First, cognitive insights gained from the study of clinicians' behavior were used to develop a computer program designed to take the present illness of a patient with edema. The program was then tested with a series of prototypical cases, and the present illnesses generated by the computer were compared to those taken by the clinicians in our group. Discrepant behavior on the part of the program was taken as a stimulus for further refinement of the evolving cognitive theory of the present illness. Corresponding refinements were made in the program, and the process of testing and revision was continued until the program's behavior closely resembled that of the clinicians. The advances in computer science that made this effort possible include "goal-directed" programming, pattern-matching and a large associative memory, all of which are products of research in the field known as "artificial intelligence". The information used by the program is organized in a highly connected set of associations which is used to guide such activities as checking the validity of facts, generating and testing hypotheses, and constructing a coherent picture of the patient. As the program pursues its interrelated goals of information gathering and diagnosis, it uses knowledge of diseases and pathophysiology, as well as "common sense", to dynamically assemble many small problem-solving strategies into an integrated history-taking process. We suggest that the present experimental approach will facilitate accomplishment of the long-term goal of disseminating clinical expertise via the computer.