Skip to content

Commit

Permalink
Merge pull request #111 from moves-rwth/88-visualization-small-improv…
Browse files Browse the repository at this point in the history
…ements

88 visualization small improvements
  • Loading branch information
YouGuessedMyName authored Oct 12, 2024
2 parents 571be0b + 952d22f commit ba9ac9e
Show file tree
Hide file tree
Showing 12 changed files with 576 additions and 128 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Docs

on:
# Runs on pushes targeting the default branch
# Runs on pushes targeting the default branch and pull requests.
push:
branches: [main]
pull_request:
types: [opened, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand Down
202 changes: 202 additions & 0 deletions docs/getting_started/layouts/lion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"__fake_macros": {
"__group_macro": {
"borderWidth": 1,
"color": {
"background": "white",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "ellipse",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
}
},
"groups": {
"states": {
"borderWidth": 1,
"color": {
"background": "#f5c211",
"border": "#c64600",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "ellipse",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
},
"actions": {
"borderWidth": 1,
"color": {
"background": "lightblue",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "box",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
},
"scheduled_actions": {
"borderWidth": 1,
"color": {
"background": "pink",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "box",
"mass": 1,
"font": {
"color": "black",
"size": 14
},
"schedColor": false
},
"dead...": {
"borderWidth": 1,
"color": {
"background": "#c0bfbc",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "ellipse",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
},
"hunt_>:D": {
"borderWidth": 1,
"color": {
"background": "#2ec27e",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "ellipse",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
},
"desparate_hunt!": {
"borderWidth": 1,
"color": {
"background": "#ff7800",
"border": "black",
"highlight": {
"background": "white",
"border": "red"
}
},
"shape": "ellipse",
"mass": 1,
"font": {
"color": "black",
"size": 14
}
}
},
"reload_button": false,
"edges": {
"arrows": "to",
"font": {
"color": "black",
"size": 14
},
"color": {
"color": "black"
}
},
"numbers": {
"fractions": true,
"digits": 5
},
"results_and_rewards": {
"show_results": true,
"resultSymbol": "\u2606",
"show_rewards": true
},
"layout": {
"randomSeed": 5
},
"misc": {
"enable_physics": true,
"width": 590,
"height": 406,
"explore": false
},
"saving": {
"relative_path": true,
"filename": "layouts/lion.json",
"save_button": false,
"load_button": false
},
"positions": {
"0": {
"x": -218,
"y": 28
},
"1": {
"x": -28,
"y": 57
},
"2": {
"x": -79,
"y": -14
},
"3": {
"x": -86,
"y": -156
},
"4": {
"x": 147,
"y": -37
},
"5": {
"x": -386,
"y": 109
},
"6": {
"x": 24,
"y": -96
},
"7": {
"x": 81,
"y": 69
},
"8": {
"x": 126,
"y": 205
}
},
"width": 590,
"height": 406,
"physics": true
}
File renamed without changes.
202 changes: 202 additions & 0 deletions docs/getting_started/naive_value_iteration.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/getting_started/study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"id": "0df1511e-565d-45d0-93a8-adafbfaaaefa",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d673e36704814ff59e7e9c999902ffc4",
"model_id": "d8b71e94965543fc92c59437ff6c4489",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -175,20 +175,20 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ae30b918c5214b7faea5cfc7a687c434",
"model_id": "84ad206256ae434e9b55a402cbd0eb85",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Output(outputs=({'output_type': 'display_data', 'data': {'text/plain': '<IPython.core.display.H\u2026"
"HBox(children=(Output(), Output()))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"vis = show(mdp, show_editor=True, layout=Layout(\"pinkgreen.json\"))"
"vis = show(mdp, show_editor=True, layout=Layout(\"layouts/pinkgreen.json\"))"
]
},
{
Expand Down
46 changes: 4 additions & 42 deletions notebooks/die.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"import stormvogel.model\n",
"import stormvogel.visualization\n",
"import stormvogel.show\n",
"from stormvogel.layout import Layout, DEFAULT"
"from stormvogel.layout import Layout, DEFAULT\n",
"import stormvogel.communication_server\n",
"stormvogel.communication_server.enable_server = False"
]
},
{
Expand All @@ -27,47 +29,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3b2d5727b3a74236a45600fa7d8aa4d0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<script>fetch('http://127.0.0.1:8889/efoCcmTuNX/MESSAGE/' + 'test message')</script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Stormvogel succesfully started the internal communication server, but could not receive the result of a test request.\n",
"Stormvogel is still usable without this, but you will not be able to save node positions in a layout json file.\n",
"1) Restart the kernel and re-run.\n",
"2) Is the port 127.0.0.1:8889 (from the machine where jupyterlab runs) available?\n",
"If you are working remotely, it might help to forward this port. For example: 'ssh -N -L 8889:127.0.0.18889 YOUR_SSH_CONFIG_NAME'.\n",
"3) You might also want to consider changing stormvogel.communication_server.localhost_address to the IPv6 loopback address if you are using IPv6.\n",
"If you cannot get the server to work, set stormvogel.communication_server.enable_server to false and re-run. This will speed up stormvogel and ignore this message.\n",
"Please contact the stormvogel developpers if you keep running into issues.\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4c4abfce6430466eacdc01431e398f70",
"model_id": "e474efd2c4d741d7bb54ae89c3fbc78c",
"version_major": 2,
"version_minor": 0
},
Expand Down
Loading

0 comments on commit ba9ac9e

Please sign in to comment.