EA - Announcing Squiggle: Early Access by Ozzie Gooen
The Nonlinear Library: EA Forum - En podkast av The Nonlinear Fund
Kategorier:
Link to original articleWelcome to The Nonlinear Library, where we use Text-to-Speech software to convert the best writing from the Rationalist and EA communities into audio. This is: Announcing Squiggle: Early Access, published by Ozzie Gooen on August 3, 2022 on The Effective Altruism Forum. Introduction Squiggle is a special-purpose programming language for probabilistic estimation. Think: "Guesstimate as a programming language." Squiggle is free and open-source. Our team has been using Squiggle for QURI estimations for the last few months and found it very helpful. The Future Fund recently began experimenting with Squiggle for estimating the value of different grants. Now we're ready for others publicly to begin experimenting with it. The core API should be fairly stable; we plan to add functionality but intend to limit breaking changes. We'll do our best to summarize Squiggle for a diverse audience. If any of this seems intimidating, note that Squiggle can be used in ways not much more advanced than Guesstimate. If it looks too simple, feel free to skim or read the docs directly. Work on Squiggle! We're looking to hire people to work on Squiggle for the main tooling. We're also interested in volunteers or collaborators for the ecosystem (get in touch!). Links Public Website, Github Repo, Previous LessWrong Sequence What Squiggle is and is not What Squiggle Is A simple programming language for doing math with probability distributions. An embeddable language that can be used in Javascript applications. This means you can use Squiggle directly in other websites. A tool to encode functions as forecasts that can be embedded in other applications. What Squiggle Is Not A complete replacement for enterprise Risk Analysis tools. (See Crystal Ball, @Risk, Lumina Analytica) A probabilistic programming language. Squiggle does not support Bayesian inference. (Confusingly, "Probabilistic Programming Language" really refers to this specific class of language and is distinct from "languages that allow for using probability.") A tool for substantial data analysis. (See programming languages like Python or Julia) A programming language for anything other than estimation. A visually-driven tool. (See Guesstimate and Causal) Strengths Simple and readable syntax, especially for dealing with probabilistic math. Fast for relatively small models. Useful for rapid prototyping. Optimized for using some numeric and symbolic approaches, not just Monte Carlo. Embeddable in Javascript. Free and open-source (MIT license). Weaknesses Limited scientific capabilities. Much slower than serious probabilistic programming languages on sizeable models. Can't do backward Bayesian inference. Essentially no support for libraries or modules (yet). Still very new, so a tiny ecosystem. Still very new, so there are likely math bugs. Generally not as easy to use as Guesstimate or Causal, especially for non-programmers. Example: Piano Tuners Note: Feel free to skim this section, it's just to give a quick sense of what the language is. Say you're estimating the number of piano tuners in New York City. You can build a simple model of this, like so. proportionOfPopulationWithPianos = (.002 to 0.01) // We assume there are almost no people with multiple pianos pianoTunersPerPiano = { pianosPerPianoTuner = 2k to 50k // This is artificially narrow, to help graphics later 1 / pianosPerPianoTuner } // This {} syntax is a block. Only the last line of it, "1 / pianosPerPianoTuner", is returned. totalTunersIn2022 = (populationOfNewYork2022 proportionOfPopulationWithPianos pianoTunersPerPiano) totalTunersIn2022 Now let's take this a bit further. Let's imagine that you think that NYC will rapidly grow over time, and you'd like to estimate the number of piano tuners for every point in time for the next few years. //Time in years after 2022 populationAtTime(t) = { averageYearlyPercentageChange = -0.01 to 0.05 // We're expecting NYC to continuously and rapidly grow. We model this as having a constant gr...
