cal simulation guides€¦ · introduction ... android and provides a quick introduction for...

23

Upload: others

Post on 20-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run
Page 2: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

CAL Simulation Guides

ISSN 2054-2747

Dimitrios Alexandrakis, Esther Mondragón, Eduardo

Alonso, Alberto Fernández & Jonathan Gray

Centre for Computational and Animal Learning Research

St. Albans, United Kingdom

Page 3: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

i

1. Introduction ................................................................................................................... 1

2. Installation ...................................................................................................................... 2

3. Application Workflow .................................................................................................... 3

3.1 Navigation ................................................................................................ 3

3.2 Simulator Panel ........................................................................................ 6

3.2.1 Input Tab ..................................................................................... 6

3.2.2 Parameters Tab ........................................................................... 9

3.2.3 Output Tab ................................................................................ 10

3.3 File Operations ....................................................................................... 11

3.4 Settings................................................................................................... 13

3.5 Help ........................................................................................................ 16

3.6 About ...................................................................................................... 16

4. Terms of Use ................................................................................................................ 17

5. Feedback ...................................................................................................................... 18

6. References .................................................................................................................... 18

Page 4: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

1

This document presents the user guide of the Rescorla & Wagner Simulator ver.1.0 for

Android and provides a quick introduction for installing and using the application on an Android

based device.

The application can run on any device (Phone or Tablet) with an Android version 4.0

(Ice Cream Sandwich) or higher operating system.

This document does not refer to any programming details or to the theory behind the

Rescorla & Wagner model.

R&W Simulator ver.1.0 simulates the Rescorla-Wagner model (Rescorla & Wagner,

1972) and is a direct port of the Rescorla & Wagner Simulator ver. 4 desktop implementation

(Alonso, Mondragón & Fernández, 2012; Mondragón, Alonso, Fernández & Gray, 2012, 2013)

available at http://www.cal-r.org/index.php?id=software.

This Android version of the simulator incorporates all the functionalities of the desktop

implementation.

Page 5: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

2

The application is built in a single R&WSimulator.apk file. The file is available for

download on the following website:

http://www.cal-r.org/RW-Android-Simulator/RW-Android-sim

Users can download the file directly to the Android device or alternatively download

the file on a PC and transfer it to the Android device through a USB connection.

The application installation begins by tapping the downloaded R&WSimulator.apk

file. Before installation the application will request permission to:

Modify or Delete contents of the USB storage.

Read the contents of the USB storage.

Access the network.

These permissions are safe and are vital for the correct operation of the application.

Page 6: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

3

To start the application tap the R & W Simulator application icon:

The following diagram provides a navigation map for the application:

Figure 1. Application navigation map

Page 7: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

4

The first application screen consists of an ‘Action bar’ and different Panels. The ‘Action

bar’, (blue top bar) defines the available actions to the user at any given time and will

dynamically change depending on the user input. The following figure represents the initial

application screen.

Figure 2. Opening screen

The user can navigate through the panels and use the available actions either by

Short-tap (tap) or

Long-tap an item where appropriate.

Page 8: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

5

The Android navigation buttons provide the standard behavior of an android

application:

Back button

Allows the user to navigate to the previous panel.

Lowers the keyboard when appropriate.

Home Button

Exits the application.

The RW logo button located on the left side of the ‘Action bar’ provides access

to the Main Menu of the application. Through the Main Menu, the user can navigate to the

available application panels.

Figure 3. Main Menu

Page 9: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

6

The panel allows the user to design and run simulations. The panel is

separated into three different tabs:

Input Tab - Design a simulation.

Parameters Tab - Desired CS and US parameters for the simulation.

Output - Shows the output of the simulation.

3.2.1 Input Tab

Groups can be added and subtracted with the corresponding “” and “” buttons located

on the ‘Action bar’. Tapping a Group will enter the Phase Details Panel for this Group. Long

tapping a Group allows the user to change the name of the Group as desired.

Phases can be added and subtracted with the corresponding “” and “” buttons located

on the ‘Action bar’. Tapping on a phase details field allows the user to input the experimental

design for that Phase, describing each trial type as follows:

Different trial types should be separated by a slash symbol “/”. Please note that no space

should appear between the characters. For instance, a biconditional discrimination design

consisting of 60 AX+ trials, 60 AY- trials, 60 BX- trials, and 60 BY+ trials is input as follows: On the

first screen tap Group 1 to access the design cell in Phase 1, now tap inside the cell and replace

0 with

60AX+/60AY-/60BX-/60BY+

Adding a hat (caret) symbol (ˆ) immediately after the cue (e.g. 60AXˆ+) acts as a mark

to extract the associative strength values calculated at that point for that stimulus from the

remaining training stimulus values. The associative strength values calculated on those trials will

Page 10: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

7

then be copied to the output and to the figures as a snapshot of the chosen cue, allowing the

user to work with “probe” trial values.

The hat symbol is located through the symbols layout of the Android keyboard as

shown below:

The following example will guide the user on how to input different groups and phases.

