From 73d760c40c2246b7ef4369dadbed6d0d1ad58856 Mon Sep 17 00:00:00 2001 From: Niko Date: Wed, 14 Jun 2023 15:38:32 +0200 Subject: [PATCH] dynamic change of the metric parameters --- ActiveBOWeb/src/components/ControlPanel.vue | 52 ++++++++++++--------- ActiveBOWeb/src/components/RosBar.vue | 2 + ActiveBOWeb/src/components/WeightTuner.vue | 15 +++++- ActiveBOWeb/src/store/ControlStore.js | 13 ++++-- ActiveBOWeb/src/store/PolicyStore.js | 3 ++ 5 files changed, 57 insertions(+), 28 deletions(-) diff --git a/ActiveBOWeb/src/components/ControlPanel.vue b/ActiveBOWeb/src/components/ControlPanel.vue index d0eb961..db96515 100644 --- a/ActiveBOWeb/src/components/ControlPanel.vue +++ b/ActiveBOWeb/src/components/ControlPanel.vue @@ -19,7 +19,7 @@ v-model="maxStepComp" :step="1" :min="10" - :max="200" + :max="500" thumb-label /> - - - + + + + + + + + - +
+
@@ -44,9 +46,18 @@ const updateWeight = (index, newValue) => { height: 140px; } .weight-container { - height: 140px; + height: 180px; display: flex; + flex-direction: column; + justify-content: space-between; align-items: center; - justify-content: center; +} +.slider-margin-bottom { + margin-bottom: 0; /* adjust this value as necessary */ +} +.checkbox-bottom { + //position: absolute; + //bottom: 0; + padding: 5px 0 0 0; } diff --git a/ActiveBOWeb/src/store/ControlStore.js b/ActiveBOWeb/src/store/ControlStore.js index 0a09663..b269dde 100644 --- a/ActiveBOWeb/src/store/ControlStore.js +++ b/ActiveBOWeb/src/store/ControlStore.js @@ -6,12 +6,18 @@ export const useCStore = defineStore("Control Store", { env: "Mountain Car", envs: ["Mountain Car", "Cartpole", "Acrobot", "Pendulum"], metric: "random", - metrics: ["random", "regular", "max_acquisition", "improvement"], + metrics: ["random", "regular", "improvement", "max_acquisition"], + metrics_label: { + random: "Probability", + regular: "Repetition", + improvement: "Improvement Threshold", + max_acquisition: "Threshold", + }, metric_limits: { random: [0.0, 1.0, 0.01], regular: [1, 100, 1], + improvement: [0.0, 1.0, 0.01], max_acquisition: [1, 200, 1], - improvement: [1, 100, 1], }, acq_fun: "Expected Improvement", acq_funs: [ @@ -22,11 +28,12 @@ export const useCStore = defineStore("Control Store", { nr_episodes: 50, nr_runs: 10, metric_parameter: 0.5, - metric_parameter2: 0.5, + improvement_2: 5, sendWeights: false, runner: false, fixed_seed: false, save_result: false, + overwrite: false, }; }, getters: { diff --git a/ActiveBOWeb/src/store/PolicyStore.js b/ActiveBOWeb/src/store/PolicyStore.js index bfdef49..c09636d 100644 --- a/ActiveBOWeb/src/store/PolicyStore.js +++ b/ActiveBOWeb/src/store/PolicyStore.js @@ -6,6 +6,7 @@ export const usePStore = defineStore("Policy Store", { policy: Array(10).fill(0), nr_weights: 5, weights: [0, 0, 0, 0, 0], + weights_fixed: [false, false, false, false, false], max_steps: 100, trigger: false, }; @@ -13,6 +14,7 @@ export const usePStore = defineStore("Policy Store", { getters: { getPolicy: (state) => state.policy, getNrWeights: (state) => state.nr_weights, + getWeights_Fixed: (state) => state.weights_fixed, getWeights: (state) => state.weights, getMaxSteps: (state) => state.max_steps, getTrigger: (state) => state.trigger, @@ -25,6 +27,7 @@ export const usePStore = defineStore("Policy Store", { setNrWeights(value) { this.nr_weights = value; this.weights = Array(this.nr_weights).fill(0); + this.weights_fixed = Array(this.nr_weights).fill(false); this.trigger = !this.trigger; }, setWeights(value) {