From 6b9d7aa7a8e6c07ab911028b611ee4ba2205646c Mon Sep 17 00:00:00 2001 From: Antonio Andriella <aandriella@iri.upc.edu> Date: Tue, 15 Sep 2020 11:30:14 +0200 Subject: [PATCH] add BNs for user_action, user_react_time, robot_assistance, robot_feedback --- ...ersona_model.bif => user_action_model.bif} | 41 +------- bn_persona_model/user_react_time_model.bif | 95 +++++++++++++++++++ ...ot_model.bif => robot_assistive_model.bif} | 37 ++------ bn_robot_model/robot_feedback_model.bif | 77 +++++++++++++++ 4 files changed, 183 insertions(+), 67 deletions(-) rename bn_persona_model/{new_persona_model.bif => user_action_model.bif} (69%) create mode 100644 bn_persona_model/user_react_time_model.bif rename bn_robot_model/{robot_model.bif => robot_assistive_model.bif} (72%) create mode 100644 bn_robot_model/robot_feedback_model.bif diff --git a/bn_persona_model/new_persona_model.bif b/bn_persona_model/user_action_model.bif similarity index 69% rename from bn_persona_model/new_persona_model.bif rename to bn_persona_model/user_action_model.bif index 2245544..9868b44 100644 --- a/bn_persona_model/new_persona_model.bif +++ b/bn_persona_model/user_action_model.bif @@ -26,9 +26,7 @@ variable robot_feedback { variable user_action { type discrete [ 3 ] { correct, wrong, timeout }; } -variable user_react_time { - type discrete [ 3 ] { slow, normal, fast}; -} + %INDIVIDUAL PROBABILITIES DEFINITION probability ( robot_assistance ) { @@ -58,48 +56,13 @@ probability ( attention ) { probability ( robot_feedback ) { table 0.5, 0.5; } -probability (user_react_time) { - table 0.33, 0.33, 0.34 -} + probability ( reactivity | attention ) { (low) 0.7, 0.2, 0.1; (medium) 0.2, 0.5, 0.3; (high) 0.1, 0.2, 0.7; } - -probability (user_react_time | memory, reactivity) { -(low, slow) 0.2, 0.5, 0.3; -(low, medium) 0.3, 0.5, 0.2; -(low, fast) 0.4, 0.5, 0.1; -(medium, slow) 0.5, 0.3, 0.2; -(medium, medium) 0.55, 0.35, 0.1; -(medium, fast) 0.6, 0.4, 0.0; -(high, slow) 0.5, 0.4, 0.1; -(high, medium) 0.6, 0.3, 0.1; -(high, fast) 0.8, 0.2, 0.0; -} -probability (robot_feedback | user_react_time) { - (slow) 0.8, 0.2; - (normal) 0.5, 0.5; - (fast) 0.2, 0.8; -} -probability (robot_assistance | user_react_time) { - (slow) 0.05 0.1 0.15 0.3 0.4; - (normal) 0.4 0.3 0.2 0.05 0.05; - (fast) 0.4 0.4 0.1 0.05 0.05; -} -probability (game_state | user_react_time) { - (slow) 0.2, 0.4, 0.4; - (normal) 0.4, 0.4, 0.2; - (fast) 0.6, 0.3, 0.1; -} -probability (attempt | user_react_time) { - (slow) 0.1, 0.2, 0.3, 0.4; - (normal) 0.5, 0.3, 0.15, 0.05; - (fast) 0.4, 0.3, 0.2, 0.1; -} - probability (user_action | memory, reactivity) { (low, slow) 0.2, 0.5, 0.3; (low, medium) 0.3, 0.5, 0.2; diff --git a/bn_persona_model/user_react_time_model.bif b/bn_persona_model/user_react_time_model.bif new file mode 100644 index 0000000..0a8e42e --- /dev/null +++ b/bn_persona_model/user_react_time_model.bif @@ -0,0 +1,95 @@ +network persona_model { +} + +%VARIABLES DEFINITION +variable reactivity { + type discrete [3] {slow, medium, fast}; +} +variable memory { + type discrete[3] {low, medium, high}; +} +variable attention { + type discrete[3] {low, medium, high}; +} +variable robot_assistance { + type discrete [ 5 ] { lev_0, lev_1, lev_2, lev_3, lev_4 }; +} +variable attempt { + type discrete [ 4 ] { att_1, att_2, att_3, att_4 }; +} +variable game_state { + type discrete [ 3 ] { beg, mid, end }; +} +variable robot_feedback { + type discrete [ 2 ] { yes, no }; +} +variable user_react_time { + type discrete [ 3 ] { slow, normal, fast}; +} + +%INDIVIDUAL PROBABILITIES DEFINITION +probability ( robot_assistance ) { + table 0.2, 0.2, 0.2, 0.2, 0.2; +} +probability ( game_state ) { + table 0.34, 0.33, 0.33; +} +probability ( attempt ) { + table 0.25, 0.25, 0.25, 0.25; +} +#CPDS 4 #SPECIFICALLY FOR THE GIVEN PATIENT +probability ( reactivity ) { + table 0.34, 0.33, 0.33; +} +#CPDS 3 #SPECIFICALLY FOR THE GIVEN PATIENT +probability ( memory ) { + table 0.33, 0.33, 0.34; +} +#CPDS 1 #SPECIFICALLY FOR THE GIVEN PATIENT +probability ( attention ) { + table 0.33, 0.33, 0.34; +} +probability ( robot_feedback ) { + table 0.5, 0.5; +} +probability (user_react_time) { + table 0.33, 0.33, 0.34 +} +probability ( reactivity | attention ) { + (low) 0.7, 0.2, 0.1; + (medium) 0.2, 0.5, 0.3; + (high) 0.1, 0.2, 0.7; +} + + +probability (user_react_time | memory, reactivity) { +(low, slow) 0.2, 0.5, 0.3; +(low, medium) 0.3, 0.5, 0.2; +(low, fast) 0.4, 0.5, 0.1; +(medium, slow) 0.5, 0.3, 0.2; +(medium, medium) 0.55, 0.35, 0.1; +(medium, fast) 0.6, 0.4, 0.0; +(high, slow) 0.5, 0.4, 0.1; +(high, medium) 0.6, 0.3, 0.1; +(high, fast) 0.8, 0.2, 0.0; +} +probability (robot_feedback | user_react_time) { + (slow) 0.8, 0.2; + (normal) 0.5, 0.5; + (fast) 0.2, 0.8; +} +probability (robot_assistance | user_react_time) { + (slow) 0.05 0.1 0.15 0.3 0.4; + (normal) 0.4 0.3 0.2 0.05 0.05; + (fast) 0.4 0.4 0.1 0.05 0.05; +} +probability (game_state | user_react_time) { + (slow) 0.2, 0.4, 0.4; + (normal) 0.4, 0.4, 0.2; + (fast) 0.6, 0.3, 0.1; +} +probability (attempt | user_react_time) { + (slow) 0.1, 0.2, 0.3, 0.4; + (normal) 0.5, 0.3, 0.15, 0.05; + (fast) 0.4, 0.3, 0.2, 0.1; +} diff --git a/bn_robot_model/robot_model.bif b/bn_robot_model/robot_assistive_model.bif similarity index 72% rename from bn_robot_model/robot_model.bif rename to bn_robot_model/robot_assistive_model.bif index 46ba779..6b87e01 100644 --- a/bn_robot_model/robot_model.bif +++ b/bn_robot_model/robot_assistive_model.bif @@ -1,4 +1,4 @@ -network robot_model { +network robot_assistive_model { } %VARIABLES DEFINITION @@ -9,10 +9,7 @@ variable memory { type discrete[3] {low, medium, high}; } variable robot_assistance { - type discrete [ 5 ] { lev_0, lev_1, lev_2, lev_3, lev_4}; -} -variable robot_feedback { - type discrete [ 2 ] { no, yes }; + type discrete [ 6 ] { lev_0, lev_1, lev_2, lev_3, lev_4, lev_5}; } variable attempt { type discrete [ 4 ] { att_1, att_2, att_3, att_4 }; @@ -27,10 +24,7 @@ variable user_capability { %INDIVIDUAL PROBABILITIES DEFINITION probability ( robot_assistance ) { - table 0.2, 0.2, 0.2, 0.2, 0.2; -} -probability ( robot_feedback ) { - table 0.5, 0.5; + table 0.16, 0.17, 0.17, 0.17, 0.16, 0.17; } probability ( game_state ) { table 0.34, 0.33, 0.33; @@ -69,15 +63,9 @@ probability (user_capability | memory, reactivity) { } probability (robot_assistance | user_capability) { -(very_mild) 0.4, 0.3, 0.2, 0.1, 0.0; -(mild) 0.2, 0.3, 0.3, 0.1, 0.1; -(severe) 0.1, 0.1, 0.3, 0.3, 0.2; -} - -probability (robot_feedback | user_capability) { -(very_mild) 0.2, 0.8; -(mild) 0.5, 0.5; -(severe) 0.8, 0.2; +(very_mild) 0.4, 0.3, 0.2, 0.1, 0.0, 0.0; +(mild) 0.2, 0.3, 0.3, 0.1, 0.05, 0.05; +(severe) 0.0, 0.05, 0.25, 0.3, 0.2, 0.2; } probability (game_state | robot_assistance) { @@ -86,6 +74,7 @@ probability (game_state | robot_assistance) { (lev_2) 0.4, 0.3, 0.3; (lev_3) 0.4, 0.3, 0.3; (lev_4) 0.5, 0.4, 0.1; +(lev_5) 0.5, 0.4, 0.1; } probability (attempt | robot_assistance) { @@ -94,13 +83,5 @@ probability (attempt | robot_assistance) { (lev_2) 0.2, 0.2, 0.2, 0.4; (lev_3) 0.25, 0.25, 0.25, 0.25; (lev_4) 0.1, 0.25, 0.25, 0.4; -} - -probability (game_state | robot_feedback) { -(no) 0.2, 0.4, 0.4; -(yes) 0.4, 0.4, 0.2; -} -probability (attempt | robot_feedback) { -(no) 0.1,0.15, 0.25, 0.5; -(yes) 0.4, 0.3, 0.2, 0.1; -} +(lev_5) 0.1, 0.25, 0.25, 0.4; +} \ No newline at end of file diff --git a/bn_robot_model/robot_feedback_model.bif b/bn_robot_model/robot_feedback_model.bif new file mode 100644 index 0000000..77b0338 --- /dev/null +++ b/bn_robot_model/robot_feedback_model.bif @@ -0,0 +1,77 @@ +network robot_feedback_model { +} + +%VARIABLES DEFINITION +variable reactivity { + type discrete [3] {slow, medium, fast}; +} +variable memory { + type discrete[3] {low, medium, high}; +} +variable robot_feedback { + type discrete [ 2 ] { no, yes }; +} +variable attempt { + type discrete [ 4 ] { att_1, att_2, att_3, att_4 }; +} +variable game_state { + type discrete [ 3 ] { beg, mid, end }; +} + +variable user_capability { + type discrete [ 3 ] { very_mild, mild, severe }; +} + +%INDIVIDUAL PROBABILITIES DEFINITION +probability ( robot_feedback ) { + table 0.5, 0.5; +} +probability ( game_state ) { + table 0.34, 0.33, 0.33; +} +probability ( attempt ) { + table 0.25, 0.25, 0.25, 0.25; +} +probability ( user_capability ) { + table 0.33, 0.33, 0.34; +} +#CPDS 4 #SPECIFICALLY FOR THE GIVEN PATIENT +probability ( reactivity ) { + table 0.34, 0.33, 0.33; +} +#CPDS 3 #SPECIFICALLY FOR THE GIVEN PATIENT +probability ( memory ) { + table 0.33, 0.33, 0.34; +} + +#Conditional Probabilities + +#CPDS X (very_mild, mild, severe) +probability (user_capability | memory, reactivity) { +(low, slow) 0.1, 0.2, 0.7; +(medium, slow) 0.2, 0.6, 0.2; +(high, slow) 0.7, 0.2, 0.1; + +(low, medium) 0.1, 0.3, 0.6; +(medium, medium) 0.3, 0.6, 0.1; +(high, medium) 0.1, 0.4, 0.5; + +(low, fast) 0.3, 0.2, 0.5; +(medium, fast) 0.7, 0.2, 0.1; +(high, fast) 0.8, 0.1, 0.1; +} + +probability (robot_feedback | user_capability) { +(very_mild) 0.2, 0.8; +(mild) 0.5, 0.5; +(severe) 0.8, 0.2; +} + +probability (game_state | robot_feedback) { +(no) 0.2, 0.4, 0.4; +(yes) 0.4, 0.4, 0.2; +} +probability (attempt | robot_feedback) { +(no) 0.1,0.15, 0.25, 0.5; +(yes) 0.4, 0.3, 0.2, 0.1; +} -- GitLab