forked from trueagi-io/Vereya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMission.xsd
476 lines (439 loc) · 21.6 KB
/
Mission.xsd
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ProjectMalmo.singularitynet.io"
xmlns="http://ProjectMalmo.singularitynet.io"
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
elementFormDefault="qualified"
jaxb:version="3.0"
version="0.1">
<xs:include schemaLocation="Types.xsd" />
<xs:include schemaLocation="MissionHandlers.xsd" />
<xs:element name="Mission">
<xs:annotation>
<xs:documentation>
A mission definition has a description, a starting point and some kind of scoring system. It also defines the agents and roles involved.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="About" />
<xs:element ref="ModSettings" minOccurs="0" maxOccurs="1" />
<xs:element ref="ServerSection" minOccurs="1" maxOccurs="1" />
<xs:element ref="AgentSection" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="SchemaVersion" type="xs:token" />
</xs:complexType>
</xs:element>
<xs:element name="ModSettings">
<xs:annotation>
<xs:documentation>
Settings here are independent of the mission but affect how it is run.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="MsPerTick" minOccurs="0" maxOccurs="1" >
<xs:annotation>
<xs:documentation>
Use this to overclock Minecraft - to make Minecraft time run faster than normal.
This sets the delay that Minecraft uses between world ticks, in milliseconds. The default is 50ms per tick (20Hz).
Double-speed would be 25ms/tick (40Hz). For best results, stick to reasonable values (that the server
might be able to cope with), which also result in a whole number of ticks per second.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PrioritiseOffscreenRendering" type="xs:boolean" minOccurs="0" maxOccurs="1" >
<xs:annotation>
<xs:documentation>
If set to true, the Minecraft window will only be updated once per second during the run of the mission. This will allow the
render pipeline to run much faster, resulting in the platform receiving frames at a higher rate.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="ServerSection">
<xs:annotation>
<xs:documentation>
The Minecraft server stores the world and keeps track of the blocks that have changed. Each Minecraft client connects to the server when it needs to
change blocks or ask what blocks are present, for example. With multi-agent missions there may be many clients, all connected to a single server.
Settings here affect the shared world that the clients experience.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="ServerInitialConditions" minOccurs="0" maxOccurs="1" />
<xs:element ref="ServerHandlers" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AgentSection">
<xs:annotation>
<xs:documentation>
Each agent is specified in one of these sections, detailing the way they experience the world and the actions they can perform to interact with it.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element ref="AgentStart" />
<xs:element ref="AgentHandlers" />
</xs:sequence>
<xs:attribute name="mode" use="optional" type="GameMode" default="Survival" />
</xs:complexType>
</xs:element>
<xs:element name="About">
<xs:annotation>
<xs:documentation>
Description of the mission.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Summary" type="xs:string" />
<xs:element name="Description" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AgentStart">
<xs:annotation>
<xs:documentation>
Defines the initial conditions of the player. This includes the location and the contents of their inventory.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Placement" type="PosAndDirection" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
The player's starting location; if unspecified, will be the game's randomly-chosen spawn point.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Inventory" minOccurs="0" maxOccurs="1" >
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded" > <!-- minOccurs = 0 to allow an empty Inventory -->
<xs:element ref="InventoryObject" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="EnderBoxInventory" minOccurs="0" maxOccurs="1" >
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded" > <!-- minOccurs = 0 to allow an empty Inventory -->
<xs:element ref="InventoryObject" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="ServerInitialConditions">
<xs:annotation>
<xs:documentation>
Defines the initial conditions of the world.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="Time" minOccurs="0" maxOccurs="1" />
<xs:element ref="Weather" minOccurs="0" maxOccurs="1" />
<xs:element name="AllowSpawning" type="xs:boolean" minOccurs="0" maxOccurs="1" default="false">
<xs:annotation>
<xs:documentation>
Set this to true to allow mobs (animals and hostiles) to spawn during a mission.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="AllowedMobs" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
If AllowSpawning is set to true, use this to specify a list of the allowed mobs. Only those mobs which are on the list will be allowed to spawn. If no list is specified, normal spawning behaviour will take place. Note that these settings *do* effect mob_spawner blocks.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:list itemType="EntityTypes"/>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="Time">
<xs:annotation>
<xs:documentation>
Minecraft has a day-night cycle that affects the light levels and the appearance of hostile mobs.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element ref="StartTime" minOccurs="0" maxOccurs="1" />
<xs:element name="AllowPassageOfTime" type="xs:boolean" minOccurs="0" maxOccurs="1" default="true">
<xs:annotation>
<xs:documentation>
Set this to false to stop the day-night cycle. The sun position and weather will remain fixed for the duration of the mission.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="StartTime" >
<xs:annotation>
<xs:documentation>
Specifies the time of day at the start of the mission, in thousandths of an hour.
0 = dawn
6000 = noon
18000 = midnight
Time in Minecraft travels (by default) 72 times faster than real-time. Thus a Minecraft day lasts 20 minutes.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0" />
<xs:maxInclusive value="23999" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Weather" default="normal">
<xs:annotation>
<xs:documentation>
Specifies the type of weather at the start of the mission.
"normal" = let Minecraft do what it normally does
"clear" = start with clear weather
"rain" = start with rain (or snow, in a cold biome)
"thunder" = start with thundery weather
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="normal"/>
<xs:enumeration value="clear"/>
<xs:enumeration value="rain"/>
<xs:enumeration value="thunder"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:complexType name="InventoryObjectType">
<xs:attribute name="slot" use="required">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="39"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" use="required" type="BlockOrItem"/>
<xs:attribute name="variant" use="optional" type="Variation" />
<xs:attribute name="colour" use="optional" type="Colour" />
<xs:attribute name="quantity" default="1">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="64"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:element name="InventoryObject" type="InventoryObjectType">
<xs:annotation>
<xs:documentation>
Defines an item or block in the inventory.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="InventoryItem" substitutionGroup="InventoryObject">
<xs:annotation>
<xs:documentation>
Defines an item in the inventory - deprecated, use InventoryObject instead
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="InventoryObjectType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="InventoryBlock" substitutionGroup="InventoryObject">
<xs:annotation>
<xs:documentation>
Defines a block in the inventory - deprecated, use InventoryObject instead
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="InventoryObjectType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="GameMode">
<xs:annotation>
<xs:documentation>
In survival mode the player can be hurt and experience hunger and must collect blocks. In creative mode they can fly and have an infinite supply of blocks.
In spectator mode the player cannot change anything and can fly through blocks.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Survival" />
<xs:enumeration value="Creative" />
<xs:enumeration value="Adventure" />
<xs:enumeration value="Spectator" />
</xs:restriction>
</xs:simpleType>
<!--=============================================================================================================-->
<!--=========================================== MISSION HANDLER TYPES ===========================================-->
<!--=============================================================================================================-->
<!--======= When new mission handlers are created, make sure they are added to the correct section below ======= -->
<!--=============================================================================================================-->
<xs:group name="AgentMissionHandlers">
<xs:annotation>
<xs:documentation>
Lists the available Mission Handlers for an agent. Each can only be used once.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="AgentMissionHandlers"/>
</xs:appinfo>
</xs:annotation>
<xs:all>
<xs:element ref="ObservationFromRecentCommands" minOccurs="0"/>
<xs:element ref="ObservationFromHotBar" minOccurs="0"/>
<xs:element ref="ObservationFromFullStats" minOccurs="0"/>
<xs:element ref="ObservationFromFullInventory" minOccurs="0"/>
<xs:element ref="ObservationFromSubgoalPositionList" minOccurs="0"/>
<xs:element ref="ObservationFromGrid" minOccurs="0"/>
<xs:element ref="ObservationFromFindBlock" minOccurs="0"/>
<xs:element ref="ObservationFromDistance" minOccurs="0"/>
<xs:element ref="ObservationFromDiscreteCell" minOccurs="0"/>
<xs:element ref="ObservationFromChat" minOccurs="0"/>
<xs:element ref="ObservationFromNearbyEntities" minOccurs="0"/>
<xs:element ref="ObservationFromRay" minOccurs="0"/>
<xs:element ref="ObservationFromRecipes" minOccurs="0"/>
<xs:element ref="ObservationFromItems" minOccurs="0"/>
<xs:element ref="ObservationFromBlocksDrops" minOccurs="0"/>
<xs:element ref="ObservationFromSolidness" minOccurs="0"/>
<xs:element ref="ObservationFromTurnScheduler" minOccurs="0"/>
<xs:element ref="ObservationFromHuman" minOccurs="0"/>
<xs:element ref="ObservationFromSystem" minOccurs="0"/>
<xs:element ref="ObservationFromCompass" minOccurs="0"/>
<xs:element ref="VideoProducer" minOccurs="0"/>
<xs:element ref="DepthProducer" minOccurs="0"/>
<xs:element ref="LuminanceProducer" minOccurs="0"/>
<xs:element ref="ColourMapProducer" minOccurs="0"/>
<xs:element ref="RewardForTouchingBlockType" minOccurs="0" />
<xs:element ref="RewardForSendingCommand" minOccurs="0" />
<xs:element ref="RewardForSendingMatchingChatMessage" minOccurs="0" />
<xs:element ref="RewardForCollectingItem" minOccurs="0" />
<xs:element ref="RewardForPossessingItem" minOccurs="0" />
<xs:element ref="RewardForCraftingItem" minOccurs="0" />
<xs:element ref="RewardForSmeltingItem" minOccurs="0" />
<xs:element ref="RewardForDiscardingItem" minOccurs="0" />
<xs:element ref="RewardForReachingPosition" minOccurs="0"/>
<xs:element ref="RewardForMissionEnd" minOccurs="0"/>
<xs:element ref="RewardForStructureCopying" minOccurs="0"/>
<xs:element ref="RewardForTimeTaken" minOccurs="0"/>
<xs:element ref="RewardForCatchingMob" minOccurs="0"/>
<xs:element ref="RewardForDamagingEntity" minOccurs="0"/>
<xs:element ref="ContinuousMovementCommands" minOccurs="0"/>
<xs:element ref="CommandForWheeledRobotNavigationMob" minOccurs="0" />
<xs:element ref="AbsoluteMovementCommands" minOccurs="0"/>
<xs:element ref="DiscreteMovementCommands" minOccurs="0"/>
<xs:element ref="InventoryCommands" minOccurs="0"/>
<xs:element ref="ChatCommands" minOccurs="0"/>
<xs:element ref="SimpleCraftCommands" minOccurs="0"/>
<xs:element ref="BlockPlaceCommands" minOccurs="0"/>
<xs:element ref="NearbyCraftCommands" minOccurs="0"/>
<xs:element ref="NearbySmeltCommands" minOccurs="0"/>
<xs:element ref="PlaceCommands" minOccurs="0"/>
<xs:element ref="MissionQuitCommands" minOccurs="0"/>
<xs:element ref="TurnBasedCommands" minOccurs="0"/>
<xs:element ref="HumanLevelCommands" minOccurs="0"/>
<xs:element ref="AgentQuitFromTimeUp" minOccurs="0" />
<xs:element ref="AgentQuitFromReachingPosition" minOccurs="0" />
<xs:element ref="AgentQuitFromTouchingBlockType" minOccurs="0" />
<xs:element ref="AgentQuitFromCollectingItem" minOccurs="0" />
<xs:element ref="AgentQuitFromPossessingItem" minOccurs="0" />
<xs:element ref="AgentQuitFromCraftingItem" minOccurs="0" />
<xs:element ref="AgentQuitFromSmeltingItem" minOccurs="0" />
<xs:element ref="AgentQuitFromReachingCommandQuota" minOccurs="0" />
<xs:element ref="AgentQuitFromCatchingMob" minOccurs="0" />
</xs:all>
</xs:group>
<xs:group name="TurnBasedApplicableCommandHandlers">
<xs:annotation>
<xs:documentation>
Lists the command handlers which are applicable to a turn-based scenario.
</xs:documentation>
<xs:appinfo>
<jaxb:property name="TurnBasedApplicableCommandHandlers"/>
</xs:appinfo>
</xs:annotation>
<xs:all>
<xs:element ref="AbsoluteMovementCommands" minOccurs="0"/>
<xs:element ref="DiscreteMovementCommands" minOccurs="0"/>
<xs:element ref="InventoryCommands" minOccurs="0"/>
<xs:element ref="ChatCommands" minOccurs="0"/>
<xs:element ref="SimpleCraftCommands" minOccurs="0"/>
<xs:element ref="MissionQuitCommands" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:element name="AgentHandlers">
<xs:annotation>
<xs:documentation>
Defines the Mission Handlers block for an individual agent.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:group ref="AgentMissionHandlers" />
</xs:complexType>
</xs:element>
<xs:element name="ServerHandlers">
<xs:annotation>
<xs:documentation>
Defines the Mission Handlers block for the server.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:annotation>
<xs:appinfo>
<jaxb:property name="WorldGenerator"/>
</xs:appinfo>
</xs:annotation>
<xs:element ref="FlatWorldGenerator" />
<xs:element ref="FileWorldGenerator" />
<xs:element ref="DefaultWorldGenerator" />
<xs:element ref="BiomeGenerator" />
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<jaxb:property name="WorldDecorators"/>
</xs:appinfo>
</xs:annotation>
<xs:element ref="DrawingDecorator" />
<xs:element ref="AnimationDecorator" />
<xs:element ref="MazeDecorator" />
<xs:element ref="ClassroomDecorator" />
<xs:element ref="SnakeDecorator" />
<xs:element ref="MovingTargetDecorator" />
<xs:element ref="BuildBattleDecorator" />
<xs:element ref="NavigationDecorator" />
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<jaxb:property name="ServerQuitProducers"/>
</xs:appinfo>
</xs:annotation>
<xs:element ref="ServerQuitFromTimeUp"/>
<xs:element ref="ServerQuitWhenAnyAgentFinishes"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>