Spaces:
Sleeping
Sleeping
Commit ·
2038b66
1
Parent(s): 3a5b76e
v0.5.1: re-enable decaying height breach penalty from line 4
Browse filesHeight breach penalty back at -50/level, decaying by 5 per piece locked.
Combined with 5-piece curriculum, teaches model not to stack high early.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
src/tetris_env/server/game_engine.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Tetris Environment for OpenEnv.
|
| 3 |
Full game logic with combo scoring reward system.
|
| 4 |
"""
|
| 5 |
-
__version__ = "0.5.
|
| 6 |
|
| 7 |
import random
|
| 8 |
import copy
|
|
@@ -42,7 +42,7 @@ STEP_PENALTY = -0.1
|
|
| 42 |
HOLE_PENALTY_MULT = -5
|
| 43 |
GAME_OVER_PENALTY = -50
|
| 44 |
HEIGHT_BREACH_THRESHOLD = 4
|
| 45 |
-
HEIGHT_BREACH_PENALTY =
|
| 46 |
|
| 47 |
|
| 48 |
def rotate_cw(piece: list[list[int]]) -> list[list[int]]:
|
|
|
|
| 2 |
Tetris Environment for OpenEnv.
|
| 3 |
Full game logic with combo scoring reward system.
|
| 4 |
"""
|
| 5 |
+
__version__ = "0.5.1" # game_over -50, height breach ON (decaying), LR 1e-4
|
| 6 |
|
| 7 |
import random
|
| 8 |
import copy
|
|
|
|
| 42 |
HOLE_PENALTY_MULT = -5
|
| 43 |
GAME_OVER_PENALTY = -50
|
| 44 |
HEIGHT_BREACH_THRESHOLD = 4
|
| 45 |
+
HEIGHT_BREACH_PENALTY = -50 # per level above threshold, decays with pieces_locked
|
| 46 |
|
| 47 |
|
| 48 |
def rotate_cw(piece: list[list[int]]) -> list[list[int]]:
|