darwin05 commited on
Commit
d0c8f4d
·
verified ·
1 Parent(s): 545c4b9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ## Overview
3
+
4
+ **EAWM** (Event-Aware World Models) is an event-aware world model framework for reinforcement learning. In addition to conventional observation prediction, EAWM explicitly models events so that the world model can learn sparser and more interpretable environment dynamics. The repository includes experiments on Atari, DeepMind Control Suite, DMC-GB2, and Craftax.
5
+
6
+ ![result.png](https://github.com/MarquisDarwin/EAWM/blob/master/results/results.png)
7
+
8
+ ## Using Checkpoints
9
+
10
+ The provided checkpoints are mainly intended for reproducing evaluation results. Before using them, set up the corresponding subproject environment:
11
+
12
+ - See [EADream/README.md](EADream/README.md) for the EADream environment.
13
+ - See [EASimulus/README.md](EASimulus/README.md) for the EASimulus environment.
14
+ - Atari tasks require ROM import first; see [EADream/scripts/import_atari_rom.sh](EADream/scripts/import_atari_rom.sh).
15
+
16
+ Checkpoint layout:
17
+
18
+ ```text
19
+ checkpoints/
20
+ |-- EADream/
21
+ | |-- atari_pong.pt
22
+ | |-- atari_breakout.pt
23
+ | `-- dmc_cheetah_run.pt
24
+ `-- EASimulus/
25
+ |-- Atari/
26
+ | |-- Pong.pt
27
+ | `-- Breakout.pt
28
+ `-- craftax.pt
29
+ ```
30
+
31
+ ### Evaluate EADream Checkpoints
32
+
33
+ Atari example:
34
+
35
+ ```bash
36
+ cd EADream
37
+ python3 eval.py \
38
+ --configdir configsc.yaml \
39
+ --game pong \
40
+ --weights /path/to/checkpoint/dir/EADream/atari_pong.pt \
41
+ --episodes 100 \
42
+ --device cuda:0 \
43
+ --result-file log/result.txt
44
+ ```
45
+
46
+ DMC example:
47
+
48
+ ```bash
49
+ cd EADream
50
+ python3 eval.py \
51
+ --configdir configsc.yaml \
52
+ --configs dmc_vision \
53
+ --task dmc_cheetah_run \
54
+ --weights /path/to/checkpoint/dir/EADream/dmc_cheetah_run.pt \
55
+ --episodes 10 \
56
+ --device cuda:0 \
57
+ --result-file dmcresult.txt
58
+ ```
59
+
60
+ EADream checkpoints follow the `atari_<game>.pt` or `dmc_<domain>_<task>.pt` naming convention, for example `atari_qbert.pt` and `dmc_quadruped_walk.pt`.
61
+
62
+ ### Evaluate EASimulus Checkpoints
63
+
64
+ Atari example:
65
+
66
+ ```bash
67
+ cd EASimulus
68
+ python scripts/eval.py \
69
+ --benchmark atari \
70
+ --weights-path /path/to/checkpoint/dir/EASimulus/Atari/Pong.pt \
71
+ --num-episodes 100 \
72
+ --num-envs 20 \
73
+ --seed 0 \
74
+ --wandb-mode disabled
75
+ ```
76
+
77
+ Craftax example:
78
+
79
+ ```bash
80
+ cd EASimulus
81
+ python scripts/eval.py \
82
+ --benchmark craftax \
83
+ --weights-path /path/to/checkpoint/dir/EASimulus/craftax.pt \
84
+ --num-episodes 100 \
85
+ --num-envs 20 \
86
+ --seed 0 \
87
+ --wandb-mode disabled
88
+ ```
89
+
90
+ EASimulus Atari checkpoints use ALE environment stems as filenames. For example, `Pong.pt` is mapped by the evaluation script to `PongNoFrameskip-v4`.
91
+
92
+
93
+ ### Batch Evaluation
94
+
95
+ You can also use the batch evaluation scripts:
96
+
97
+ - `https://github.com/MarquisDarwin/EAWM/EADream/scripts/eval_atari.sh`
98
+ - `https://github.com/MarquisDarwin/EAWM/EADream/scripts/eval_dmc.sh`
99
+ - `https://github.com/MarquisDarwin/EAWM/EASimulus/scripts/eval_atari.sh`
100
+ - `https://github.com/MarquisDarwin/EAWM/EASimulus/scripts/eval_craft.sh`
101
+
102
+ Before running these scripts, replace the checkpoint placeholder paths with real paths. For EADream, run the scripts under 'EADream/scripts/'; For EASimulus, run the scripts under 'EASimulus/'.
103
+
104
+ ### Difference From Training Resume
105
+
106
+ The `.pt` files under `checkpoints/` are pretrained agent weights intended for evaluation only; they are not complete training checkpoints for resuming training.