Hide table of contents

See also: List of Tools for Collaborative Truth Seeking

Squiggle is a special-purpose programming language for generating probability distributions, estimates of variables over time, and similar tasks, with reasonable transparency. It was developed by the Quantified Uncertainty Research Institute

It's a broad tool applicable to a lot of tasks with probabilistic elements. It lies somewhere between Guesstimate and full probabilistic programming languages or Python (a good summary of squiggle's features can be found here or here). 

When can Squiggle be Useful?

  • Estimating Return on Investment from projects
  • Estimating probability of a project's success
  • Comparing impact of different career paths
  • Estimate the best time to run a retreat based on predicted COVID numbers
  • Find cruxes where two forecasters disagree by building full models of how they derived their beliefs
  • Give somebody a precise & detailed look at your internal model and assumptions on a topic

Tutorials

The official basics guide is a good written guide if you have experience programming and/or have a specific project in mind already. A video tutorial using a worked example is available here on loom, or below:

There’s also a few simple worked examples to demonstrate Squiggle’s value, and a more complex model based on GiveWell's cost effectiveness analyses. Note that Squiggle is still in development and has several known bugs. If you want to just play around with Squiggle, there's a web implementation for experimenting available here

Here's an example lifted directly from the official documentation of using Squiggle to estimate the number of piano tuners in NYC (a canonical fermi estimation question):

 Examples

 

Personal Experience

Squiggle is fairly easy to get started with if you've got any experience with programming (particularly statistical programming in R or python), and you get a lot of bang for your buck in terms of functionality vs ease of use.

Squiggle's main downside is that it's harder to understand[1] than similar tools like Guesstimate or Causal. This follows pretty naturally from being code-based, and can be mitigated in all the usual ways (suggestive variable names, thorough commenting, etc.), or by integrating it with google docs

With larger models the legibility issue becomes something of a problem. By default, Squiggle outputs a huge list of all outputs in the order they appear in the code. However, if the last line is a variable or object, Squiggle only shows that variable/object; you can use this to query models (see e.g. this model).

Overall, I'd tentatively recommend squiggle for medium-complexity models (say, taking less than 10 hours total to create) if you're already comfortable working with code, and don't anticipate sharing the model with a lot of people (or any people who are especially unfamiliar with code). If you have larger models, the QURI team are happy to be contacted-- squiggle can be useful for larger models, but needs to be set up with VSCode and some other tools. 

If you want simpler models that are easier to share with others, I'd recommend Guesstimate or Causal. If you want more complex models (and don't care about their shareability, or are willing to mitigate this with good documentation), I'd recommend using python or finding a suitable probabilistic programming language (making recommendations here is far beyond the scope of this guide). 

Try it Yourself!

Have a look through the examples above, and think about a forum post you read recently that could benefit from being more quantitative-- make a toy model of it! It should be very simple to start with to check your basic assumptions; you can always add detail later.

Want to make a model to practice, but don't know of what?

Try one of these! I think a Squiggle model could be really useful here.

  • Estimate impact of various factors on shrimp welfare (forum post)
  • Estimate impact of sound therapy for tinnitus (forum post)
  • Compare impact of different cause areas (forum post)

If those are a little intimidating, try these instead (click through to a guesstimate model for some inspiration on how to model the problem, if you like):

Join us at 6pm GMT tomorrow [31/01] for an event in the EA GatherTown discussing the use of squiggle & doing a short exercise with it!

Tomorrow's post will be on forecasting tools of various kinds!

 

Thanks to Ozzie Gooen for comments on the final draft.

  1. ^

    To yourself six months later, or to other people you're sharing your model with

Comments4


Sorted by Click to highlight new comments since:

There's also a version of Squiggle in python if you're more keen to use Python! https://github.com/rethinkpriorities/squigglepy

If you have larger models, the QURI team are happy to be contacted

Confirming this!

How much work would it be to make something like this as a python library, and how much would that reduce its usefulness? I think this is really cool and have been looking for something like this, but I am multiple times more likely to use something if it's a python library as opposed to a brand new language, and I assume others think similarly.

Curated and popular this week
 ·  · 16m read
 · 
