TutorLoom
The learning platform for companies, colleges and training institutes. Free and open source, with an Enterprise edition.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Learn complexity science by playing: all 12 chapters of Think Complexity as interactive 3D voxel worlds.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Learn complexity science by playing with it, then by coding it. All 12 chapters of Allen B. Downey's Think Complexity (2nd edition), rebuilt as interactive 3D voxel worlds. You move the households, host the party, drill the rock and drop the sand yourself, and only then does the computer run the model.
Live: https://voxel-network-lab.vercel.app · Code tracks: /code (Think Complexity), /modsim (Modeling and Simulation in Python), /build (Build your own X) and /stats (Probability & Stats)
Reading about emergence is not the same as watching it happen. Most textbook figures are a single frame of a moving system, and most explanations ask you to trust a conclusion you never checked yourself.
This lab is built around a different loop:
| # | World | Chapter idea | What you do |
|---|---|---|---|
| 1 | City | Complexity science, Schelling's segregation model | Inspect neighbourhoods, move unhappy households by hand, then test how a mild preference splits a city |
| 2 | Party | Random graphs (Erdős–Rényi), connectivity | Link 12 guests by hand, compare with random chatting, find the tipping point p* = ln(n)/n |
| 3 | Village | Small-world graphs (Watts–Strogatz), BFS | Send a letter around a lake, then place one shortcut to get it there in 8 hand-offs or fewer |
| 4 | Town | Scale-free networks (Barabási–Albert) | Join as a newcomer, draw lottery tickets, watch hubs grow, test growth without popularity |
| 5 | Automata | 1-D cellular automata, Wolfram's classes | Predict the next row by hand, write your own rule table, sort rules 0/18/30/110 into classes |
| 6 | Life | Conway's Game of Life | Predict births and deaths, build a glider, fire the glider gun that disproved Conway's conjecture |
| 7 | Rock & ink | Percolation, fractals, reaction–diffusion | Drill through rock, find the critical porosity (≈ 0.593), measure a fractal dimension, grow Turing spots |
| 8 | Sand | Self-organized criticality | Trigger avalanches by hand, collect 3,000 of them, watch the pile tune itself, pour a fractal mandala |
| 9 | Sugar | Agent-based models (Sugarscape) | Survive as one agent, watch inequality emerge, try a tax, see migration waves move diagonally |
| 10 | Traffic | Traffic jams and Boids | Tap your brakes to start a backward-moving jam, design a better driver, steer a flock |
| 11 | Evolution | Fitness landscapes, selection, mutation | Switch the ingredients of evolution on and off, change the environment, watch a new species form |
| 12 | Cooperate | Prisoner's dilemma, evolution of cooperation |
Playing a world shows you what happens. The code tracks teach you to build it. There are four courses on one engine, with real Python running in the browser (Pyodide: numpy, networkx, matplotlib, scipy, pandas, sympy) and nothing to install:
| Track | Chapters | What you build |
|---|---|---|
| Think Complexity in code | 12 | all_pairs → Erdős–Rényi graphs, Watts–Strogatz and BFS, Barabási–Albert, rule tables and Rule 30, Life, percolation and Turing patterns, the sand pile, Schelling and Sugarscape, traffic and boids, evolution, the prisoner's dilemma |
| Modeling & Simulation in Python | 26 | bike share, world population, SIR epidemics and interventions, coffee cooling, the glucose minimal model, falling pennies with drag, baseballs, toilet paper, turntables, bungee jumps |
| Build your own X | 29 | object modeling (an elevator), a calculator, a math engine, a programming language and bytecode VM, a regex engine, a key-value database, a tiny SQL database on a B-tree, git, a vim-style editor, a web framework, a 3D graphics engine, a physics engine, a neural-network framework, a CPU from logic gates, an operating system (scheduler and virtual memory), a garbage collector, a file compressor (Huffman), a search engine (inverted index and TF-IDF), reliable delivery (how TCP works), distributed consensus (Raft), a tiny GPT (attention), a blockchain (hashes and proof of work), a spreadsheet engine (dependency graphs), a ray tracer, a distributed cache (LRU and consistent hashing), a diff tool (LCS), a build system (like make), a package manager (version resolution), a test framework (like pytest) |
| Probability & Stats | 13 | chance and counting, conditional probability and Bayes, random variables, binomial and Poisson, the normal and the CLT, sampling bias, confidence intervals, hypothesis tests, regression, Bayesian inference, Markov chains and MCMC, an honest A/B test |
Every chapter opens with an interactive 3D simulation where each part explains why it was designed that way (click any block), and has a real-world project step: a brief, why it matters, milestones you tick off, and a graded exercise.
Every chapter is a step-by-step path. A step opens with the idea in plain words, then gives you a task; the next step unlocks when you finish it (or choose "skip for now"). The tasks climb a ladder designed so the material sticks:
Then, your code, running: when an exercise passes, its reveal uses your function to drive an animation or plot. The glider gun fires on your life_step, water seeps through rock with your percolates, a jam drives backward on your traffic step, and the bungee cord is designed by your lowest_point. Grids animate as flipbooks with play, pause and a scrubber.
Everything you finish joins a spaced-review deck (Leitner boxes: back after 1, 3, 7, 16 and 35 days), and exercises come back with a blank starter, not your old answer. XP, a daily streak and a chapter-complete screen show your progress. Each Think Complexity chapter links to its 3D world and back.
python3 tools/build.py --verify runs every block of every chapter in CPython before it ships:
Numbers quoted in lessons were checked against the run: the sand pile settles at an average height of about 2.08, Sugarscape keeps about 225 of 400 agents, cooperation evolves from all-defectors to about 0.56 niceness, a penny with drag lands at 18 m/s after about 22 s, and the Green Monster needs about 41 m/s. tools/e2e.js then walks every chapter in a real browser, step by step, solving every task.
Honest notes: the ModSim library is reimplemented as a short, readable learn/modsim.py with the book's function names but no Pint units. The glucose chapters use synthetic data generated from the minimal model, because the original dataset isn't bundled. The world population data are rounded Census estimates. Chapter 9's SymPy example runs in the browser but is skipped by the CPython verifier when SymPy isn't installed.
The simulations follow the models as the book describes them. Key numbers were checked by running the models headless before the stories were written:
| Check | Book | This lab |
|---|---|---|
| Sugarscape survivors after 100 steps (from 400) | ≈ 250 | ≈ 241 |
| Percolation critical porosity | ≈ 0.59 | jump between 0.55 and 0.65 |
| Fractal dimension of the percolating cluster | ≈ 1.85 | ≈ 1.87–1.89 |
| Sand pile average height in steady state | – | ≈ 2.07 |
| Traffic: 20 cars, no noise | all at speed 40 | 40.0 |
Where the stories quote a result, it is computed live from your own run. One honest caveat: the book's version 2.6.4 notes a bug in the original code for Chapter 12. This lab uses the corrected rule (fitter agents more likely to survive), so cooperation rises and collapses in waves, and your runs may differ from the figures in older copies of the book.
| Action | Mouse | Touch |
|---|---|---|
| Spin the world | drag | drag |
| Zoom | scroll | pinch |
| Interact | click a block | tap a block |
| Move the Boids' carrot | click the ground | tap the ground |
| Next / previous story step | → / ← | buttons |
The 3D lab is a single self-contained HTML file. The code tracks are static too; lessons are prebuilt into content/*.json.
git clone https://github.com/srivtx/voxel-network-lab.git
cd voxel-network-lab
python3 -m http.server # then open /, /code/, /modsim/, /build/ or /stats/
To edit lessons, change content/<track>/chNN.md (tc, ms, bx or ps) (format: content/FORMAT.md) and rebuild:
python3 tools/build.py --verify # build + check every block (needs numpy, scipy, networkx, pandas, matplotlib)
python3 tools/devserver.py 8000 # serve with a local CPython runner
open "http://localhost:8000/code/?runner=local"
node tools/e2e.js code 6 # walk a chapter in a real browser (Playwright)
index.html holds all the markup, styles and JavaScript (~270 KB).InstancedMesh of cubes, so tens of thousands of voxels stay smooth.localStorage; nothing is sent anywhere.voxel-network-lab/
├── index.html # the 3D lab
├── code/ modsim/ build/ stats/ # the four code-track pages
├── learn/
│ ├── engine.js/.css # lesson renderer: editor, exercises, steps, review, flipbooks, sims, projects
│ ├── viz/ # one 3D simulation per chapter (core.js is the shared API)
│ ├── py-worker.js # Pyodide in a Web Worker
│ ├── harness.py # runs code, captures output/plots/animations, grades tests
│ ├── modsim.py # readable ModSim library (book API)
│ └── complexity.py # small helpers for Think Complexity
├── content/
│ ├── tc/ ms/ bx/ ps/ # lessons, one Markdown file per chapter
│ └── *.json # built lessons
├── tools/ # build + verify, dev server, browser end-to-end test
├── docs/ # README screenshots
└── vercel.json
The code is released under the MIT License.
| Play mystery opponents, build a 7-gene strategy, evolve cooperation from pure defectors |