It was run using configural cues (see Section 3.4 pp 14 for a description on how to set the use of

configural cues).

NOTE: It is possible for the user to copy and paste values from the input fields by

long-tapping on the characters (not on the field). Selection marks will appear that can be slid to

the required position. A new set of action icons will also appear in the ‘Action bar’ at the top for

the user to choose from. Pressing the Copy icon will copy the selected value. The user can then

paste this value by long- tapping the desired input field and selecting the Paste icon.

Figure 5. Copy and Paste buttons

Figure 4. Accessing Android symbols keyboard

Page 11: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

8

Long tapping on Phase 1 allows the user to change the name of the Phase as desired. The

user can navigate back to the Group list either by tapping the Android back button or the RW

Simulator logo located on the left side of the ‘Action bar’.

Warning: In case that an input field is not editable or visible due to the

software keyboard, the user must first select a different input field and then

re-select the desired field in order to continue.

The order of the trials is defined by the order they are entered. Alternatively, the user can

tick the “Random” checkbox to randomize the order of presentation within phases.

The number of random combinations that the simulator shall execute can be defined

through the panel as explained later in this guide.

Figure 6. Design input: groups and phases

Page 12: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

9

3.2.2 Parameters Tab

The parameters tab allows the user to enter the desired CS and US parameters for the

simulation. The US list contains a set of default values given to the US. Beta () and Lambda ()

values can be changed according to the user’s needs. The CS list allows the user to modify the

Alpha () values for each of the stimuli.

Tapping the Simulation Details icon on the ‘Action bar’ will provide a quick overview

of the current simulation details.

Tapping the Run icon on the ‘Action bar’ will start the simulation. This will produce

a text output on the output tab of the Simulator panel.

Figure 7. Stimulus parameters screen

Page 13: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

10

3.2.3 Output Tab

The Output tab shows the results of the simulation for the current design. The user can

scroll up and down to check the stimulus mean V values per Trial, Group and Phase.

Tapping the Figure Parameters icon will open the Figure Parameters panel where

the user can enable and disable Groups and cues from being plotted in the graph. The Phase

Spinner located on the top of the Panel allows the user to select the desired phase to be plotted.

Tapping the Figure Settings icon will open the Figure Settings panel where the user

can modify the details of the figure to be plotted. Pressing the back button or the RW logo on

the ‘Action bar’ will return to the Figure Parameters panel.

Tapping the Plot icon on the ‘Action bar’ will retrieve the calculated mean

values per stimulus and trial figure for the selected phase of the design.

The user can save this figure by tapping the Save icon . The figure is saved on the

device and can be viewed as any other image.

Figure 8: Numeric output and figure panels

Page 14: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

11

panel can be found on to the Main Menu, which is accessed by

tapping the top left RW icon. This panel allows the user to create and manipulate files. The

following operations are supported:

- Tapping on it leads to a menu in which the user is asked what to

do with the current session. The options Save, New, and Cancel are

available. Selecting New erases the current design and creates a new

experiment design.

- Saves the current experiment design to a file. Tapping on it will

open a menu to input the desired file name.

- Loads the selected experiment design from a file. Please note,

the application will periodically save the current experiment design

automatically. This is to provide an extra layer of security, should the

system crash for any reason. In the case of a malfunction or system

crash the user can load the last saved state of the application by

tapping the Load last saved state icon located in the ‘Action bar’.

- Export the current output as an Excel file. It creates a

workbook that has a different sheet per group. Phases are presented

individually on a separate table. Each sheet contains the name of the

file followed by CS and US parameters. A line showing its design

precedes each Phase table.

- Allows the user to Open, Delete and Email the saved files of

the application. These includes Design Files, Excel Files and Figure

Files. The panel is separated into three tabs one for each

file type. Long tapping a file from the list will show a menu with the

available actions for the specific file.

Page 15: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

12

Alternatively the user can copy or transfer the files of the application by connecting the

device on a PC and navigating to the application’s data folder. The data folder resides in the

root directory of the device:

It can be accessed like any other data storage device (eg., USB Flash Drive).

Figure 9. File Operations panels

Page 16: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

13

The « panel allows the user to manipulate the applications settings. These act on a

global level and if changed, will remain the same until changed again. Available settings are:

- Allows the user to enter the desired number of

random trial combinations for the random enabled phases.

Warning: Android devices have limited hardware resources and therefore computational restrictions exist. It is recommended to keep this number low (below 100) in order to ensure faster calculations and stability.

- Allows the user to enter the desired decimal

precision for the calculated output values.

- Defines a trial limit for the experiment designs.

Designs that exceed a total of 200,000 trials will not run. This is to

ensure that the application will not crash due to memory overload.

Disabling this will remove the limit but the exact number of trial

allowance will depend solely on the resource capabilities of the device.

- Allows the user to enter different US parameters per

phase. Enabling this will activate the needed fields on the Phase

Details panel.

Figure 10. US parameters per Phase

Page 17: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

14

- Enables calculation of stimulus compounds. The

associative strength for the compound stimuli is represented as AX, BX etc.