At the last EAG Bay Area, I gave a workshop on navigating a difficult job market, which I repeated days ago at EAG London. A few people have asked for my notes and slides, so I’ve decided to share them here.  This is the slide deck I used.   Below is a low-effort loose transcript, minus the interactive bits (you can see these on the slides in the form of reflection and discussion prompts with a timer). In my opinion, some interactive elements were rushed because I stubbornly wanted to pack too much into the session. If you’re going to re-use them, I recommend you allow for more time than I did if you can (and if you can’t, I empathise with the struggle of making difficult trade-offs due to time constraints).  One of the benefits of written communication over spoken communication is that you can be very precise and comprehensive. I’m sorry that those benefits are wasted on this post. Ideally, I’d have turned my speaker notes from the session into a more nuanced written post that would include a hundred extra points that I wanted to make and caveats that I wanted to add. Unfortunately, I’m a busy person, and I’ve come to accept that such a post will never exist. So I’m sharing this instead as a MVP that I believe can still be valuable –certainly more valuable than nothing!  Introduction 80,000 Hours’ whole thing is asking: Have you considered using your career to have an impact? As an advisor, I now speak with lots of people who have indeed considered it and very much want it – they don't need persuading. What they need is help navigating a tough job market. I want to use this session to spread some messages I keep repeating in these calls and create common knowledge about the job landscape.  But first, a couple of caveats: 1. Oh my, I wonder if volunteering to run this session was a terrible idea. Giving advice to one person is difficult; giving advice to many people simultaneously is impossible. You all have different skill sets, are at different points in
 ·  · 47m read
 · 
Thank you to Arepo and Eli Lifland for looking over this article for errors.  I am sorry that this article is so long. Every time I thought I was done with it I ran into more issues with the model, and I wanted to be as thorough as I could. I’m not going to blame anyone for skimming parts of this article.  Note that the majority of this article was written before Eli’s updated model was released (the site was updated june 8th). His new model improves on some of my objections, but the majority still stand.   Introduction: AI 2027 is an article written by the “AI futures team”. The primary piece is a short story penned by Scott Alexander, depicting a month by month scenario of a near-future where AI becomes superintelligent in 2027,proceeding to automate the entire economy in only a year or two and then either kills us all or does not kill us all, depending on government policies.  What makes AI 2027 different from other similar short stories is that it is presented as a forecast based on rigorous modelling and data analysis from forecasting experts. It is accompanied by five appendices of “detailed research supporting these predictions” and a codebase for simulations. They state that “hundreds” of people reviewed the text, including AI expert Yoshua Bengio, although some of these reviewers only saw bits of it. The scenario in the short story is not the median forecast for any AI futures author, and none of the AI2027 authors actually believe that 2027 is the median year for a singularity to happen. But the argument they make is that 2027 is a plausible year, and they back it up with images of sophisticated looking modelling like the following: This combination of compelling short story and seemingly-rigorous research may have been the secret sauce that let the article to go viral and be treated as a serious project:To quote the authors themselves: It’s been a crazy few weeks here at the AI Futures Project. Almost a million people visited our webpage; 166,00
 ·  · 32m read
 · 
Authors: Joel McGuire (analysis, drafts) and Lily Ottinger (editing)  Formosa: Fulcrum of the Future? An invasion of Taiwan is uncomfortably likely and potentially catastrophic. We should research better ways to avoid it.   TLDR: I forecast that an invasion of Taiwan increases all the anthropogenic risks by ~1.5% (percentage points) of a catastrophe killing 10% or more of the population by 2100 (nuclear risk by 0.9%, AI + Biorisk by 0.6%). This would imply it constitutes a sizable share of the total catastrophic risk burden expected over the rest of this century by skilled and knowledgeable forecasters (8% of the total risk of 20% according to domain experts and 17% of the total risk of 9% according to superforecasters). I think this means that we should research ways to cost-effectively decrease the likelihood that China invades Taiwan. This could mean exploring the prospect of advocating that Taiwan increase its deterrence by investing in cheap but lethal weapons platforms like mines, first-person view drones, or signaling that mobilized reserves would resist an invasion. Disclaimer I read about and forecast on topics related to conflict as a hobby (4th out of 3,909 on the Metaculus Ukraine conflict forecasting competition, 73 out of 42,326 in general on Metaculus), but I claim no expertise on the topic. I probably spent something like ~40 hours on this over the course of a few months. Some of the numbers I use may be slightly outdated, but this is one of those things that if I kept fiddling with it I'd never publish it.  Acknowledgements: I heartily thank Lily Ottinger, Jeremy Garrison, Maggie Moss and my sister for providing valuable feedback on previous drafts. Part 0: Background The Chinese Civil War (1927–1949) ended with the victorious communists establishing the People's Republic of China (PRC) on the mainland. The defeated Kuomintang (KMT[1]) retreated to Taiwan in 1949 and formed the Republic of China (ROC). A dictatorship during the cold war, T