interior-env / README.md
Interior Env
Optimize dense reward shaping and update README for Hackathon criteria
2f24049
|
Raw History Blame Contribute Delete
2.67 kB
---
title: Spatial Interior Engine
emoji: ๐Ÿ›‹๏ธ
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
tags:
- openenv
pinned: false
license: mit
---
# Spatial Interior Sandbox (OpenEnv Submission)
A highly advanced 2D Spatial Engine combining "Furniture Tetris" with architectural logic constraints and "A* Pathfinding" for Human Flow validation.
## ๐ŸŒ Real-World Utility (Domain)
This environment accurately evaluates an AI agent's ability to manipulate physical objects in a 2D coordinate space while preserving accessibility pathways and honoring rigorous interior design constraints. Floor planning, constraint-based packing, and layout flow optimization are genuine robotics and architectural planning problems, moving far past toy games into real-world spatial physics evaluation.
## ๐Ÿ” Observation Space
The observation space provides a completely typed dictionary of the entire room state:
- `room_size`: Tuple `(width, height)` defining the physical 2D grid.
- `door_position`: Fixed entry point coordinate.
- `windows`: List of `(x, y)` coordinates acting as structural constraints.
- `unplaced_items`: Inventory of remaining `{id, width, height, rules}` items.
- `placed_items`: Dictionary mapping item IDs to `PlacedFurniture(x, y, rotation)`.
- `feedback_logs`: Real-time compiler feedback indicating violations per step.
## ๐ŸŽฎ Action Space
Agents submit typed JSON payloads to execute positional maneuvers.
```json
{
"action_type": "place_item", // Or 'remove_item' / 'no_op'
"item": "sofa",
"x": 4,
"y": 5,
"rotation": 90
}
```
## ๐Ÿ† Reward Design & Difficulty
- **Varying Dense Progress Signals:** The environment returns a partial reward (+0.5 to +1.0) for every successful, non-overlapping placement that instantly resolves pending architectural rules. Backtracking drops the reward by -0.1, and collisions hit -1.0.
- **1.0 Perfect Completion Score:** Total episode `score` scales to `1.0` if the room layout is cleanly solved in minimal steps, degrading slowly for wasted actions (efficiency scaling).
- **Difficulty Grading:** We scale complexity via `easy` (8 items), `medium` (10 items), and `hard` (15 items) tasks, measuring true spatial capability rather than pure luck. (Random placing fails at 0%).
## ๐Ÿ› ๏ธ Setup & Inference Evaluator
Fully supported `inference.py` script provided in the repository root for automated valuation.
1. **Install SDK Tools:** run `uv lock` && `pip install openenv-core`
2. **Execute Agent Benchmark:**
```bash
$env:HF_TOKEN="your_hf_token"
python inference.py --task hard
```
3. **Execute Interactive Dashboard UI:** `python -m uvicorn server.app:app --port 7860`