The Brain Signature of Reward Processing During Cooperative Gaming.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 249 lines · 10 KB · MIT
- %% Code to plot results from FieldTrip TFR cluster-based permutation analysis
- %
- % An alternative visualization for the results of FieldTrip cluster-based
- % permutation analysis on time-frequency data. The code avoids opacity alpha
- % masking by using custom color scales, smoothed by a gaussian filter.
- % Information about the cluster contribution of each individual sensor is
- % outsourced to a 2D sensor net layout with 4 graded point sizes obtained
- % by median splits.
- % Please indicate whether plotting negative (default) or positive clusters.
- % Also note that many plotting preferences can be customized using the handles
- % provided within the script.
- %
- % Requires:
- % - FieldTrip toolbox, freely available under https://www.fieldtriptoolbox.org/download/
- % - cbrewer2, freely available under https://de.mathworks.com/matlabcentral/fileexchange/58350-cbrewer2
- % - Colorspace Transformations, freely available under https://www.mathworks.com/matlabcentral/fileexchange/28790-colorspace-transformations
- % - sensor net layout of your EEG net (e.g., .sfp-file); must be compatible with FieldTrip
- % - output struct of cluster statistic from ft_freqstatistics in a .mat file
- %
- % Please ensure that your cluster statistics structure is named 'stat'.
- % If it has a different name, update it accordingly in the "load data"
- % section below.
- %
- % References
- % Getreuer, P. (2025). Colorspace Transformations (https://www.mathworks.com/matlabcentral/fileexchange/28790-colorspace-transformations), MATLAB Central File Exchange.
- % Lowe, S. (2025). cbrewer2 (https://github.com/scottclowe/cbrewer2), GitHub.
- % Oostenveld, R., Fries, P., Maris, E., Schoffelen, J.-M. (2011). FieldTrip: Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Computational Intelligence and Neuroscience, 2011, 156869, doi:10.1155/2011/156869.
- %
- % Karl-Philipp Floesch (2025), University of Konstanz
- % David Schubring (2021), University of Konstanz
- % 05/2025
- % [email hidden]
- %% set defaults
- restoredefaultpath
- % FOLDER PATH TO FIELDTRIP TOOLBOX
- opts.ftPath = 'XXXXXX';
- % FOLDER PATH TO cbrewer2
- opts.cbrewer2Path = 'XXXXXX';
- % FOLDER PATH TO Colorspace Transformations
- opts.colspacePath = 'XXXXXX';
- % FILE PATH TO NET LAYOUT (must be compatible with FieldTrip)
- opts.netLayout = 'XXXXXX';
- % FILE PATH TO CLUSTER DATA (.mat)
- opts.dataPath = 'XXXXXX';
- addpath(opts.cbrewer2Path)
- addpath(opts.colspacePath)
- addpath(opts.ftPath)
- ft_defaults
- %% load data
- inLoad = load(opts.dataPath);
- clusterStat = inLoad.stat; % name of cluster statistics struct
- clear inLoad
- %% PLEASE SET PLOTTING PARAMETERS
- plotcfg.negPosClust = 'neg'; % plot negative ('neg') or positive cluster ('pos')
- plotcfg.Tstat = 'mean'; % plot mean ('mean) or summed ('sum') cluster t-value
- plotcfg.Tscale = 3; % min/max absolute t-value on color scale; depends on chosen Tstat, e.g. 3 for 'mean' and 1000 for 'sum'
- plotcfg.ClusterNo = 1; % which cluster to plot; you can also choose multiple, e.g. [1 2]
- plotcfg.yscale = 'lin'; % linear ('lin') or log ('log') scale of y axis
- plotcfg.highlightSize = 28; % point size for highlighting significant cluster sensors
- % It is strongly recommended to always plot and interpret the whole
- % cluster, but you can also specify time and frequency ranges for
- % plotting.
- plotcfg.time = []; % in seconds, e.g. [.5 1.2]
- plotcfg.freq = []; % in Hz, e.g. [8 20]
- %% PLOT
- figure('units','normalized','outerposition',[0 0 1 1])
- tiledlayout(3,4,"TileSpacing","compact")
- % t-statistic freq x time, aggregated over sensors
- nexttile([3 3])
- clusterPlot = clusterStat;
- % select time and frequency range
- if ~isempty(plotcfg.time)
- cfg = [];
- cfg.latency = plotcfg.time;
- clusterPlot = ft_selectdata(cfg,clusterPlot);
- end
- if ~isempty(plotcfg.freq)
- cfg = [];
- cfg.frequency = plotcfg.freq;
- clusterPlot = ft_selectdata(cfg,clusterPlot);
- end
- dataMat = clusterPlot.stat;
- % select significant data points from cluster
- if strcmp(plotcfg.negPosClust,'neg') % negative cluster
- clusterPlot.negclusterslabelmat(~ismember(clusterPlot.negclusterslabelmat,plotcfg.ClusterNo)) = 0;
- clusterPlot.negclusterslabelmat(ismember(clusterPlot.negclusterslabelmat,plotcfg.ClusterNo)) = 1;
- [ClustChans,~,~] = find(clusterPlot.negclusterslabelmat == 1);
- dataMat(clusterPlot.negclusterslabelmat == 0) = NaN;
- % get sensor contributions
- statChan = find(any(clusterPlot.negclusterslabelmat,2:3));
- statChanCount = sum(clusterPlot.negclusterslabelmat(statChan,:),2);
- elseif strcmp(plotcfg.negPosClust,'pos') % positive cluster
- clusterPlot.posclusterslabelmat(~ismember(clusterPlot.posclusterslabelmat,plotcfg.ClusterNo)) = 0;
- clusterPlot.posclusterslabelmat(ismember(clusterPlot.posclusterslabelmat,plotcfg.ClusterNo)) = 1;
- [ClustChans,~,~] = find(clusterPlot.posclusterslabelmat == 1);
- dataMat(clusterPlot.posclusterslabelmat == 0) = NaN;
- % get sensor contributions
- statChan = find(any(clusterPlot.posclusterslabelmat,2:3));
- statChanCount = sum(clusterPlot.posclusterslabelmat(statChan,:),2);
- end
- if strcmp(plotcfg.Tstat, 'mean')
- % standardize cluster t-value by dividing sum of t-values by number of
- % significant sensors
- dataMat = squeeze(sum(permute(dataMat(unique(ClustChans),:,:),[1 3 2]),1,"omitnan"))./length(unique(ClustChans));
- barlabel = 'standardized cluster t-value';
- elseif strcmp(plotcfg.Tstat, 'sum')
- % use sum of t-values
- dataMat = squeeze(sum(permute(dataMat(unique(ClustChans),:,:),[1 3 2]),1,"omitnan"));
- barlabel = 'summed cluster t-value';
- end
- idx = find(dataMat == 0); % find non-significant data points
- % smooth data with gaussian filter
- dataMat = smoothdata2(dataMat,"gaussian");
- % remove non-significant points
- dataMat(idx) = 0;
- % make color scale
- ncol = 1000;
- if strcmp(plotcfg.negPosClust,'neg')
- dataMat(dataMat >= 0) = NaN;
- colmap = jet(ncol); colVec = [20 100];
- colormap(colmap(floor(colVec(1)/256*ncol):ceil(colVec(2)/256*ncol),:));
- elseif strcmp(plotcfg.negPosClust,'pos')
- dataMat(dataMat <= 0) = NaN;
- colmap = cbrewer2('OrRd',ncol); colVec = [1 256];
- colormap(colmap(floor(colVec(1)/256*ncol):ceil(colVec(2)/256*ncol),:));
- end
- % plot
- contourf(clusterPlot.time*1000,clusterPlot.freq,dataMat',40,'linecolor','none','edgecolor','none')
- set(gcf,'color','w')
- % color bar
- hc = colorbar;
- if strcmp(plotcfg.negPosClust,'neg')
- set(hc,"Limits",[-plotcfg.Tscale 0])
- clim([-plotcfg.Tscale 0])
- elseif strcmp(plotcfg.negPosClust,'pos')
- set(hc,"Limits",[0 plotcfg.Tscale])
- clim([0 plotcfg.Tscale])
- end
- set(hc, 'FontSize', 24)
- hc.Label.String = barlabel;
- % axes
- ax = gca;
- set(ax,'xcolor',[.15 .15 .15],'ycolor',[.15 .15 .15])
- ax.LineWidth = 2;
- ax.FontSize = 30;
- ax.FontName = 'Helvetica';
- ax.FontWeight = 'bold';
- ax.YLabel.Visible = 'on';
- ax.XLabel.Visible = 'on';
- % ax.XTickLabel(1:2:length(ax.XTickLabel)-1) = {''}; % remove labels every X steps
- if strcmp(plotcfg.yscale,'log'); yscale log; end
- xlh = xlabel ('Time (ms)','FontSize',30, 'FontWeight','bold','FontName','Helvetica','Color',[.15 .15 .15]);
- ylh = ylabel('Frequency (Hz)','FontSize',30, 'FontWeight','bold','FontName','Helvetica','Color',[.15 .15 .15]);
- title('Time x Frequency, aggregated over cluster sensors','FontSize',30)
- % graded point size using median splits
- MedianSplit = median(statChanCount);
- statChanLow = statChanCount <= MedianSplit;
- statChanHigh = statChanCount > MedianSplit;
- MedianSplitLow = median(statChanCount(statChanLow));
- statChanLow1 = statChan(statChanCount <= MedianSplitLow);
- statChanLow2 = statChan(statChanCount > MedianSplitLow & statChanCount <= MedianSplit);
- MedianSplitHigh = median(statChanCount(statChanHigh));
- statChanHigh1 = statChan(statChanCount <= MedianSplitHigh & statChanCount > MedianSplit);
- statChanHigh2 = statChan(statChanCount > MedianSplitHigh);
- stepstatChanLow1 = statChanLow1(ismember(statChanLow1,statChan));
- stepstatChanLow2 = statChanLow2(ismember(statChanLow2,statChan));
- stepstatChanHigh1 = statChanHigh1(ismember(statChanHigh1,statChan));
- stepstatChanHigh2 = statChanHigh2(ismember(statChanHigh2,statChan));
- if isempty(stepstatChanHigh1)
- stepstatChanHigh1 = stepstatChanLow2;
- end
- if isempty(stepstatChanHigh2)
- stepstatChanHigh2 = stepstatChanHigh1;
- end
- % plot sensor contribution on sensor net layout
- nexttile(8)
- title('Sensor contributions','FontSize',24)
- cfg = [];
- cfg.layout = opts.netLayout;
- cfg.figure = 'gcf';
- cfg.comment = 'no';
- plotLayout = ft_prepare_layout(cfg);
- opts.plotchans = find(ismember(plotLayout.label,clusterPlot.label)); % exclude channels not present in cluster statistics struct
- stepstatChanHigh2 = find(ismember(plotLayout.label,clusterPlot.label(stepstatChanHigh2))); % find highlighted channel labels in imported net layout
- stepstatChanHigh1 = find(ismember(plotLayout.label,clusterPlot.label(stepstatChanHigh1)));
- stepstatChanLow2 = find(ismember(plotLayout.label,clusterPlot.label(stepstatChanLow2)));
- stepstatChanLow1 = find(ismember(plotLayout.label,clusterPlot.label(stepstatChanLow1)));
- % plot stack of layouts
- ft_plot_layout(plotLayout,'chanindx',opts.plotchans,'label','no','box','no','pointsymbol','o','pointcolor','k','pointsize',4)
- ft_plot_layout(plotLayout,'chanindx',stepstatChanHigh2,'label','no','box','no','pointsymbol','.','pointcolor','k','pointsize',plotcfg.highlightSize)
- ft_plot_layout(plotLayout,'chanindx',stepstatChanHigh1,'label','no','box','no','pointsymbol','.','pointcolor','k','pointsize',plotcfg.highlightSize/1.5)
- ft_plot_layout(plotLayout,'chanindx',stepstatChanLow2,'label','no','box','no','pointsymbol','.','pointcolor','k','pointsize',plotcfg.highlightSize/2)
- ft_plot_layout(plotLayout,'chanindx',stepstatChanLow1,'label','no','box','no','pointsymbol','.','pointcolor','k','pointsize',plotcfg.highlightSize/2.25)
niceTFRplot.m at commit db346ac, under MIT · at the source
Overview
- Department of Psychology, University of Konstanz, Konstanz, Germany
- Centre for the Advanced Study of Collective Behaviour, University of Konstanz, Konstanz, Germany
- Department of Psychology, Catholic University of Eichstätt‐Ingolstadt, Eichstätt, Germany
Abstract
Human cooperation depends on shared goals and dynamic role‐taking, aligning individual actions with goal‐related tasks. However, in everyday social interactions, cooperation is often intertwined with personal goals and motivations. In this study, 48 young, healthy participants played the dyadic Pacman Game that incorporated a personal gamble to reflect these social dynamics. Brain oscillations and event‐related potentials differentiated between achieving a shared goal enhanced by personal rewards and reaching a shared goal without a personal reward. Specifically, personal rewards, which had to be inferred from social cues rather than explicit feedback, were linked to increased delta/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
kpm-floesch/niceTFRplot
db346ac6049047709a01960d5bc9db40db4d7c0e, 30 July 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
3 files
- niceTFRplot.m, MATLAB, 249 lines
- LICENSE, License, 21 lines
- README.md, Text, 18 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data Availability Statement
The aggregated data and analysis scripts necessary to reproduce the findings of this study are available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Publisher: n/a → Wiley
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 6 keywords, 13 MeSH terms, 1 funder, 62 references.
Cite
This paper
Flösch, K., Flaisch, T., Steinhauser, M., & Schupp, H. T. (2026). The Brain Signature of Reward Processing During Cooperative Gaming. Psychophysiology, 63(7), e70341. https://
BibTeX
@article{flosch2026brain
author = {Flösch, Karl‐Philipp and Flaisch, Tobias and Steinhauser, Marco and Schupp, Harald T},
title = {{The Brain Signature of Reward Processing During Cooperative Gaming}},
journal = {Psychophysiology},
year = {2026},
month = jul,
volume = {63},
number = {7},
pages = {e70341},
publisher = {Wiley},
issn = {0048-5772},
doi = {10.1111/
url = {https://
pmid = {42521328},
pmcid = {PMC13413252}
}
RIS
TY - JOUR
AU - Flösch, Karl‐Philipp
AU - Flaisch, Tobias
AU - Steinhauser, Marco
AU - Schupp, Harald T
TI - The Brain Signature of Reward Processing During Cooperative Gaming
T2 - Psychophysiology
J2 - Psychophysiology
PY - 2026
DA - 2026/
VL - 63
IS - 7
SP - e70341
SN - 0048-5772
PB - Wiley
DO - 10.1111/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1111/
"type": "article-journal",
"title": "The Brain Signature of Reward Processing During Cooperative Gaming",
"container-title": "Psychophysiology",
"author": [
{
"family": "Flösch",
"given": "Karl‐Philipp"
},
{
"family": "Flaisch",
"given": "Tobias"
},
{
"family": "Steinhauser",
"given": "Marco"
},
{
"family": "Schupp",
"given": "Harald T"
}
],
"container-title-short":
"volume": "63",
"issue": "7",
"page": "e70341",
"DOI": "10.1111/
"PMID": "42521328",
"PMCID": "PMC13413252",
"ISSN": "0048-5772",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.3758/s13415-025-01284-2
- The impact of emotional feedback in learning easy and difficult tasks - an ERP study.Journal: Cognitive, affective & behavioral neuroscienceIn common: EEG, cognitive, 7 references
- [2] doi:10.1038/s41598-024-60328-8 [code]
- Prediction-error-depende
nt processing of immediate and delayed positive feedback. Journal: Scientific reportsIn common: EEG, cognitive, 6 references - [3] doi:10.1002/hbm.70466 [code]
- Parsing Reward Processing Substages With Multimodal EEG-fMRI.Journal: Human brain mappingIn common: EEG, cognitive, 6 references
- [4] doi:10.1002/hbm.26398 [code]
- Neural dissociation between reward and salience prediction errors through the lens of optimistic bias.Journal: Human brain mappingIn common: EEG, cognitive, 6 references
- [5] doi:10.1093/scan/nsag029 [code]
- Time and amount attributes exert distinct neural influences on gain and loss evaluation.Journal: Social cognitive and affective neuroscienceIn common: EEG, 6 references
- [6] doi:10.1111/psyp.70142 [code]
- Altered Reward Processing in Obsessive-Compulsive Disorder: Insights From Active and Observational Learning.Journal: PsychophysiologyIn common: EEG, cognitive, 6 references
- [7] doi:10.1016/j.isci.2022.104302 [code]
- Dynamic modulation of neural feedback processing and attention during spatial probabilistic learning.Journal: iScienceIn common: cognitive, 7 references
- [8] doi:10.1371/journal.pone.0277663 [code]
- Effects of subjective and objective task difficulties for feedback- related brain potentials in social situations: An electroencephalogram study.Journal: PloS oneIn common: EEG, cognitive, 5 references
- [9] doi:10.1038/s41598-024-58031-9 [code]
- Machine learning reveals differential effects of depression and anxiety on reward and punishment processing.Journal: Scientific reportsIn common: EEG, cognitive, 5 references
- [10] doi:10.1038/s41467-025-63135-5 [code]
- Separable neural signals for reward and emotion prediction errors.Journal: Nature communicationsIn common: EEG, cognitive, 5 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:72ad2572de6878c8…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1111/psyp.70341)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1111/psyp.70341.svg
:target: https://openscicode.org/badge/doi/10.1111/psyp.70341
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1111/psyp.70341"><img src="https://openscicode.org/badge/doi/10.1111/psyp.70341.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
