Update README.md
Browse files
README.md
CHANGED
@@ -3,78 +3,86 @@ license: apache-2.0
|
|
3 |
---
|
4 |
# Dataset Card for Pong-v4-expert-MCTS
|
5 |
## Table of Contents
|
6 |
-
|
7 |
-
- [
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
- [Data
|
12 |
-
- [
|
13 |
-
- [
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
- [Social Impact of Dataset](##Social-Impact-of-Dataset)
|
19 |
- [Known Limitations](##Known-Limitations)
|
20 |
-
|
21 |
- [Licensing Information](##Licensing-Information)
|
22 |
- [Citation Information](##Citation-Information)
|
23 |
- [Contributions](##Contributions)
|
24 |
|
25 |
## Supported Tasks and Baseline
|
26 |
|
27 |
-
- This dataset supports the training for Procedure Cloning algorithm.
|
|
|
28 |
|
29 |
-
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
| ----------------------------- | ------ |
|
33 |
-
| 0 | 20 |
|
34 |
-
| 4 | -21 |
|
35 |
|
36 |
-
|
|
|
|
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
```
|
44 |
-
{
|
45 |
-
"obs":datasets.Array3D(),
|
46 |
-
"actions":int,
|
47 |
-
"hidden_state":datasets.Array3D(),
|
48 |
-
}
|
49 |
-
```
|
50 |
-
## Source Data
|
51 |
|
52 |
### Data Fields
|
53 |
|
54 |
-
- `obs`: An Array3D containing observations from 8 trajectories of an evaluated agent. The data type is uint8 and each value is in 0 to 255.
|
55 |
- `actions`: An integer containing actions from 8 trajectories of an evaluated agent. This value is from 0 to 5. Details about this environment can be viewed at [Pong - Gym Documentation](https://www.gymlibrary.dev/environments/atari/pong/).
|
56 |
- `hidden_state`: An Array3D containing corresponding hidden states generated by EfficientZero, from 8 trajectories of an evaluated agent. The data type is float32.
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
### Data Splits
|
59 |
There is only a training set for this dataset, as evaluation is undertaken by interacting with a simulator.
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
### Curation Rationale
|
64 |
|
65 |
-
- This dataset includes expert data generated by EfficientZero. Since it contains hidden states for each observation, it is suitable for Imitation Learning methods that learn from a sequence like [Procedure Cloning (PC)](https://arxiv.org/abs/2205.10816).
|
66 |
-
### Source Data
|
67 |
-
#### Initial Data Collection and Normalization
|
68 |
- This dataset is collected by EfficientZero policy.
|
69 |
- The standard for expert data is that each return of 8 episodes is over 20.
|
70 |
- No normalization is previously applied ( i.e. each value of observation is a uint8 scalar in [0, 255] )
|
71 |
-
#### Who are the source language producers?
|
72 |
-
- [@kxzxvbk](https://huggingface.co/kxzxvbk)
|
73 |
|
74 |
-
|
75 |
-
|
|
|
76 |
|
77 |
-
|
78 |
|
79 |
### Social Impact of Dataset
|
80 |
|
@@ -83,11 +91,10 @@ There is only a training set for this dataset, as evaluation is undertaken by in
|
|
83 |
- This dataset can potentially promote the research for sequence based imitation learning algorithms.
|
84 |
|
85 |
### Known Limitations
|
|
|
86 |
- This dataset is only used for academic research.
|
87 |
- For any commercial use or other cooperation, please contact: [email protected]
|
88 |
|
89 |
-
## Additional Information
|
90 |
-
|
91 |
### License
|
92 |
This dataset is under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
93 |
|
|
|
3 |
---
|
4 |
# Dataset Card for Pong-v4-expert-MCTS
|
5 |
## Table of Contents
|
6 |
+
|
7 |
+
- [Supported Tasks and Baseline](#support-tasks-and-baseline)
|
8 |
+
|
9 |
+
- [Data Usage](#data-usage)
|
10 |
+
|
11 |
+
- [Data Discription](##data-description)
|
12 |
+
- [Data Fields](##data-fields)
|
13 |
+
- [Data Splits](##data-splits)
|
14 |
+
- [Initial Data Collection and Normalization](##Initial-Data-Collection-and-Normalization)
|
15 |
+
|
16 |
+
- [Additional Information](#Additional-Information)
|
17 |
+
|
18 |
+
- [Who are the source data producers?](## Who-are-the-source-data-producers?)
|
19 |
- [Social Impact of Dataset](##Social-Impact-of-Dataset)
|
20 |
- [Known Limitations](##Known-Limitations)
|
21 |
+
|
22 |
- [Licensing Information](##Licensing-Information)
|
23 |
- [Citation Information](##Citation-Information)
|
24 |
- [Contributions](##Contributions)
|
25 |
|
26 |
## Supported Tasks and Baseline
|
27 |
|
28 |
+
- This dataset supports the training for [Procedure Cloning (PC )](https://arxiv.org/abs/2205.10816) algorithm.
|
29 |
+
- Baselines when sequence length for decision is 0:
|
30 |
|
31 |
+
| Train loss | Test Acc | Reward |
|
32 |
+
| -------------------------------------------------- | -------- | ------ |
|
33 |
+
| <img src="./img/sup_loss.png" style="zoom:50%;" /> | 0.90 | 20 |
|
34 |
|
35 |
+
- Baselines when sequence length for decision is 4:
|
|
|
|
|
|
|
36 |
|
37 |
+
| Train action loss | Train hidden state loss | Train acc (auto-regressive mode) | Reward |
|
38 |
+
| ----------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | ------ |
|
39 |
+
| <img src="./img/action_loss.png" style="zoom:50%;" /> | <img src="./img/hs_loss.png" style="zoom:50%;" /> | <img src="./img/train_acc.png" style="zoom:50%;" /> | -21 |
|
40 |
|
41 |
+
## Data Usage
|
42 |
|
43 |
+
### Data description
|
44 |
+
|
45 |
+
This dataset includes 8 episodes of pong-v4 environment. The expert policy is [EfficientZero]([[2111.00210\] Mastering Atari Games with Limited Data (arxiv.org)](https://arxiv.org/abs/2111.00210)), which is able to generate MCTS hidden states. Because of the contained hidden states for each observation, this dataset is suitable for Imitation Learning methods that learn from a sequence like PC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
### Data Fields
|
48 |
|
49 |
+
- `obs`: An Array3D containing observations from 8 trajectories of an evaluated agent. The data type is uint8 and each value is in 0 to 255. The shape of this tensor is [96, 96, 3], that is, the channel dimension in the last dimension.
|
50 |
- `actions`: An integer containing actions from 8 trajectories of an evaluated agent. This value is from 0 to 5. Details about this environment can be viewed at [Pong - Gym Documentation](https://www.gymlibrary.dev/environments/atari/pong/).
|
51 |
- `hidden_state`: An Array3D containing corresponding hidden states generated by EfficientZero, from 8 trajectories of an evaluated agent. The data type is float32.
|
52 |
|
53 |
+
This is an example for loading the data using iterator:
|
54 |
+
|
55 |
+
```python
|
56 |
+
from safetensors import saveopen
|
57 |
+
|
58 |
+
def generate_examples(self, filepath):
|
59 |
+
data = {}
|
60 |
+
with safe_open(filepath, framework="pt", device="cpu") as f:
|
61 |
+
for key in f.keys():
|
62 |
+
data[key] = f.get_tensor(key)
|
63 |
+
|
64 |
+
for idx in range(len(data['obs'])):
|
65 |
+
yield idx, {
|
66 |
+
'observation': data['obs'][idx],
|
67 |
+
'action': data['actions'][idx],
|
68 |
+
'hidden_state': data['hidden_state'][idx],
|
69 |
+
}
|
70 |
+
```
|
71 |
+
|
72 |
### Data Splits
|
73 |
There is only a training set for this dataset, as evaluation is undertaken by interacting with a simulator.
|
74 |
|
75 |
+
### Initial Data Collection and Normalization
|
|
|
|
|
76 |
|
|
|
|
|
|
|
77 |
- This dataset is collected by EfficientZero policy.
|
78 |
- The standard for expert data is that each return of 8 episodes is over 20.
|
79 |
- No normalization is previously applied ( i.e. each value of observation is a uint8 scalar in [0, 255] )
|
|
|
|
|
80 |
|
81 |
+
## Additional Information
|
82 |
+
|
83 |
+
### Who are the source language producers?
|
84 |
|
85 |
+
[@kxzxvbk](https://huggingface.co/kxzxvbk)
|
86 |
|
87 |
### Social Impact of Dataset
|
88 |
|
|
|
91 |
- This dataset can potentially promote the research for sequence based imitation learning algorithms.
|
92 |
|
93 |
### Known Limitations
|
94 |
+
|
95 |
- This dataset is only used for academic research.
|
96 |
- For any commercial use or other cooperation, please contact: [email protected]
|
97 |
|
|
|
|
|
98 |
### License
|
99 |
This dataset is under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
100 |
|