From de4cf564c91fb9ae21e7564c4b897d9e10a24f93 Mon Sep 17 00:00:00 2001 From: Robert Bendun Date: Sat, 19 Jun 2021 16:54:46 +0200 Subject: [PATCH 1/3] make them big --- src/img/shelves/FRIDGE_SHELF.svg | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/img/shelves/FRIDGE_SHELF.svg diff --git a/src/img/shelves/FRIDGE_SHELF.svg b/src/img/shelves/FRIDGE_SHELF.svg new file mode 100644 index 0000000..0529861 --- /dev/null +++ b/src/img/shelves/FRIDGE_SHELF.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + From 62bdd80e652b89e9505c335b82b5d11d3a44b988 Mon Sep 17 00:00:00 2001 From: s452693 Date: Mon, 21 Jun 2021 11:16:59 +0200 Subject: [PATCH 2/3] testCase neural-network2 --- src/neural_network.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/neural_network.py b/src/neural_network.py index e6e3957..89a1b06 100644 --- a/src/neural_network.py +++ b/src/neural_network.py @@ -130,7 +130,7 @@ def testing(n, testingSamples, testingLabels): print('Performance', scorecardArray.sum() / scorecardArray.size) testing(digitNetwork,dig_test_images,dig_test_labels) - +testing(letterNetwork,let_test_images,let_test_labels) li = [] ourOwnDataset = [] @@ -145,8 +145,14 @@ def testCase(inputWord): imgData = (imgData/255 * 0.99) + 0.01 #inputWord[i] word = word + recognizeLet(letterNetwork ,imgData) - word = word + recognizeNum(digitNetwork, inputWord[-2]) - word = word + recognizeNum(digitNetwork ,inputWord[-1]) + + i=len-2 + for i in range(i,len): + imgArray = imageio.imread(imageFileName, as_gray=True) + imgData = 255 - imgArray.reshape(784) + imgData = (imgData/255 * 0.99) + 0.01 + #inputWord[i] + word = word + recognizeNum(digitNetwork, imgData) #assert record_cache.shape == ourOwnDataset[0].shape @@ -234,5 +240,5 @@ print('slowo: ', word) ##################################### URUCHOMIENIE TRENINGU -trainNetwork(letterNetwork, "Lweights_test.npy", "Lhidden_test.npy", let_train_images, let_train_labels) +#trainNetwork(letterNetwork, "Lweights_test.npy", "Lhidden_test.npy", let_train_images, let_train_labels) # trainNetwork(digitNetwork, "Dweights_test.npy", "Dhidden_test.npy", let_train_images, let_train_labels) \ No newline at end of file From 820ca8512f610b7a1e672c57c35d7ca2249d2069 Mon Sep 17 00:00:00 2001 From: Robert Bendun Date: Mon, 21 Jun 2021 12:01:31 +0200 Subject: [PATCH 3/3] custom jobs --- src/logic/evolution.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/logic/evolution.js b/src/logic/evolution.js index c850a9d..36d4dbc 100644 --- a/src/logic/evolution.js +++ b/src/logic/evolution.js @@ -9,6 +9,7 @@ class Evolution extends Arrangement { this.setup(); this.productIndex = 0; this.productsAmount = [...Array(ShelfCount)].map(() => 0); + this.backlog = [] } generate() { @@ -77,7 +78,19 @@ class Evolution extends Arrangement { } } + addCustomJobRequest(productName, amount, x, y) { + this.backlog.push({ + product: productName, + amount, + x, y + }); + } + getJobRequest() { + if (this.backlog.length > 0) { + return this.backlog.pop() + } + if (this.productIndex > ShelfCount) return null;