{"id":13711600,"url":"https://github.com/ckrowland/markets","last_synced_at":"2026-03-06T00:32:17.087Z","repository":{"id":64238502,"uuid":"528309480","full_name":"ckrowland/markets","owner":"ckrowland","description":"Visually simulate basic markets.","archived":false,"fork":false,"pushed_at":"2025-02-27T05:09:40.000Z","size":66721,"stargazers_count":43,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-30T14:15:21.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://economicvisuals.com","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckrowland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-08-24T07:18:05.000Z","updated_at":"2025-04-23T07:21:40.000Z","dependencies_parsed_at":"2024-07-27T00:22:22.114Z","dependency_job_id":"2b24428d-f631-4264-b7e0-7d2179e64082","html_url":"https://github.com/ckrowland/markets","commit_stats":null,"previous_names":["ckrowland/markets"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrowland%2Fmarkets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrowland%2Fmarkets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrowland%2Fmarkets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrowland%2Fmarkets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckrowland","download_url":"https://codeload.github.com/ckrowland/markets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772094,"owners_count":21801850,"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","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":"2024-08-02T23:01:09.746Z","updated_at":"2026-03-06T00:32:17.010Z","avatar_url":"https://github.com/ckrowland.png","language":"Zig","funding_links":[],"categories":["GPU Computing"],"sub_categories":["Zigged Project"],"readme":"# Markets\n\nVisually simulate markets of basic consumers and producers.\nBuilt on [zig-gamedev](https://github.com/zig-gamedev/zig-gamedev/).\nDownload from the latest release or build from source.\n\n[demo.webm](https://github.com/user-attachments/assets/bb38bfce-3b98-45b4-92d7-463b8f2eac41)\n- This simulation has two basic agents: Consumers and Producers.\n- Consumers are the circles. Producers are the squares.\n- Producers create resources and Consumers consume these resources.\n- The size of both Producers and Consumers grows to show how many resources they currently have.\n- This is called their inventory.\n- When Consumers have no inventory they turn red, otherwise they are green.\n- Whenever Consumers are empty they travel to a Producer and try to buy more resources before returning home.\n- Consumers choose the Producer which has the largest inventory from which they can buy.\n- If two Producers have the same inventory then the closest Producer is chosen.\n- Consumers and Producers both have money in this simulation.\n- Consumers have a constant income.\n- Producers only receive money when a consumer buys from them.\n- The price at which this transaction occurs is controlled via the Price Sold slider.\n- Producers use their money to produce resources at the current Production Cost.\n- To keep things constrained there is a maximum amount of money Consumers and Producers can hold.\n- The grey circle around a consumer shows how much it could buy right now at the current price.\n- The white square around a producer shows how much it could produce right now at the current production cost.\n\nParameters:\n\n- Number of Producers\n- Production Cost\n- Price Sold\n- Max Production Rate\n- Producer Max Money\n- Producer Max Inventory\n- Decay Rate\n- Number of Consumers\n- Consumer Income\n- Consumer Max Money\n- Moving Rate\n\nData Gathered:\n\n- Transactions per second\n- Empty Consumers\n- Avg Producer Inventory\n- Avg Producer Money\n- Avg Consumer Inventory\n- Avg Consumer Money\n- Total Producer Inventory\n\n## Build From Source\n\n### Download\n\n- [Git](https://git-scm.com/)\n- [Git LFS](https://git-lfs.github.com/)\n- Zig **0.14.1**.\n\n### Run\n\n```\ngit clone https://github.com/ckrowland/markets.git\ncd markets\nzig build run\n```\n\n## Resource Editor (Currently Broken)\n\n[editor.webm](https://github.com/ckrowland/simulations/assets/95145274/2c21762f-0dd2-4a00-8d2e-0aad38e83c78)\n\n- Manually place position of consumers and producers.\n- Each producer and consumer grouping has individual parameters.\n\n## Variable Parameters (Currently Broken)\n\n[variable.webm](https://github.com/ckrowland/simulations/assets/95145274/b7e97f85-6828-42fe-827d-af6ee2bdb049)\n\n- Very similiar to the random simulation.\n- Have input parameters controlled via a wave timeline.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckrowland%2Fmarkets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckrowland%2Fmarkets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckrowland%2Fmarkets/lists"}