Police Officer's Dilemma/First Person Shooter Task


You might be familiar with the task if not it can previewed here http://psych.colorado.edu/~jclab/FPST.html

I’m looking to incorporate this task into a study I’m doing but I need to change the procedure. Unfortunately the task is made in E-Prime which I don’t have access to. Is anyone aware of any existing versions of this (or similar tasks) that have been built/coded in PsychoPy?



Hi @CEKinch, I am not aware of any versions of this task. You could search on Pavlovia.org for online versions. However, it does not look like a difficult task to build using PsychoPy. You will:

  • Present an image using Image component
  • Collect response from keyboard (not shoot vs shoot)

For PsychoPy fundamentals, it is worth going through the PsychoPy Stroop tutorial, to learn how to use conditions files and loops to change your stimuli and correct answers for each trial.

Hi @CEKinch

I just found this thread asking myself the exact same question as you did a while back. I am also planning to run a study with the FPST but do not have access to E-Prime. I was wondering if you found a PsychoPy version or eventually programmed one yourself? None seems to exist on Pavlovia so far.

All the best,

Hi Massimo,

The programming required for this task is minimal. What is needed is a database of suitable photos, and a spreadsheet containing the photo filenames and correct answers (plus any other variables of note related to the photos).

Best wishes,


Hi Wakefield,

Thanks for the quick reply. I agree it should be fairly easy to program. I just thought I’d ask if someone had done it by now. I will program it in the coming weeks and make it available in case someone else might need it in the future.

Best regards,

Hello, @massimo,
I am looking for a version of the POD/FPST and do not know much about programming (I am learning it on the fly for this task). However, I have access to the images that were used on the original task and the extended, 100-photo task. If you like, I can send it to you, and I will be really relieved once you release the task!
Best Regards,

1 Like

Hi Alvala,
Thansk for offering to share the pictures, I found them already from the official website of the paradigm as well. I will let you know once I managed to program the study.

1 Like

Something like this?


Currently set to a to shoot an armed person, u for unarmed and a third of the trials are blank.


I think it would be something like this, but the rate of blank backgrounds would be higher (at least 2 per trial). But that one looks awesome!!! I do not know how use Pavlovia. How can I get access to this task and run it in my computer, so that I can actually see the results?


Give me a day or two to improve my code and then I’ll turn it into a public demo you can copy.

1 Like

Wow Wakefield,

that was one hell of a quick programming effort - Thanks a lot! I am looking forward to have a look once the gitlab repository becomes available. It would be nice if the program allows for a number of preferences either using an excel sheet or a dictionary in a code component (that is how I usually do it). For the use of the task in studies it would be for example useful if one can set the points awarded/substracted depending on the type of responses (standard used in the paradigm in brackets): a) shooting an armed person (+10), b) shooting an unarmed person (-20), c) not shooting an armed person (-40), d) not shooting an unarmed person (+5), e) responding too late (-20). In the original paradigm participants also receive feedback about these points depending on their responses. Another setting that could be nice to set centrally would be the response deadline (standard 850ms).
These are just suggestions to incooperate while you are working on the code. However this is also something I can add later on.

Best regards and thanks again!

1 Like

I think I’ve implemented most of these using the 2007 paper.
Ideally I’d like to make my demo version as close as possible to the original task, though if I used it myself I’d probably make it mobile compatible (pressing shoot and don’t shoot icons on the screen, though the images are quote small for a mobile device – a zoomed set might be required).

The new version is available to try at fpst100 [PsychoPy]

The code can be forked from VESPR / First-Person Shooter Task · GitLab

There are details of how to make your own copy here Searching for experiments on Pavlovia — PsychoPy v2021.2.4


Thank you so so so so much for all the work you’ve put into this! I am gonna check this out first thing tomorrow! Thanks again!

Hi, Mr. Wakefield, sorry to bother you again,

Once more, I would like to thank you for programming this experiment, you saved a desperate undergraduate. However, I have one question: how can I change the language of the on-screen instructions? You see, I plan to run my research in Brazil, and most people here are not really familiar with English as a foreign language. Therefore, could you point me where on the code can I change that? I am a beginner on programming, and I know just a little bit of python. However, I think I can change the specific set of instructions on the code.


The instructions are in text_instruct in the setup routine

The feedback messages are set in End Routine of code_2 in the trial routine.

The end of block messages are set in Begin Routine of code_gap in the gap routine.

You should make edits in Builder, not directly in Python or JS.

1 Like