--- title: "Why Peter?" description: "The name gptr, for Peter Naur and Peter Wason, and what System 1 and System 2 mean." output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Why Peter?} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- gptr logo **gptr is the R package; Peter is your agent inside R.** Ask Peter with `peter()` to work with your live objects. A conversational model returns a session; a typed decision model returns a vector that ordinary R code can use. Read gptr as g for grammar, as in ggplot2's grammar of graphics, and ptr for Peter: a grammar for Peter. The name honors two Peters, Peter Naur for readable programs and Peter Cathcart Wason for the study of reasoning. ## Peter Naur: make the program readable Peter Naur was a Danish computer scientist and a central contributor to ALGOL 60. He edited its language report, which used the syntax notation now known as **Backus-Naur Form** to describe how programs are constructed. This was collaborative work, including John Backus; Naur helped make the language's definition precise and readable. The [revised ALGOL 60 report](https://doi.org/10.1145/366193.366201) records this collaborative work and shows the notation in use. For gptr, the connection is practical: an analysis should leave code you can read, inspect and run. Peter works inside R, and a designated history document can retain the R code an agent executed beside the prompt that requested it. Recording preserves work for review; replay still depends on the code's inputs, packages and side effects. ## Peter Cathcart Wason: examine the reasoning Peter Cathcart Wason studied human reasoning. With Jonathan St. B. T. Evans, he proposed a dual-process account in ["Dual processes in reasoning?"](https://doi.org/10.1016/0010-0277(74)90017-1). Their study distinguished processes behind people's responses from the conscious reasons people gave for them. An explanation could be a justification rather than an accurate account of how a response arose. That influence suggests a useful discipline for model-assisted analysis: examine the result and the evidence, as well as the explanation. ## Two ideas in one R workflow gptr uses **System 1** for typed logical decisions, choices and scores with probabilities, and **System 2** for conversational agents that produce text and request tools. These are software roles inspired by reasoning research; they do not establish that models reproduce human cognition or that Wason introduced those labels. Use [typed decisions](system-one.html) to screen or route inputs, keeping uncertainty visible. Use [agent sessions](language-models.html) to inspect objects and carry out requested R work. [Coach the agent](tailor-and-coach.html) on your own task: code, not a model, keeps a revision only when a new run passes its checks and any of yours. Keep useful work in a [readable history document](script-as-history.html), and verify the calculations and outputs before relying on a model-generated explanation.