cadCAD: Filling a Critical Gap in Open-Source Data Science

Published in
6 min readJun 12, 2019


By Michael Zargham and Jonathan Gabler

Update: We are now open-source! During TEGG in Berlin in August 2019, we made the announcement to make cadCAD an open-source project. Join our community at and

Automation is a holy grail of our current technological age. From the transfer of repetitive tasks to machines, to intelligent systems integrating technology, data, and people, automation is fundamentally transforming how we operate and what we can achieve as a society.

Building these automation systems, especially those directly involving human interaction (called ‘cyber-physical systems’; think blockchain economies, global supply chains, or multi-sided online platforms) is a tremendous challenge, as recent examples of automation gone horribly wrong strikingly demonstrate. It is often assumed that business logic — the ‘why’ of some automation project — and physical engineering know-how will be sufficient to handle all contingencies. But an automated system involving humans typically behaves in ways designers don’t expect.

If you have read our recent article “Introducing Complex Adaptive Dynamics Computer-Aided Design (cadCAD)”, you already know that we have created the cadCAD modeling framework and scientific computing library to enable safer, better designs of complex, adaptive systems, and faster system iteration cycles required for business decision makers (“pilots”, remember?).

In this article, we take a deeper look at the two pillars of cadCAD’s value proposition, explain why it fills a critical gap in open-source data science, and exemplify several cadCAD use cases.

cadCAD offers engineers flexibility to describe complex systems at any level of abstraction

All models make some aspects of a system clearer at the cost of obscuring others. A trained engineer is adept at identifying the salient features of a system for practical decision-making and allowing less important features to blur into the background. Many modeling platforms take that freedom away from engineers, forcing them into a modeling paradigm that may not work. cadCAD is capable of modeling systems with multiple levels of abstraction from micro-level Agent-Based Modeling (ABM) to macro-level System Dynamics (SD), supporting discrete, continuous, and hybrid dynamic behavior. This becomes invaluable when integrating cyber-physical systems with socio-economic systems and financial models of value networks. We can start with simple models and progressively build them into more complex models while keeping documentation of explicit assumptions in all dimensions and layers.

cadCAD can simulate any system that can be formally characterized as a generalized differential equation or differential game (see Figure 1).

Figure 1: Template for modeling event-driven differential games with complex dynamics such as hidden states, private utilities, private signals and uncertainty

In this modeling framework, systems are treated as state-based models and defined through a set of endogenous and exogenous state variables which are updated through mechanisms and environmental processes, respectively. Behavioral models, which may be deterministic or stochastic, agent level or population level, provide the impetus for the evolution of the system, constrained only by the legal action space of the mechanisms. Blockchain-enabled economic systems, for example, are mapped into this formal modeling framework in an academic paper published in the proceedings of the International Conference on Complex Systems.

In the real world, uncertainty and adversarial behavior create unintended consequences that compound uncertainty over time. A well-engineered system design not only drives the system toward a desired outcome, but also keeps a tight envelope of certainty around that outcome. Computer-aided design is required to identify and validate the respective mechanism and policy designs, because the testing procedures typically require a large number of repeated experiments. The cadCAD modeling framework and simulation engine are designed to handle these experiments at any level of system abstraction.

cadCAD seamlessly integrates with open-source data science computing stack and enables continuous improvement with real-world feedback

cadCAD is built as part of the scientific Python ecosystem. Python is the programming language used by most data scientists globally and provides extensive scientific computation and visualization libraries. By adding generalized dynamical systems and event-based differential games modeling to the open-source scientific Python stack, cadCAD unlocks powerful network effects for system designers.

Imagine taking the results from a simulation or experiment and immediately being able to check for anomalies using a k-means unsupervised machine learning model from ScikitLearn; or using TensorFlow to train a recurrent neural network (RNN) to control the behavior of an agent in the same simulation you just ran; or using NetworkX to manage a network formation game whose state is a growing number of agent nodes with time varying edges (see Figure 2). The possibilities are endless.

Figure 2: Illustration of a popular cadCAD toy model showing multiple agents with individual personas (fair, greedy, giving) compete for marbles, visualized using the open-source NetworkX library for studying graphs and networks (click here for a dynamic illustration)

Once we deploy system models and collect data from real-world systems (humans, hardware, software), cadCAD’s Python implementation becomes vital. It allows us to build feedback and data pipelines from the real world to a model and simulation in cadCAD. It enables us to manage the continuous integration and deployment of simulated and tested improvements not just to the complex systems themselves but also to our models, including version control. This way, cadCAD allows models themselves to evolve as our understanding of them deepens.

cadCAD is already at work

cadCAD has saved our research and client services teams months of engineering time and augmented our ability to design and validate complex systems by orders of magnitude. Some of the DLT space’s most sophisticated system engineers have joined the cadCAD private beta program, and several notable projects are currently building dynamical systems models using the tool, among them:

  • The Commons Stack project spear-headed by the team is making heavy use of cadCAD to design and validate the various system components of their digital infrastructure for commons-based peer production;
  • Protea and Molecule are using cadCAD to model risk and reward thresholds for users of their system, the system’s resilience to instability, and to protect users against black swan type events;
  • The Professorship for Computational Sciences at ETH Zurich is modeling a new multi-dimensional socio-ecological finance system fostering sustainable behavior (Finance 4.0);
  • The team at Freeelio is using cadCAD to model cyber-physical systems of clean energy access, to optimize for impact along social, environmental and economic returns given a subscriber’s risk/reward preferences, and to create a multidimensional financial model to determine the governance and token model of the funding and deployment network for solar smart microgrids across the globe (multi-sided market model);
  • Clovers is using cadCAD to model their in-game economy and to test fundamental assumptions about the bonding curve reward mechanism

For a glimpse of cadCAD in action, check out this video.

cadCAD has a vibrant network of beta users

If you are a system engineer, data scientist, and/or academic interested in getting early access to the software, you can apply to our closed beta program here. It includes access to a private cadCAD Telegram community of currently 50+ hand-picked beta users, in which the BlockScience team regularly shares tutorials and supports users on their journey to mastering cadCAD. We very much appreciate any user feedback, which will help guide decisions regarding documentation, tutorials and future features.

For general inquiries about cadCAD, feel free to send us an email at cadCAD[at]

About BlockScience

BlockScience is a research and engineering firm specialized in the creation of digital twins of complex adaptive systems, enabling deep insight into their interdependencies to discover ways to determine and avoid the conditions and thresholds for systemic failure. Follow us on Medium or Twitter to stay in touch. If your project requires professional system design support, drop us a line at media[at]




BlockScience® is a complex systems engineering firm that combines research and engineering to design safe and resilient socio-technical systems.