-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
97 lines (97 loc) · 3.25 KB
/
Copy pathschema.json
File metadata and controls
97 lines (97 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "forager state and trajectory schemas",
"$defs": {
"cell": {
"description": "A grid coordinate pair [x, y], each in [0, G-1].",
"type": "array",
"items": { "type": "integer", "minimum": 0, "maximum": 7 },
"minItems": 2,
"maxItems": 2
},
"state": {
"type": "object",
"description": "One serialized forager state. Mirrors spec.md's state-space table.",
"properties": {
"pos": { "$ref": "#/$defs/cell" },
"berries": {
"description": "Berry cells, fixed for the episode.",
"type": "array",
"items": { "$ref": "#/$defs/cell" },
"minItems": 6,
"maxItems": 6
},
"kinds": {
"description": "Berry kind per berry; indexes GAINS.",
"type": "array",
"items": { "type": "integer", "minimum": 0, "maximum": 2 },
"minItems": 6,
"maxItems": 6
},
"alive": {
"description": "Berry not yet collected.",
"type": "array",
"items": { "type": "boolean" },
"minItems": 6,
"maxItems": 6
},
"energy": {
"description": "Remaining energy, float32. Accumulated left-to-right per spec.md #Energy; both implementations perform the same operations in the same order, so no tolerance is declared.",
"type": "number"
},
"t": { "type": "integer", "minimum": 0, "maximum": 80 }
},
"required": ["pos", "berries", "kinds", "alive", "energy", "t"],
"additionalProperties": false
},
"action": {
"description": "Compass direction: 0 = north, 1 = east, 2 = south, 3 = west.",
"type": "integer",
"minimum": 0,
"maximum": 3
},
"trajectory": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"env": { "type": "string" },
"format_version": { "type": "string" },
"simulacrum_version": { "type": "string" },
"seed": { "type": "integer" },
"source": { "enum": ["reference", "batched"] },
"instance": { "type": ["integer", "null"] },
"git_sha": { "type": ["string", "null"] },
"created_at": { "type": "string" }
},
"required": ["env", "format_version", "seed", "source", "created_at"]
},
"initial": {
"type": "object",
"properties": {
"episode": { "type": "integer" },
"state": { "$ref": "#/$defs/state" }
},
"required": ["episode", "state"]
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"t": { "type": "integer" },
"episode": { "type": "integer" },
"state": { "$ref": "#/$defs/state" },
"action": { "$ref": "#/$defs/action" },
"reward": { "type": "number" },
"terminated": { "type": "boolean" }
},
"required": ["t", "episode", "state", "action", "reward", "terminated"]
}
}
},
"required": ["metadata", "initial", "steps"]
}
}
}