为评估新增视频录制支持,包括单环境和矢量环境录像功能,并更新 README.md 添加使用示例和效果展示。

This commit is contained in:
2026-02-14 13:19:59 +08:00
parent 2960ac1df5
commit f536f5f39c
3 changed files with 384 additions and 42 deletions

View File

@@ -2,6 +2,10 @@
最小可运行工程:使用像素输入 + 传统 CNN policy`stable-baselines3` PPO训练 `gym-super-mario-bros / nes-py` 智能体,不使用大语言模型。
最新进度
![PixPin_2026-02-14_12-57-02.gif](PixPin_2026-02-14_12-57-02.gif)
## 1. 项目结构
```text
@@ -278,6 +282,7 @@ python -m src.record_video \
--time-penalty -0.01 \
--epsilon 0.08 \
--duration-sec 30
--stochastic
```
或者稳定版本
@@ -297,6 +302,8 @@ python -m src.record_video \
--epsilon-random-mode uniform \
--max-steps 6000
```
可选:
```bash
@@ -523,3 +530,17 @@ python -m src.record_video --duration-sec 10 --fps 30
- `artifacts/models/` 下有 `.zip` 模型
- `artifacts/logs/` 下有 TensorBoard event 文件
- `artifacts/videos/` 下有 `.mp4`(或失败时有 `_frames/` 帧序列)
python -m src.eval \
--model-path artifacts/models/latest_model.zip \
--episodes 50 \
--movement simple \
--reward-mode progress \
--no-progress-terminate-steps 300 \
--no-progress-terminate-penalty 10 \
--death-penalty -50 \
--stall-penalty 0.05 \
--stall-steps 40 \
--time-penalty -0.01 \
--random-noops 30 \
--epsilon 0.03