{"id":30714900,"url":"https://github.com/joehowarth/economy-sim-rust","last_synced_at":"2025-09-03T05:48:12.246Z","repository":{"id":295665697,"uuid":"990836319","full_name":"JoeHowarth/economy-sim-rust","owner":"JoeHowarth","description":"Rust-based economic simulation of village resource management, population dynamics, and double auction trading","archived":false,"fork":false,"pushed_at":"2025-05-26T19:03:28.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-26T19:23:23.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoeHowarth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T18:01:19.000Z","updated_at":"2025-05-26T19:03:31.000Z","dependencies_parsed_at":"2025-05-26T19:23:28.501Z","dependency_job_id":"5d2fdd5f-58b3-453d-a0d1-9e84e88f56cc","html_url":"https://github.com/JoeHowarth/economy-sim-rust","commit_stats":null,"previous_names":["joehowarth/economy-sim-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JoeHowarth/economy-sim-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeHowarth%2Feconomy-sim-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeHowarth%2Feconomy-sim-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeHowarth%2Feconomy-sim-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeHowarth%2Feconomy-sim-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoeHowarth","download_url":"https://codeload.github.com/JoeHowarth/economy-sim-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeHowarth%2Feconomy-sim-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273397840,"owners_count":25098235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-03T05:48:06.595Z","updated_at":"2025-09-03T05:48:12.230Z","avatar_url":"https://github.com/JoeHowarth.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# economy-sim-rust\n\nA village economics simulator where small populations struggle against thermodynamics and each other.\n\n## What is this?\n\nI got curious about the minimal conditions for sustainable civilization. Not the grand sweep of history stuff - just the basics. How many people do you need to keep everyone fed and sheltered? What happens when you add trade? When does specialization emerge from necessity?\n\nSo I built a simulator. Villages manage wood and food production with diminishing returns (because the best trees get cut first, and the best land gets farmed first). Workers need food daily or they starve in 10 days. They need shelter or they die of exposure in 30. Houses decay without maintenance. Population grows at 5% when conditions are good.\n\nThe interesting part: villages can trade through a double auction system with budget constraints and order pruning. No central planning, just local decisions and price discovery.\n\n## The Model\n\nEach village allocates workers between:\n- Food production (2 units/day for first worker, 1.5 for second)  \n- Wood production (0.1/day first, 0.075 second)\n- House construction (60 worker-days + 10 wood per house)\n- House maintenance (0.1 wood/day or decay happens)\n\nThe auction system uses a proper iterative clearing algorithm that handles multiple resources and prevents budget violations. Think of it as a tiny commodities exchange where failure means death.\n\n## Running it\n\n```bash\ncargo run\n```\n\n## Architecture Notes\n\nThe separation between simulation logic (`main.rs`) and market mechanics (`auction.rs`) is clean. Villages make local decisions through a strategy trait. \nThe auction runs as a separate system that could theoretically handle any tradeable resources.\n\n## Status\n\nActive development. The basics work but the interesting emergent behaviors aren't there yet. Need to:\n- Implement actual trading (not just price discovery)\n- Add more sophisticated village strategies \n- Run longer simulations to see if stable states exist\n- Maybe add geography/trade routes for more realistic constraints\n\nPRs welcome if you're into this sort of thing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehowarth%2Feconomy-sim-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoehowarth%2Feconomy-sim-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehowarth%2Feconomy-sim-rust/lists"}