SUPPLEMENTARY REPLICATION CODE
==============================

Manuscript: "When Does Network Restructuring Improve Organizational Search?
A Computational Study of Dynamic Influence Networks on NK Landscapes"

This package allows full replication of the simulation experiment and of every
statistic reported in the manuscript.

CONTENTS
--------
1. README.txt                  - this file
2. Replication_Experiment.py   - self-contained simulation code: the NK landscape
                                 engine, agents, the four restructuring rules,
                                 and the full 6,000-run experiment
                                 (6 K levels x 5 conditions x 4 network
                                 structures x 50 replications)
3. Replication_Analysis.py     - statistical analysis and figures: reproduces
                                 Table 3 (Panels A/B/C), Table 4 (ANOVA),
                                 Table 5 (Tukey HSD), the Appendix A descriptive
                                 statistics, all assumption checks (Shapiro-Wilk,
                                 Levene, Kruskal-Wallis, Mann-Whitney), the
                                 Holm-corrected pairwise tests, the two-way
                                 ANOVA, and Figures 1-5
4. full_experiment_6000.csv    - the exact run-level dataset generated by the
                                 experiment and used for all results in the
                                 manuscript (6,000 rows x 16 variables)

REQUIREMENTS
------------
Python 3.8 or later. Libraries:

    pip install numpy pandas scipy statsmodels matplotlib

The code is platform-independent (tested on Linux and Google Colab).

HOW TO RUN
----------
Option A - Verify the reported statistics (about 2 minutes):
    Place Replication_Analysis.py and full_experiment_6000.csv in the same
    folder, then run:

        python Replication_Analysis.py

    This reproduces every number, table, and figure in the manuscript from
    the exact dataset.

Option B - Full replication including the simulation (about 20-30 minutes on
a standard laptop; roughly 30 minutes on Google Colab):

        python Replication_Experiment.py

    This regenerates the dataset (full_experiment_6000.csv) and summary
    statistics, after which Replication_Analysis.py can be run as in Option A.

Google Colab: upload this package to the Colab file browser, then run in a
code cell:

    !pip install numpy pandas scipy statsmodels matplotlib
    !unzip -o Supplementary_Replication_Code.zip
    !python Replication_Experiment.py     # optional full rerun (~30 min)
    !python Replication_Analysis.py

REPRODUCIBILITY NOTES
---------------------
- All random draws derive from per-run seeds, so every run is internally
  deterministic.
- Because the seed schedule uses Python's built-in hash() function, which is
  randomized between processes by default, re-running the experiment
  produces a statistically equivalent dataset rather than a bit-identical
  one. Differences between a fresh run and the shipped dataset are within
  Monte Carlo sampling error; all conclusions are unchanged. The shipped
  full_experiment_6000.csv is the exact dataset behind every number in the
  manuscript, so Option A reproduces the reported results exactly.
- Analysis outputs are written to ./analysis_output/ (five figures at
  300 dpi and the Appendix A table as CSV).

MAPPING TO THE MANUSCRIPT
-------------------------
- Table 3, Panel A (best fitness M/SD)        -> printed section "TABLE 3, PANEL A"
- Table 3, Panel B (differences, CI, d)       -> printed section "TABLE 3, PANEL B"
- Table 3, Panel C (discovery rates)          -> printed section "TABLE 3, PANEL C"
- Table 4 (one-way ANOVA per K)              -> printed section "TABLE 4"
- Table 5 (Tukey HSD at K = 11)               -> printed section "TABLE 5"
- Section 4.3 statistics (t-tests, Holm,
  Shapiro-Wilk, Levene, Kruskal-Wallis,
  Mann-Whitney, two-way ANOVA)               -> corresponding printed sections
- Section 4.4 sub-condition analyses         -> printed sections "SUB-CONDITION" /
                                                  "DESIGNER vs STATIC ... by structure"
- Appendix A / Table A1                       -> analysis_output/Appendix_A_table.csv
- Figures 1-5                                 -> analysis_output/figure_1..5.png

CODE AVAILABILITY STATEMENT (for the manuscript)
-------------------------------------------------
"The simulation code (Python 3; NumPy, SciPy, pandas, statsmodels,
matplotlib) is platform-independent and available at [repository link]."
