MyNixOS website logo
Description

Parallel Constraint Satisfaction Networks in R.

Parallel Constraint Satisfaction (PCS) models are an increasingly common class of models in Psychology, with applications to reading and word recognition (McClelland & Rumelhart, 1981), judgment and decision making (Glöckner & Betsch, 2008; Glöckner, Hilbig, & Jekel, 2014), and several other fields (e.g. Read, Vanman, & Miller, 1997). In each of these fields, they provide a quantitative model of psychological phenomena, with precise predictions regarding choice probabilities, decision times, and often the degree of confidence. This package provides the necessary functions to create and simulate basic Parallel Constraint Satisfaction networks within R.

PCSinR

The PCSinR package contains all necessary functions for building and simulation Parallel Constraint Satisfaction (PCS) network models within R.

PCS models are an increasingly used framework throughout psychology: They provide quantitative predictions in a variety of paradigms, ranging from word and letter recognition, for which they were originally developed (McClelland & Rumelhart, 1981; Rumelhart & McClelland, 1982), to complex judgments and decisions (Glöckner & Betsch, 2008; Glöckner, Hilbig, & Jekel, 2014), and many other applications besides.

Installation

  • The current stable version is available via CRAN, and can be installed by running install.packages("PCSinR").
  • You can install the latest development version directly from GitHub with the devtools package. To do so, please run devtools::install_github("felixhenninger/PCSinR@master").

Usage

The functions in this package simulate a PCS network, given an interconnection matrix. Methods for creating such a matrix from the most common models are forthcoming.

Once a connection matrix has been specified, the model can be simulated easily using the most common parameter set.

require(PCSinR)
#> Loading required package: PCSinR

interconnections <- matrix(
  c( 0.0000,  0.1015,  0.0470,  0.0126,  0.0034,  0.0000,  0.0000,
     0.1015,  0.0000,  0.0000,  0.0000,  0.0000,  0.0100, -0.0100,
     0.0470,  0.0000,  0.0000,  0.0000,  0.0000,  0.0100, -0.0100,
     0.0126,  0.0000,  0.0000,  0.0000,  0.0000,  0.0100, -0.0100,
     0.0034,  0.0000,  0.0000,  0.0000,  0.0000, -0.0100,  0.0100,
     0.0000,  0.0100,  0.0100,  0.0100, -0.0100,  0.0000, -0.2000,
     0.0000, -0.0100, -0.0100, -0.0100,  0.0100, -0.2000,  0.0000 ),
  nrow=7
)

result <- PCS_run_from_interconnections(interconnections)

A common simulation result concerns the number of iterations needed until convergence is reached.

result$convergence
#> default 
#>     116

The output also contains a log of the model states across all iterations. Here, we examine just the final state.

result$iterations[nrow(result$iterations),]
#>     iteration     energy node_1    node_2    node_3    node_4      node_5    node_6     node_7
#> 117       116 -0.2916358      1 0.5293124 0.3669084 0.1906411 -0.07023219 0.5477614 -0.5477614

General Information

The PCSinR package is developed and maintained by Felix Henninger. It is published under the GNU General Public License (version 3 or later). The NEWS file documents the most recent changes.

This work was supported by the University of Mannheim’s Graduate School of Economic and Social Sciences, which is funded by the German Research Foundation.

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows