Skip to content

MadcapJake/hacsim

Repository files navigation

Hîsyêô Apostolic Collective Simulation (HACSim)

HACSim is an Agent-Based Model (ABM) of a participatory economy, simulating the "Annual Planning Procedure" of the Hîsyêô Apostolic Collective. It demonstrates how a decentralized, non-market economy can achieve allocative efficiency and social consensus through iterative democratic negotiation.

The simulation uses Mesa for the agent logic and Solara for the interactive web dashboard.

🚀 Features

  • Participatory Planning: Simulates the negotiation between Worker Councils (Producers) and Primary Councils (Consumers/Residents) to agree on an annual production plan without markets or central planning.
  • Iterative Price Discovery: Uses an "Iteration Facilitation Board" (IFB) to adjust indicative prices based on excess demand until convergence (Walrasian Tâtonnement).
  • Ecological Limits: Sufferance Domains impose hard caps on pollution. Proposals that violate these caps are automatically vetoed.
  • Governance & Consensus (Phase 4):
    • Inefficiency Purge: Industry Federations reject the least efficient producers if the industry is unprofitable.
    • Anti-Gridlock: Agents automatically switch to a "Compromise Mode" (force-closing gaps) if the plan fails to converge after a set number of iterations.
  • Dynamic Economy Setup: Create custom Goods, Industries, Jobs, and Equipment recipes via the Dashboard.
  • Data Persistence: Export and Import your economy configurations via JSON (supports Server-Side Load).

🛠️ Installation

  1. Clone the repository.
  2. Install dependencies:
    pip install -r requirements.txt
    (Requires: mesa, solara, pandas, scipy, matplotlib)

▶️ How to Run

Start the dashboard server:

solara run src/dashboard.py

Open your browser to the URL shown (usually http://localhost:8765).

📂 Project Structure

  • src/dashboard.py: Main entry point. Defines the Solara UI and simulation loop.
  • src/model.py: The HisyeoModel class container for the simulation ecosystem.
  • src/agents/:
    • communicant.py: Consumer agents (maximize utility via Cobb-Douglas).
    • worker_council.py: Producer agents (maximize Social Benefit / Social Cost ratio).
    • primary_council.py: Aggregators for consumers.
    • ifb.py: The "Auctioneer" managing price adjustments and state transitions.
    • environment.py: Sufferance Domains handling pollution permits.
  • src/ontology.py: Definitions for Good, Equipment, PollutionType.

⚙️ Configuration

The Dashboard allows you to tune critical parameters:

  • Max Iterations: Hard limit for the planning loop.
  • Closing Threshold: The iteration at which agents start "Compromising" to force convergence.
  • Efficiency-Wage Cap: Limits income inequality based on labor onerousness.
  • Sustenance Baseline: Basic income guarantee.

⚠️ Known Constraints

  • Monopoly Prevention: Examples with fewer than 2 Worker Councils per Industry will fail to start (The industry federations do approvals because I am not sure how we would implement the proper worker council behavior for approving other production proposals).

About

Participatory Economics Simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages