From 14729f2295898a3143bc79ada224a97f8055355a Mon Sep 17 00:00:00 2001 From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch> Date: Mon, 27 May 2019 15:38:41 +0200 Subject: [PATCH] demo --- env-data/railway/example_network_003.pkl | Bin 250 -> 556 bytes examples/demo.py | 7 ++++- notebooks/Editor2.ipynb | 33 +++++++++-------------- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/env-data/railway/example_network_003.pkl b/env-data/railway/example_network_003.pkl index ae8a74fd50fb1936746fbc9ab852cd4350de1e40..658db6388315948bb1cfeb7dca6891f24cd4961f 100644 GIT binary patch literal 556 zcmZo(l3tXVGV2b5B+FSAM(jw40S(|)&EkpO6s)E*G62m&GabRjYtN{w5CH{b;S0yL ziRr0%CB^Z@C5a`O$<roJVqj#P#3(U&5+f^+7N0zc8OUb=@>zg<79gJu$Y%%g*@1j^ J@nsP0699@Rbh`im delta 84 zcmZ3(@{5tZc}aRvX3Erwjk*(e2~Ix1$TD%R(ByhX9TpbGvtpBZ8I>44Ci5|>s;^B< kPt7YSjxR1rEXhosG<gyuBjY3{iOG|gn1QtTGKlm90OF+_cK`qY diff --git a/examples/demo.py b/examples/demo.py index 9abfa59..be2654c 100644 --- a/examples/demo.py +++ b/examples/demo.py @@ -147,9 +147,14 @@ class Demo: if True: if not ((step) % 2 == 0): - if iAgent % 2 == 1: + if iAgent == 3: action = 0 + if not ((step) % 2 == 0): + if iAgent == 4: + action = 0 + + if False: agent = self.env.agents[iAgent] trial = 0 diff --git a/notebooks/Editor2.ipynb b/notebooks/Editor2.ipynb index 1ed1be6..367bd12 100644 --- a/notebooks/Editor2.ipynb +++ b/notebooks/Editor2.ipynb @@ -9,18 +9,9 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The autoreload extension is already loaded. To reload it, use:\n", - " %reload_ext autoreload\n" - ] - } - ], + "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" @@ -28,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -41,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -63,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -72,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -107,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 6, "metadata": { "scrolled": false }, @@ -115,7 +106,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "d412a331f4af4b61a680cc7e79265499", + "model_id": "95562eba9d7b4a2794d8d65721413e04", "version_major": 2, "version_minor": 0 }, @@ -133,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 7, "metadata": { "scrolled": false }, @@ -141,7 +132,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "125052fec212492e96b6114be02fdce0", + "model_id": "0fe475488df94151afbfe8dc1e1050e8", "version_major": 2, "version_minor": 0 }, @@ -160,7 +151,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -169,7 +160,7 @@ "(0, 0)" ] }, - "execution_count": 24, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } -- GitLab