The Brain Signature of Reward Processing During Cooperative Gaming.
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: 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.1016/j.neuroimage.2026.122115 [code]
- Midfrontal theta power relates to response speeding following frustrative nonreward.Journal: NeuroImageIn common: EEG, cognitive, 4 references
- [2] doi:10.1038/s41598-026-58046-4 [code]
- Dissecting the interplay of model-based control, impulsivity and compulsivity on self-control in daily life.Journal: Scientific reportsIn common: EEG, cognitive, 4 references
- [3] doi:10.1016/j.isci.2026.116586 [code]
- Condition-specific neural signatures of reactivation during post-retrieval rest: An EEG study.Journal: iScienceIn common: FieldTrip, EEG, cognitive, 4 references
- [4] doi:10.1073/pnas.2528246123
- Protecting episodic memory after sleep loss: Similar benefits of exercise and naps via distinct neural contributions.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: EEG, cognitive, 4 references
- [5] doi:10.1016/j.isci.2026.116473
- Belief updating in uncertain environments is differentially sensitive to reward and punishment learning: Evidence from ERP.Journal: iScienceIn common: EEG, cognitive, 3 references
- [6] doi:10.1002/advs.77857 [code]
- Brain Network Dynamics of Local and Global Predictive Processing in Aging.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: FieldTrip, cognitive, 3 references
- [7] doi:10.1007/s00221-026-07365-z
- Effects of augmented feedback delay on neural correlates of feedback processing in motor practice.Journal: Experimental brain researchIn common: EEG, 3 references
- [8] doi:10.1371/journal.pbio.3003779 [code]
- Past and present goals are represented concurrently during visual search.Journal: PLoS biologyIn common: EEG, cognitive, 3 references
- [9] doi:10.1111/psyp.70303 [code]
- Misinterpreting Electrophysiology in Human Cognitive Neuroscience.Journal: PsychophysiologyIn common: EEG, cognitive, 3 references
- [10] doi:10.1371/journal.pbio.3003938 [code]
- Theta oscillations tag episodic memories for sleep-dependent consolidation.Journal: PLoS biologyIn common: FieldTrip, EEG, cognitive, 2 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:71aaee5d7dab7565…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
