Week 22 — Coding Projects

Core

Compare crude Monte Carlo to variance-reduced methods.

  • NumPy: Implement crude MC and importance sampling for one integral. Compare estimator variance across repeated runs.
  • Metal: Parallel weighted-sample evaluator with compute accumulation pipeline. · Reading: MBT — compute accumulation pipelines, random-sample workloads.
  • Vulkan: Compute accumulation of batched weighted estimates. · Reading: Vulkan Book — compute accumulation, batched weighted estimates.
  • CUDA: Importance sampling kernel with RNG/state layout. · Reading: CUDA Book — weighted Monte Carlo kernels, RNG/state layout.
  • Stretch: Use a rendering-inspired integrand. Try multiple proposal distributions.
  • Verify: Variance changes substantially with proposal choice · Bad proposal can hurt · Unbiasedness is preserved when implemented correctly.