PolicyX file format documentation
Table of Contents
1. Overview
2. PolicyX Tutorial 2.1. Example PolicyX document 2.2. File format structure 2.2.1. <Policy> Tag 2.2.2. <AlphaVector> Tag 2.2.3. <Vector> Tag 2.2.4. <SparseVector> Tag 2.2.5. <Entry> Tag 2.2.6. <DAG> Tag 3. References 4. Appendix A 5. Appendix B 1. Overview
PolicyX is an XML file format for specifying POMDP and MOMDP[1] policy computed by an offline solver. PolicyX can specify alpha vector policy or policy graph (not implemented yet). 2. PolicyX Tutorial
The purpose of this section is to provide a tutorial-like approach to using the PolicyX format. 2.1. Example PolicyX document
<?xml version="1.0" encoding="ISO-8859-1"?> <Policy version="0.1" type="value" model="RockSampleSimple.pomdpx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="policyx.xsd"> <AlphaVector vectorLength="2" numObsValue="3" numVectors="6"> <Vector action="1" obsValue="0">9.5 9.5 </Vector> <Vector action="3" obsValue="0">19.025 -0.975 </Vector> <Vector action="2" obsValue="0">18.0737 9.025 </Vector> <Vector action="1" obsValue="1">10 10 </Vector> <Vector action="0" obsValue="1">17.1701 8.57375 </Vector> <Vector action="3" obsValue="2">0 0 </Vector> </AlphaVector> </Policy> 2.2. File format structure
The first line of the document is an XML processing instruction which defines that the document adheres to the XML 1.0 standard and that the encoding of the document is ISO-8859-1. Other encodings such as UTF-8 are also possible. It is followed by the root element Example <?xml version="1.0" encoding="ISO-8859-1"?> 2.2.1. <Policy> Tag
The second line of the document is the
The Example <Policy version="0.1" type="value" model="RockSampleSimple.pomdpx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="policyx.xsd"> 2.2.2. <AlphaVector> Tag
This tag contains the pool of alpha vectors that form the policy as child elements. Its child elements can be either
Example <AlphaVector vectorLength="2" numObsValue="3" numVectors="6"> <Vector action="1" obsValue="0">9.5 9.5 </Vector> <Vector action="3" obsValue="0">19.025 -0.975 </Vector> ... <Vector action="3" obsValue="2">0 0 </Vector> </AlphaVector> 2.2.3. <Vector> Tag
The <Vector> tag specifies a single alpha vector as a list of floating point numbers within the tag. The number of floating point entries in the tag must be the same as
Example <Vector action="2" obsValue="0">18.0737 9.025 </Vector> 2.2.4. <SparseVector> Tag
This tag specifies a single alpha vector as a list of index, value pair in its children elements. Entries whose indice are not specified within the tag are assumed to be zero. This is useful when many of the entries in the alpha vector are zero. The Example <SparseVector action="1" obsValue="0"> <Entry>0 9.5</Entry> <Entry>1 9.5</Entry> </SparseVector> 2.2.5. <Entry> Tag
This tag is the child element of Example <Entry>1 9.5</Entry> 2.2.6. <DAG> Tag
This tag specifies the policy graph. It is not implemented yet. 3. References
[1] S.C.W. Ong, S.W. Png, D. Hsu, and W.S. Lee. POMDPs for robotic tasks with mixed observability. In Proc. Robotics: Science and Systems, 2009. 4. Appendix A
Policy file for RockSample problem with alpha vectors specified in dense format using <?xml version="1.0" encoding="ISO-8859-1"?> <Policy version="0.1" type="value" model="RockSampleSimple.pomdpx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="policyx.xsd"> <AlphaVector vectorLength="2" numObsValue="3" numVectors="6"> <Vector action="1" obsValue="0">9.5 9.5 </Vector> <Vector action="3" obsValue="0">19.025 -0.975 </Vector> <Vector action="2" obsValue="0">18.0737 9.025 </Vector> <Vector action="1" obsValue="1">10 10 </Vector> <Vector action="0" obsValue="1">17.1701 8.57375 </Vector> <Vector action="3" obsValue="2">0 0 </Vector> </AlphaVector> </Policy> 5. Appendix B
Policy file for RockSample problem with alpha vectors specified in sparse format using <?xml version="1.0" encoding="ISO-8859-1"?> <Policy version="0.1" type="value" model="RockSampleSimple.pomdpx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="policyx.xsd"> <AlphaVector vectorLength="2" numObsValue="3" numVectors="6"> <SparseVector action="1" obsValue="0"> <Entry>0 9.5</Entry> <Entry>1 9.5</Entry> </SparseVector> <SparseVector action="3" obsValue="0"> <Entry>0 19.025</Entry> <Entry>1 -0.975</Entry> </SparseVector> <SparseVector action="2" obsValue="0"> <Entry>0 18.0737</Entry> <Entry>1 9.025</Entry> </SparseVector> <SparseVector action="1" obsValue="1"> <Entry>0 10</Entry> <Entry>1 10</Entry> </SparseVector> <SparseVector action="0" obsValue="1"> <Entry>0 17.1701</Entry> <Entry>1 8.57375</Entry> </SparseVector> <SparseVector action="3" obsValue="2" /> </AlphaVector> </Policy> |