- Enables calculation of Configural cues (Wagner & Rescorla,

1972) thus allowing the simulator to compute compound values using added

Configural cues. The user can now set the desired alpha values for the

Configural cues in the parameters tab. The Configural cues are represented as

c(AX), c(AY) etc.

- Allows calculation of Context compounds. Enabling this

will activate the needed fields on the Phase Details panel. The user can now set the desired salience of the context, 0.15 by default and the context identity. Six distinct contexts are available to be assigned (Φ, Ψ, Θ, Ξ, Ω, and Κ) and their salience configured per phase, with a maximum of one context in each phase. The context is treated as an always present background cue, implemented like any other stimulus but with the particularity that it repeats itself throughout the session, acquiring associative strength during reinforced trials and losing it during non-reinforced trials. In addition, unlike a standard stimulus, contextual cues lose associative strength during the inter-trial interval. To determine the amount of loss during ITIs, an ITI/CS ratio is assumed. The user can set the desired ITI/CS ratio for each phase.

Figure 11. Context per phase function enabled

Page 18: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

15

- Enables figure point markers. Enabling point may decrease

performance.

- Allows the user to set the point size for the figures markers.

- Allows the user to set the desirable series line width for the

figures.

- Allows the user to set the desirable title text size for

the figures.

- Allows the user to customize the label text size for the figures.

- Allows the user to change the legend text size for the

figures.

- Allows the user to set the desirable text size for the figures.

- Enables antialiasing for the figures. Activating this will decrease

performance. Antialising in computer graphics is a software technique to

diminish “jaggies”, stairstep like lines that should be smooth.

- Allows the user to specify the desired series colours for the

figures. Tapping this will show the Color Pool Panel where the user can

specify the point style and colour of the plotted series. The colours are link

to the cues based on the order of appearance in the output tab.

Page 19: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

16

The menu will load this guide in a pdf format. A note “Please Wait, loading guide” is

shown until loading is complete.

The menu opens a splash screen with the software credentials.

Figure 12. Figure colour pool panel

Page 20: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

17

Please read carefully the following license agreement. If you do not accept the terms of the

agreement, please uninstall immediately the application from your device.

R&W Simulator ver. 1.0 for Android and its software and documentation is copyrighted by

Dimitrios Alexandrakis, Esther Mondragón, Eduardo Alonso, Alberto Fernández and Jonathan Gray.

The following terms apply to R&W Simulator ver. 1.0 unless explicitly disclaimed.

The author hereby grants permission to use, copy and distribute (but NOT sell or modify) this

software and its documentation, provided that it is retained unchanged in all copies and that this

notice is included verbatim in any distributions. No written agreement, license or royalty fee is

required to use or distribute this software.

Use of this software and its authorship must be

acknowledged in oral (for example, lectures, tutorials, laboratory

sessions, demonstrations, conferences) or written

communication (for example, books, articles, proceedings).

The Author is not liable for any misuse or misleading use of

the software.

IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY

SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA

OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,

NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF

OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS

SOFTWARE

THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-

INFRINGEMENT.

Page 21: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

RESCORLA & WAGNER SIMULATOR FOR ANDROID © ver.1.0

18

THIS SOFTWARE AND ITS DOCUMENTATION ARE PROVIDED ON AN “AS IS” BASIS AND THE

AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS

OR MODIFICATION5.

If you have any questions or comments about the application or this document, please feel free

to email Dr. Esther Mondragón at [email protected]. We welcome any suggestions or

criticisms. If there is an inaccuracy somewhere, please let us know where it occurred and what values

were used. It would be very helpful if a saved file from the simulator which contains the values is

sent as an attachment.

Alonso, E., Mondragón, E., & Fernández, A. (2012). A Java simulator of Rescorla and Wagner’s prediction error model and configural cue extensions, Computer Methods and Programs in Biomedicine, 108, 346-355.

Mondragón, E., Alonso, Fernández, A & Gray, J. (2012). Rescorla & Wagner Simulator © V.4 [Computer software]. London: CAL-R. http://www.cal-r.org/index.php?id=R-Wsim.

Mondragón, E., Alonso, E., Fernández, A. & Gray, J. (2013). An extension of the Rescorla and Wagner Simulator for context conditioning. Computer Methods and Programs in Biomedicine, 110, 226-230.

Rescorla, R.A., & Wagner, A.R. (1972). A theory of Pavlovian conditioning: The effectiveness of reinforcement and non-reinforcement. In A.H. Black & W.F. Prokasy (Eds.), Classical Conditioning II: Current Research and Theory (pp. 64-99). New York: Appleton-Century-Crofts.

Wagner, A.R., & Rescorla, R.A. (1972). Inhibition in Pavlovian conditioning: Application of a theory. In R.A. Boakes & M.S. Halliday (Eds.), Inhibition and Learning (pp. 301-336). New York: Academic Pre

Page 22: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run

CAL Simulation Guides

ISSN 2054-2747

Page 23: CAL Simulation Guides€¦ · Introduction ... Android and provides a quick introduction for installing and using the application on an Android based device. The application can run