Update BLOCK_WORLD.md
Browse files- BLOCK_WORLD.md +0 -76
BLOCK_WORLD.md
CHANGED
|
@@ -126,82 +126,6 @@ N,K,start_state,goal_state,current_state,next_state,move,num_moves
|
|
| 126 |
|
| 127 |
---
|
| 128 |
|
| 129 |
-
## 🧮 Complexity Analysis
|
| 130 |
-
|
| 131 |
-
### Solution Length Formula
|
| 132 |
-
|
| 133 |
-
For N blocks across K stacks, the **worst-case optimal solution length** is:
|
| 134 |
-
|
| 135 |
-
```
|
| 136 |
-
L(N) = O(N)
|
| 137 |
-
```
|
| 138 |
-
|
| 139 |
-
**Explanation**: In the worst case, each block must be moved exactly once from its initial position to its goal position. When K ≥ 3 stacks are available, there is always at least one empty stack (or a stack whose top block is already correctly positioned) that can serve as a temporary buffer.
|
| 140 |
-
|
| 141 |
-
### Transition Verification
|
| 142 |
-
|
| 143 |
-
Checking whether a proposed move is legal requires:
|
| 144 |
-
|
| 145 |
-
```
|
| 146 |
-
C_verify = O(1)
|
| 147 |
-
```
|
| 148 |
-
|
| 149 |
-
**Why O(1)?** To validate a move `[block, source, dest]`:
|
| 150 |
-
1. Check that `source` stack is non-empty (the block to be moved exists)
|
| 151 |
-
2. Check that `dest` stack either exists or is an empty position
|
| 152 |
-
|
| 153 |
-
Both checks involve reading only the **top element** of two stacks, independent of N.
|
| 154 |
-
|
| 155 |
-
### Action Space
|
| 156 |
-
|
| 157 |
-
The branching factor (number of possible moves per state):
|
| 158 |
-
|
| 159 |
-
```
|
| 160 |
-
b = O(K²)
|
| 161 |
-
```
|
| 162 |
-
|
| 163 |
-
With K=3 stacks, at most 3×2 = 6 moves per state (from each non-empty stack to the other two stacks).
|
| 164 |
-
|
| 165 |
-
---
|
| 166 |
-
|
| 167 |
-
## 📈 Benchmark Results
|
| 168 |
-
|
| 169 |
-
### Model Performance (from paper)
|
| 170 |
-
|
| 171 |
-
| Model | Condition | Val Accuracy (N=1-7) | OOD Accuracy (N=8-10) |
|
| 172 |
-
|-------|-----------|---------------------|---------------------|
|
| 173 |
-
| **T5-small (60M)** | Pre-trained + Fine-tuned | **97.27%** | **81.00%** ✅ |
|
| 174 |
-
| GPT-2 (124M) | Pre-trained + Fine-tuned | 24.55% | 0.00% |
|
| 175 |
-
| T5-small | Trained from scratch | 0.00% | 0.00% |
|
| 176 |
-
| GPT-2 | Trained from scratch | 21.82% | 0.00% |
|
| 177 |
-
|
| 178 |
-
### Key Findings
|
| 179 |
-
|
| 180 |
-
1. **Architecture > Scale**: T5 (60M parameters) dramatically outperforms GPT-2 (124M parameters)
|
| 181 |
-
- T5's bidirectional encoder provides full goal access at every decoding step
|
| 182 |
-
- GPT-2's causal mask creates a planning bottleneck
|
| 183 |
-
|
| 184 |
-
2. **Pre-training Helps**: Pre-trained T5 gains +97.27 percentage points over training from scratch
|
| 185 |
-
- Pre-training transfers because Block World has **O(1) local transition structure**
|
| 186 |
-
|
| 187 |
-
3. **Gradual OOD Degradation**: T5 maintains strong performance even on harder instances
|
| 188 |
-
- N=8: 84% accuracy
|
| 189 |
-
- N=9: 84% accuracy
|
| 190 |
-
- N=10: 75% accuracy
|
| 191 |
-
- This gradual decay (not abrupt collapse) indicates genuine rule learning
|
| 192 |
-
|
| 193 |
-
### Failure Mode Analysis
|
| 194 |
-
|
| 195 |
-
**T5 Fine-tuned failures** (on the 3% validation set that failed):
|
| 196 |
-
- **Loops**: 67% - Model generates valid moves but revisits previous states
|
| 197 |
-
- **Premature Stop**: 33% - Model halts before reaching goal
|
| 198 |
-
|
| 199 |
-
**GPT-2 Fine-tuned failures**:
|
| 200 |
-
- **Validation**: 81% loops (model learns legal moves but no goal direction)
|
| 201 |
-
- **OOD**: 91% invalid moves (systematic shift! Constraint generalization fails)
|
| 202 |
-
|
| 203 |
-
---
|
| 204 |
-
|
| 205 |
## 💡 Usage Tips
|
| 206 |
|
| 207 |
### For Model Training
|
|
|
|
| 126 |
|
| 127 |
---
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
## 💡 Usage Tips
|
| 130 |
|
| 131 |
### For Model Training
|