diceomatic is a Python library that lets you define custom math equation generators using a DSL with constraints. Created to power children's dice-based simulation games, it lets you specify equation forms (e.g., A*B + C*D), variable domains, and constraints (like crossing a 10 boundary), then generates an infinite stream of valid equations. It can be integrated with Streamlit to build interactive apps that display questions and check answers, with optional adaptive difficulty.

5m read timeFrom robertheaton.com
Post cover image
Table of contents
diceomaticAdvanced usageTry it yourselfLinks

Sort: