1
1
pomdp2json
2
2
==========
3
3
4
- This is a converter from Anthony Cassandra's (Tony's) [ POMDP File
5
- Format] ( http://www.pomdp.org/code/pomdp-file-spec.html ) to JSON. I've spent an
6
- entire morning (my mornings are long) trying to load a POMDP files into Python.
4
+ This is a converter from Anthony Cassandra's (Tony's) ** [ POMDP File
5
+ Format] ( http://www.pomdp.org/code/pomdp-file-spec.html ) to JSON** . I've spent an
6
+ entire morning (my mornings are long) trying to load a POMDP file into Python.
7
7
The existing tools are incomplete or hidden in large repositories or give me
8
8
compilation headaches. I don't want anyone else to have to spend an entire
9
9
morning, so I'm writing this tool that gives you a JSON file that can be read
@@ -18,8 +18,8 @@ POMDP file, it will produce a JSON file with the following contents:
18
18
- Observation probability matrix: ` |A| x |S| x |O|: [at, st+1, ot+1] `
19
19
- Reward matrix: ` |S| x |A|: [st, at] `
20
20
21
- Where is it incomplete? The POMDP format allows the reward to depend on action,
22
- state before action, state after action and observation. I leave out the
21
+ Where is it ** incomplete** ? The POMDP format allows the ** reward** to depend on
22
+ action, state before action, state after action and observation. I leave out the
23
23
dependency on state after action and observation, because I don't need it. It
24
24
will be easy to add later if anyone needs it.
25
25
@@ -30,8 +30,8 @@ Compiling
30
30
$ cat build.sh # See that it's small and benign.
31
31
$ ./build.sh
32
32
33
- You might need to install development tools like gcc before you can compile. Let
34
- me know if you have any difficulties.
33
+ You might need to ** install** development tools like CMake or gcc before you can
34
+ compile. ** Let me know if you have any difficulties.**
35
35
36
36
37
37
Usage
@@ -46,8 +46,8 @@ Based on: pyrl.environments.libPOMDP
46
46
I'm reusing a Python interface and compilation setup from Will Dabney's
47
47
[ python-rl] ( https://github.com/amarack/python-rl ) . All files except
48
48
` pomdp2json.py ` stem from the directory
49
- [ libPOMDP] ( https://github.com/amarack/python-rl/tree/a1c1f5bc42cb20f5d9630818d1908f2100916ef4/pyrl/environments/libPOMDP )
50
- . Here's Will's description:
49
+ [ libPOMDP] ( https://github.com/amarack/python-rl/tree/a1c1f5bc42cb20f5d9630818d1908f2100916ef4/pyrl/environments/libPOMDP ) .
50
+ Here is Will's description:
51
51
52
52
> This is primarily code from pomdp-solve written by Anthony R. Cassandra. I've only added a
53
53
> new makefile, which is not as sophisticated as the original, and some code to allow the whole thing
@@ -70,8 +70,8 @@ doesn't stick to that, pomdp2json will raise an exception.
70
70
What can you do? In general, there is no easy way to convert a POMDP with a
71
71
R(st, at, st+1, ot+1) reward function to a POMDP with a R(st, at) reward
72
72
function. There might be a sophisticated way that I don't know. But there are
73
- also easy cases where you can fiddle with the original POMDP file. For example,
74
- ` hallway.POMDP ` defines this reward function:
73
+ also easy cases where you can ** fiddle with the original POMDP file** . For
74
+ example, ` hallway.POMDP ` defines this reward function:
75
75
76
76
```
77
77
# Rewards
@@ -92,8 +92,8 @@ R: * : 59 : * : * 1.000000
92
92
```
93
93
94
94
…then the POMDP (file) will be compatible with pomdp2json and in turn with tools
95
- like [ piglet_pbvi] ( https://github.com/rmoehn/piglet_pbvi ) . Is it the same POMDP
96
- as the original? Maybe not. But I guess it's almost the same.
95
+ like [ piglet_pbvi] ( https://github.com/rmoehn/piglet_pbvi ) . Is it the ** same
96
+ POMDP as the original?** Maybe not. But I guess it's almost the same.
97
97
98
98
99
99
To do
0 commit comments