Designing user interfaces in notebooks
While REPL environments offer quick feedback, the user experience derived from text-based user interfaces imposes some constraints. Another benefit of interactive notebooks is that the community and the market have developed libraries that extend the rendering capabilities to support not only code with kernels, or static hypertext through markup languages, but also charts and interactive non-blocking user interfaces.
We set up and run our simulation by creating a class to initialize the HADES engine with the agents and context variables we desire for our simulation. This class also holds the information we will later use to analyze the results. The code is straightforward:
class SimRunner:
def init(self, num_agents: int, num_years: int, ai_model:str = "qwen3.4b"):
self.total_agents = num_agents
self.years = num_years
self.ai_model = ai_model
self.hades = Hades()
self.initialize()
...