|
@ -31,7 +31,7 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"cell_type": "code", |
|
|
"cell_type": "code", |
|
|
"execution_count": 1, |
|
|
|
|
|
|
|
|
"execution_count": null, |
|
|
"metadata": { |
|
|
"metadata": { |
|
|
"hide-output": false, |
|
|
"hide-output": false, |
|
|
"scrolled": true |
|
|
"scrolled": true |
|
@ -59,86 +59,12 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"cell_type": "code", |
|
|
"cell_type": "code", |
|
|
"execution_count": 2, |
|
|
|
|
|
|
|
|
"execution_count": null, |
|
|
"metadata": { |
|
|
"metadata": { |
|
|
"hide-output": false, |
|
|
"hide-output": false, |
|
|
"scrolled": true |
|
|
"scrolled": true |
|
|
}, |
|
|
}, |
|
|
"outputs": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"name": "stdout", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"State 0 is initial\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 1\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 2\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 3\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 4\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 5\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 6\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 7\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 8\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 9\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 10\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 11\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 12\n", |
|
|
|
|
|
"From state 0 by action 0, with probability 0.07692307692307693, go to state 13\n", |
|
|
|
|
|
"From state 1 by action 0, with probability 1.0, go to state 2\n", |
|
|
|
|
|
"From state 1 by action 1, with probability 1.0, go to state 1\n", |
|
|
|
|
|
"From state 1 by action 2, with probability 1.0, go to state 1\n", |
|
|
|
|
|
"From state 1 by action 3, with probability 1.0, go to state 6\n", |
|
|
|
|
|
"From state 2 by action 0, with probability 1.0, go to state 3\n", |
|
|
|
|
|
"From state 2 by action 1, with probability 1.0, go to state 1\n", |
|
|
|
|
|
"From state 2 by action 2, with probability 1.0, go to state 2\n", |
|
|
|
|
|
"From state 2 by action 3, with probability 1.0, go to state 2\n", |
|
|
|
|
|
"From state 3 by action 0, with probability 1.0, go to state 4\n", |
|
|
|
|
|
"From state 3 by action 1, with probability 1.0, go to state 2\n", |
|
|
|
|
|
"From state 3 by action 2, with probability 1.0, go to state 3\n", |
|
|
|
|
|
"From state 3 by action 3, with probability 1.0, go to state 7\n", |
|
|
|
|
|
"From state 4 by action 0, with probability 1.0, go to state 5\n", |
|
|
|
|
|
"From state 4 by action 1, with probability 1.0, go to state 3\n", |
|
|
|
|
|
"From state 4 by action 2, with probability 1.0, go to state 4\n", |
|
|
|
|
|
"From state 4 by action 3, with probability 1.0, go to state 4\n", |
|
|
|
|
|
"From state 5 by action 0, with probability 1.0, go to state 5\n", |
|
|
|
|
|
"From state 5 by action 1, with probability 1.0, go to state 4\n", |
|
|
|
|
|
"From state 5 by action 2, with probability 1.0, go to state 5\n", |
|
|
|
|
|
"From state 5 by action 3, with probability 1.0, go to state 8\n", |
|
|
|
|
|
"From state 6 by action 0, with probability 1.0, go to state 6\n", |
|
|
|
|
|
"From state 6 by action 1, with probability 1.0, go to state 6\n", |
|
|
|
|
|
"From state 6 by action 2, with probability 1.0, go to state 1\n", |
|
|
|
|
|
"From state 6 by action 3, with probability 1.0, go to state 9\n", |
|
|
|
|
|
"From state 7 by action 0, with probability 1.0, go to state 7\n", |
|
|
|
|
|
"From state 7 by action 1, with probability 1.0, go to state 7\n", |
|
|
|
|
|
"From state 7 by action 2, with probability 1.0, go to state 3\n", |
|
|
|
|
|
"From state 7 by action 3, with probability 1.0, go to state 10\n", |
|
|
|
|
|
"From state 8 by action 0, with probability 1.0, go to state 8\n", |
|
|
|
|
|
"From state 8 by action 1, with probability 1.0, go to state 8\n", |
|
|
|
|
|
"From state 8 by action 2, with probability 1.0, go to state 5\n", |
|
|
|
|
|
"From state 8 by action 3, with probability 1.0, go to state 11\n", |
|
|
|
|
|
"From state 9 by action 0, with probability 1.0, go to state 9\n", |
|
|
|
|
|
"From state 9 by action 1, with probability 1.0, go to state 9\n", |
|
|
|
|
|
"From state 9 by action 2, with probability 1.0, go to state 6\n", |
|
|
|
|
|
"From state 9 by action 3, with probability 1.0, go to state 12\n", |
|
|
|
|
|
"From state 10 by action 0, with probability 1.0, go to state 10\n", |
|
|
|
|
|
"From state 10 by action 1, with probability 1.0, go to state 10\n", |
|
|
|
|
|
"From state 10 by action 2, with probability 1.0, go to state 7\n", |
|
|
|
|
|
"From state 10 by action 3, with probability 1.0, go to state 14\n", |
|
|
|
|
|
"From state 11 by action 0, with probability 1.0, go to state 10\n", |
|
|
|
|
|
"From state 11 by action 1, with probability 1.0, go to state 10\n", |
|
|
|
|
|
"From state 11 by action 2, with probability 1.0, go to state 8\n", |
|
|
|
|
|
"From state 11 by action 3, with probability 1.0, go to state 13\n", |
|
|
|
|
|
"From state 12 by action 0, with probability 1.0, go to state 12\n", |
|
|
|
|
|
"From state 12 by action 1, with probability 1.0, go to state 12\n", |
|
|
|
|
|
"From state 12 by action 2, with probability 1.0, go to state 9\n", |
|
|
|
|
|
"From state 12 by action 3, with probability 1.0, go to state 12\n", |
|
|
|
|
|
"From state 13 by action 0, with probability 1.0, go to state 13\n", |
|
|
|
|
|
"From state 13 by action 1, with probability 1.0, go to state 13\n", |
|
|
|
|
|
"From state 13 by action 2, with probability 1.0, go to state 11\n", |
|
|
|
|
|
"From state 13 by action 3, with probability 1.0, go to state 13\n", |
|
|
|
|
|
"From state 14 by action 0, with probability 1.0, go to state 14\n" |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
"outputs": [], |
|
|
"source": [ |
|
|
"source": [ |
|
|
">>> for state in model.states:\n", |
|
|
">>> for state in model.states:\n", |
|
|
"... if state.id in model.initial_states:\n", |
|
|
"... if state.id in model.initial_states:\n", |
|
@ -197,20 +123,12 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"cell_type": "code", |
|
|
"cell_type": "code", |
|
|
"execution_count": 3, |
|
|
|
|
|
|
|
|
"execution_count": null, |
|
|
"metadata": { |
|
|
"metadata": { |
|
|
"hide-output": false, |
|
|
"hide-output": false, |
|
|
"scrolled": true |
|
|
"scrolled": true |
|
|
}, |
|
|
}, |
|
|
"outputs": [ |
|
|
|
|
|
{ |
|
|
|
|
|
"name": "stdout", |
|
|
|
|
|
"output_type": "stream", |
|
|
|
|
|
"text": [ |
|
|
|
|
|
"ModelType.MDP\n" |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
"outputs": [], |
|
|
"source": [ |
|
|
"source": [ |
|
|
">>> print(model.model_type)" |
|
|
">>> print(model.model_type)" |
|
|
] |
|
|
] |
|
|