Spaces:
Configuration error
Configuration error
ychanakya12
GRANULARITY FIX: extremely granular graders, ASCII-only logs, 3-decimal [END] lines
31f0e47 Download src/tasks/task_easy.py from MetaStableMinds/business-sim-openenv: direct link, hf CLI and curl.
- Browser
- Download file 885 Bytes
-
https://huggingface.co/spaces/MetaStableMinds/business-sim-openenv/resolve/main/src/tasks/task_easy.py
- Command line
-
hf download hf://spaces/MetaStableMinds/business-sim-openenv/src/tasks/task_easy.py
-
curl -L -o task_easy.py https://huggingface.co/spaces/MetaStableMinds/business-sim-openenv/resolve/main/src/tasks/task_easy.py
885 Bytes
| """task_easy.py - Single Quarter Survival grader.""" | |
| def grade(env) -> float: | |
| """ | |
| Score based on ending budget after 1 quarter. | |
| Guaranteed strictly in (0.01, 0.99). | |
| Very granular to show partial progress. | |
| """ | |
| # Start with a base score | |
| if env.budget <= -50000: | |
| raw_score = 0.01 | |
| elif env.budget <= 0: | |
| # Bankrupt but survived part of the quarter / didn't lose everything | |
| # Map (-50k, 0) to (0.01, 0.2) | |
| raw_score = 0.01 + ((env.budget + 50000) / 50000) * 0.19 | |
| elif env.budget < 100000: | |
| # Survived but lost money | |
| # Map (0, 100k) to (0.2, 0.5) | |
| raw_score = 0.2 + (env.budget / 100000) * 0.3 | |
| else: | |
| # Profit! | |
| # Map (100k, 200k) to (0.5, 0.99) | |
| profit = env.budget - 100000 | |
| raw_score = 0.5 + min(0.49, (profit / 100000) * 0.49) | |
| return round(float(raw_score), 4) | |