{"id":18416910,"url":"https://github.com/rpdevjesco/strategicutilitysystem","last_synced_at":"2025-10-08T14:32:42.751Z","repository":{"id":232724681,"uuid":"784973715","full_name":"RPDevJesco/StrategicUtilitySystem","owner":"RPDevJesco","description":"a context-aware decision-making framework","archived":false,"fork":false,"pushed_at":"2024-04-11T04:38:56.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T03:18:15.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/RPDevJesco.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}},"created_at":"2024-04-10T23:48:27.000Z","updated_at":"2024-04-10T23:57:58.000Z","dependencies_parsed_at":"2024-04-11T05:53:01.949Z","dependency_job_id":"3fb3a1b5-bc0e-4d03-8f6c-2087b8a3f3ae","html_url":"https://github.com/RPDevJesco/StrategicUtilitySystem","commit_stats":null,"previous_names":["rpdevjesco/strategicutilitysystem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FStrategicUtilitySystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FStrategicUtilitySystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FStrategicUtilitySystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FStrategicUtilitySystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RPDevJesco","download_url":"https://codeload.github.com/RPDevJesco/StrategicUtilitySystem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657909,"owners_count":21140846,"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-11-06T04:07:41.154Z","updated_at":"2025-10-08T14:32:42.636Z","avatar_url":"https://github.com/RPDevJesco.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Strategic Utility System (SUS)\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Features](#features)\n- [Usage](#usage)\n    - [Creating an Action](#creating-an-action)\n    - [Creating a Context](#creating-a-context)\n    - [Decision Making](#decision-making)\n    - [Decision Adjustment](#decision-adjustment)\n\n## Introduction\nThe Strategic Utility System (SUS) is a context-aware decision-making framework designed for game AI. It evaluates potential actions based on their utility and the current game context, enabling AI to adapt dynamically to changing environments.\n\n## Features\n- **Contextual and Context-Aware Decision Making**: Adapts to changes in the game environment by evaluating the utility of actions within the current context.\n- **Caching and Reuse**: Optimizes performance by caching utility calculations for reuse in similar decision-making scenarios.\n- **Adaptive Thresholds**: Dynamically adjusts thresholds to prioritize actions based on the urgency of the situation.\n- **Parallel Processing**: Leverages multi-core processors to evaluate actions concurrently, reducing decision-making time.\n\n## Usage\n\n### Creating an Action:\n\n```csharp\nvar actions = new List\u003cIAction\u003e\n{\n    new GameAction(\"Explore\", context =\u003e\n    {\n        if (context is GameContext gameContext \u0026\u0026 gameContext.EnvironmentType == \"Forest\")\n        {\n            return 0.8; // Higher utility in forests\n        }\n        return 0.5; // Default utility\n    }),\n};\n```\n\n### Creating a Context:\n\n```csharp\nvar context = new GameContext(numberOfEnemies: 3, numberOfAllies: 1, resourceAvailability: 0.5, environmentType: \"Forest\");\n```\n\n### Decision Making:\n\n```csharp\nvar decisionMaker = new DecisionMaker();\nvar bestAction = await decisionMaker.ChooseBestActionAsync(actions, context);\n```\n\n### Decision Adjustment:\n\n```csharp\ndecisionMaker.AdjustThreshold(0.7);\nbestAction = await decisionMaker.ChooseBestActionAsync(actions, context);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fstrategicutilitysystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpdevjesco%2Fstrategicutilitysystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Fstrategicutilitysystem/lists"}