PARRY: A COMPUTER SIMULATION MODEL OF PARANOIA
==============================================
- DC 2026 ns.ca

FILES
-----
Herein are the PARRY executable (parry.exe) plus some data files
which define the program's language knowledge. These data files are:
CPATS.SEL - Complex sentence patterns
FAMLY.PAT - Patterns referring to family
IDIOM.ALF - Idiomatic substitutions
IRREG.ALF - Irregular verbs, known misspellings, and contractions
NEGATE.PAT - Patterns with opposite meanings
SPATS.SEL - Simple sentence patterns
SUFFIX.ALF - Word suffixes
SYNONM.ALF - Synonyms

These data files must be present in the same directory as parry.exe.
(The data files are modified versions of files obtained from
the CMU AI Repository Library; see "REIMPLEMENTATION" section below.)


RUNNING THE PROGRAM
-------------------
The program is a 32-bit stand-alone MS Windows console application
which can be run by entering "parry" in a console (command line)
window. (The program can run under either 32-bit or 64-bit MS
Windows operating systems.)

The program has several optional command line parameters.

Usage:

parry [-?|--help] [-pw|-pm|-ps] [-t] [-a anger] [-f fear] [-s shame]
  [-m mistrust} [-d dfile]

where:
  "-?" or "--help" to output help info.

  "-pw" is for weak paranoia, "-pm" for mild, and "-ps" for strong.

    In the weak paranoia model, the patient is less likely to
    express delusions, has smaller emotional jumps, and never
    enters paranoid (abnormal processing) mode.
    In the mild paranoia model, the patient has delusions, has
    greater emotional jumps, and can enter paranoid mode.
    In the strong paranoid model, the patient has delusions,
    has emotional jumps on par with the mild model, but can enter
    paranoid mode more readily than in the mild paranoia case.


  "-t" to trace intention and emotion variables.
    After each input-output (I-O) pair, the current values of the
    patient's intention, anger, fear, shame and mistrust will be
    listed.

  "anger" is the initial anger value (0.0 to 10.0).
    Can't be less than half the initial value for shame.
 
  "fear" is the initial fear value (0.0 to 10.0).
    Can't be less than half the initial value for shame.

  "shame" is the initial shame value (0.0 to 10.0).
    A higher shame value will make it more likely that the
    patient will enter paranoid mode.

  "mistrust" is the initial mistrust value (0.0 to 15.0).

    (Note that anger, fear, shame and mistrust cannot fall
    below these user-specified initial values during the
    course of the interview.)

  "dfile" is the name of the output dialog file.
    This file will contain a record of the input-output (I-O) pairs
    processed by the program. (Note: The dialog file name cannot
    contain embedded spaces.)

Defaults:
If no command line parameters are passed to PARRY, this is
the same as if one had entered:

parry -pm -a 0.0 -f 0.0 -s 0.0 -m 0.0


DISCLAIMER
----------
No warranty, either expressed or implied, is given as to the
accuracy or functioning of this program. Use of this software
is at your own risk.



BACKGROUND
----------
PARRY was a computer simulation model of paranoia developed in the
1970s at the Stanford Artificial Intelligence Laboratory and at the
Department of Psychiatry at UCLA.

The PARRY program simulated a paranoid patient, while the
user/psychiatrist conducted a diagnostic interview with PARRY
via a computer terminal. PARRY responded to questions posed in
ordinary, unrestricted English, introduced its own topics, and
dealt with threatening or shame-producing situations.

PARRY ran nightly on the ARPA network for many years with more than
100,000 interactions.


REIMPLEMENTATION
----------------
This reimplementation for more recent computers is based on version 2
of PARRY (PARRY2). Some of the PARRY2 code and data is available at
the Carnegie Mellon University (CMU) Artifical Intelligence Repository
Library, but a more complete collection of the files is present at
the SAILDART Archive. The SAILDART Archive files have a Creative
Commons Public Domain license.

Information about PARRY2 can be found in the following documents:

"Pattern Matching Rules for the Recognition of Natural Language
Dialogue Expressions" - Kenneth Mark Colby, Roger C. Parkison, and
Bill Faught. (American Journal of Computational Linguistics,
Microfiche 5, September 1974.)

"The Interaction of Inferences, Affects, and Intentions, in a Model
of Paranoia" - Bill Faught, Kenneth Mark Colby, and Roger Parkison.
(Stanford Artificial Intelligence Laboratory Memo AIM-253, December
1974.)

Note that PARRY2 was not the last version of PARRY. For example,
a reference for the later version PARRY3 is:

"Motivation and Intentionality in a Computer Simulation Model of
Paranoia" - William S. Faught. (Interdisciplinary Systems Research,
ISR 58, Springer Basel, 1978.)


ANSWERS TO SOME QUESTIONS
-------------------------
1. What was the purpose/use of PARRY?

   "A model of psychopathology in which the mind is in error about
   some of its own processes has implication for the prevention,
   reduction and cure of disorder. ...
   A practical use for PARRY lies in its use as a training aid.
   ... They (students and medical residents) can learn what
   sort of expressions upset the model and can lead to withholding
   of information or breaking off the doctor-patient relationship."

   - Kenneth Mark Colby ("Ten Criticisms of PARRY", Stanford
   Artificial Intelligence Memo AIM-244, Sept. 1974, pp. 4-5).


2. What limitations are there on input to the program?
   a) The program won't process more than 200 characters at a time.
   b) The program can't process compound sentences well.
      Thus don't use:
        "Who are you and how old are you?"
      Instead use:
        "Who are you? How old are you?"

3. Is the patient's name Parry?
   Ask the patient.

4. Why did the program change my initial values for anger or fear?
   The initial values for anger or fear can't be less than
   half the initial value for shame.

5. Why does the patient claim that the year is 1973?
   The program refers to some people, places and things that no longer
   exist. For instance, the Bay Meadows race track is gone. Live
   horseracing (an important part of the story line) is effectively
   dead in northern California, and may be gone from all of California
   in a few years. Therefore the simulation is set in 1973 to avoid
   time-related inconsistencies.

6. Isn't the patient reporting the day of the week (e.g., Saturday)
   incorrectly?
   The day is correct for the year 1973.

7. Why doesn't the output from this reimplementation exactly
   match what the original PARRY produced in some cases?
   a) The original PARRY's output varied depending on the program's
      version and how its model parameters were set.
   b) The output from PARRY was/is pseudo-randomly chosen in some
      cases.
   c) The reimplementation differs somewhat from the original program.

8. Why was PARRY2 reimplemented rather than the later PARRY3?
   PARRY2 was developed on the Stanford Artificial Intelligence
   Laboratory (SAIL) computer, whereas PARRY3 was developed on
   the Stanford University Medical Experiment (SUMEX) computer.
   Source code and documentation for PARRY2 are readily available
   on the internet, but that is not the case for PARRY3.

9. How can one tell whether a dialog file was produced by
   PARRY2 or PARRY3?
   Some differences are:
   a) PARRY3 has the affects/emotions distress, interest, and joy
      which aren't present in PARRY2.
   b) PARRY3 sometimes isn't as terse as PARRY2 in its replies.
   c) PARRY3 can interject comments while waiting for user input.
      PARRY2 won't do anything until it receives user input.

10. Is the source code for this reimplementation going to be made
    publicly available?
    No.

11. How can I find the program's version number?
    Use "parry -?".




