This directory contains two implementations addressing the "Pyramid scheme" issue:
A comprehensive demonstration of pyramid scheme structures using Scheme (Lisp dialect).
- Data Structures: Implements person records with recruits
- Hierarchical Operations: Functions to build and manipulate pyramid structures
- Statistical Analysis: Calculate pyramid size, depth, and level populations
- Financial Modeling: Demonstrates money flow in pyramid schemes
- Mathematical Proof: Shows the mathematical impossibility of sustained pyramid schemes
You can run this code with any Scheme interpreter (Racket, Guile, MIT Scheme, etc.):
# With Racket
racket pyramid_scheme.scm
# With Guile
guile pyramid_scheme.scm
# With MIT Scheme
mit-scheme --load pyramid_scheme.scmTo run the demonstration, uncomment the last line in the file:
(run-pyramid-demo)make-person: Create a person in the pyramidadd-recruit: Add a recruit to someone's downlinepyramid-size: Calculate total people in pyramidpyramid-depth: Calculate depth of hierarchydemonstrate-impossibility: Show mathematical unsustainability
A visual demonstration of pyramid structures using PsychoPy library.
- Visual Pyramid: Interactive 3D-style pyramid with blocks
- Animated Construction: Watch the pyramid being built level by level
- Statistical Display: Shows levels, total blocks, and growth metrics
- People Representation: Alternative view showing exponential growth of people
- Warning Messages: Educational warnings about pyramid scheme dangers
pip install psychopypython pyramid_visual.py- SPACE: Animate pyramid construction
- P: Switch to people/pyramid scheme view (from main view)
- B: Go back to pyramid view (from people view)
- ESC: Exit the program
-
Main Pyramid View:
- 5 levels of blocks with gradient colors
- Statistics panel showing metrics
- Level labels
- Animation on SPACE key
-
Pyramid Scheme People View:
- Circles representing people
- Shows exponential growth (1 → 3 → 9 → 27 → 81)
- Warning about unsustainability
- Level-by-level breakdown
Both implementations serve to:
- Demonstrate Structure: Show how pyramid/MLM schemes are organized
- Mathematical Analysis: Prove the inherent unsustainability
- Visual Learning: Help understand exponential growth problems
- Programming Examples: Showcase functional programming (Scheme) and visualization (PsychoPy)
NPD and Pyramid Schemes.md: Psychological analysis of NPD and pyramid schemesREADME.md: Main repository documentation
- Scheme Language: R5RS/R6RS Scheme specification
- PsychoPy: https://www.psychopy.org/
- Pyramid Schemes: Federal Trade Commission (FTC) resources
Educational and research use only. See main repository LICENSE file.