Spaces:
Configuration error
Configuration error
File size: 4,622 Bytes
ac9dd65 8f447ab ac9dd65 8f447ab ac9dd65 b81969d b74e16a 8f447ab 5f50076 942d2df 5f50076 942d2df 710a337 5f50076 efd6307 8f447ab b81969d 8f447ab ac9dd65 710a337 942d2df b81969d ac9dd65 710a337 8f447ab ac9dd65 942d2df 8f447ab ac9dd65 942d2df 8f447ab 5f50076 942d2df 0f28872 942d2df 0f28872 942d2df 0f28872 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | # ๐ข AI CEO: Strategic Business Simulation Agent
### Meta PyTorch Hackathon โ OpenEnv Round 1 Submission
[](https://pytorch.org/)
[](https://huggingface.co/)
[](https://github.com/OpenEnv)
---
## ๐ Overview
This repository contains a state-of-the-art **AI CEO Agent** developed for the Meta PyTorch Hackathon. The agent is designed to manage a software company through a highly complex, adversarial, and stochastic business simulation environment.
## ๐ง Problem Statement
The **BusinessSimEnv** is a multi-turn, delayed-reward environment where every action has cascading consequences. A CEO must survive up to **8 quarters** (2 years) while maintaining:
* Positive cash flow in a recession.
* Low employee burnout to avoid skill degradation.
* High reputation to attract premium projects.
The **AdversarialAgent** in the environment injects realistic "shocks" (budget audits, key departures, and client disputes) to test the agent's resilience.
---
## ๐ The Simulation Ecosystem: A Tri-Agent Interaction
Our simulation is not a static set of rules, but a dynamic, multi-agent world where the **AI CEO** must compete and survive against two other environmental agents:
### ๐ค 1. The AI CEO (The Decision Engine)
* **Role**: The primary protagonist of the simulation.
* **Actions**: Project acceptance, hiring/firing (Salary Optimization), tech stack selection, and skill training.
* **Objective**: Maximize long-term corporate health (Budget, Reputation, and Low Burnout) through high-reasoning ROI analysis.
### ๐ 2. The Market Agent (The Economic Engine)
* **Role**: Simulates the macro-economic environment and consumer demand.
* **Behavior**: Driven by a Markov Chain, this agent triggers **Boom, Stable, and Recession** cycles.
* **Impact**: It alters the Domain Demand multipliers (e.g., higher demand for AI during Booms) and profit variances, forcing the CEO to adapt their strategy quarterly.
### ๐ก๏ธ 3. The Adversarial Agent (The Friction Engine)
* **Role**: Simulates the "Chaos" of real-world business operations.
* **Impact**: Triggers events like Budget Audits, Key Employee Departures, and Client Disputes.
---
## ๐ ๏ธ Strategic Architecture
Our agent implements a **Reasoning-Driven Control Loop** with the following advanced heuristics:
The agent leverages **GPT-OSS 20B** to make quarterly decisions across six crucial business factors:
1. **Profit Potential**: Strategic project selection.
2. **Risk Management**: Identifying and mitigating "Hidden Risk."
3. **Team Capability**: Hiring, firing, and training management.
4. **Resource Optimization**: Budgeting and tool choice (Tech Stack).
5. **Market Alignment**: Adapting to Boom/Recession cycles.
6. **Reputation**: Building long-term brand equity vs. short-term gains.
### ๐ 1. Proactive ROI Analysis
The agent performs real-time **Return on Investment (ROI)** analysis factoring in Expected Profit, Total Risk, and Quarterly Salary Burn.
### ๐ 2. Salary Optimization Hack
The agent dynamically **fires developers** to instantly save ~$24,000 per quarter in overhead.
### ๐ก๏ธ 3. Bankruptcy Protection
Follows a strict **Budget-to-Penalty Ratio**. Skip the quarter rather than taking a "suicidal" gamble.
---
## ๐ Evaluation Methodology
Our agent is validated against three distinct "Gates":
1. **Unit Tests**: Verifying deterministic logic for budget calculations (`test_grade.py`).
2. **Adversarial Stress Test**: Running the Hard task (`adversarial_resilience`).
3. **Generalization**: Heuristics that work across all task difficulties.
---
## ๐ ๏ธ Tech Stack & Dependencies
* **Core Logic**: Python 3.12+ with Pydantic schemas.
* **Inference**: **GPT-OSS 20B** on Hugging Face Router.
* **Environment API**: **FastAPI** simulation server.
* **Communication**: Asynchronous **Httpx**.
---
## ๐ฎ Future Roadmap (v2.0)
* **Multi-Agent Negotiation**: Direct negotiation with the Adversarial Agent.
* **Dynamic Tech Stacks**: Modular technology selection.
* **Reinforcement Learning (PPO)**: Transitioning from heuristic prompts to fine-tuned models.
---
## โ๏ธ Installation & Usage
1. **Configure Token**: `$env:HF_TOKEN="your_token"`
2. **Run Inference**: `python inference.py`
3. **Validate**: `python validate.py`
---
|