Skip to content
Snippets Groups Projects
Commit e889bcb6 authored by Antonio Andriella's avatar Antonio Andriella
Browse files

add close file to fix bug

parent a019f432
No related branches found
No related tags found
No related merge requests found
Showing
with 87 additions and 9 deletions
user_action,game_state,attempt,agent_assistance
2,0,0,0
0,0,1,1
2,0,0,2
0,0,1,1
2,1,0,0
0,1,1,3
2,1,0,1
0,1,1,2
0,2,0,2
cum_elapsed_time,to,cum_react_time,from,timeout,user_action,token_id,caregiver_feedback,avg_caregiver_assistance_per_move,attempt
with_feedback,objective,session,user_id,timeout
True,descending_odd,1,1,15
game_state,user_action,attempt,caregiver_feedback,react_time,caregiver_assistance,user_react_time,from,elapsed_time,to,timeout,token_id
0,2,0,0,15,0,0,,0,,0,
tot_elapsed_time,avg_lev_assistance,tot_react_time,n_timeout,n_attempt,n_sociable
user_action,game_state,attempt,agent_assistance
1,0,0,0
2,0,1,1
0,0,2,2
2,0,0,1
0,0,1,2
2,1,0,1
0,1,1,2
2,1,0,1
1,1,1,2
0,1,2,3
0,2,0,1
cum_elapsed_time,to,cum_react_time,from,timeout,user_action,token_id,caregiver_feedback,avg_caregiver_assistance_per_move,attempt
0.916,1,6.416,8,1,,565,0,0.0,3
0.772,2,0.785,6,2,,499,0,0.0,2
0.475,3,7.12,9,3,,321,0,0.0,2
0.99,4,2.044,18,4,,311,0,0.0,3
0.0,5,0.0,15,4,,177,0,0.0,1
with_feedback,objective,session,user_id,timeout
True,descending_odd,2,1,15
game_state,user_action,attempt,caregiver_feedback,react_time,caregiver_assistance,user_react_time,from,elapsed_time,to,timeout,token_id
0,1,0,0,0.0,0,2,19,0.0,19,0,135
0,2,1,0,15,0,0,,0,,0,
0,0,2,0,6.416,0,1,8,0.916,1,1,565
0,2,0,0,15,0,0,,0,,1,
0,0,1,0,0.785,0,2,6,0.772,2,2,499
1,2,0,0,15,0,0,,0,,2,
1,0,1,0,7.12,0,1,9,0.475,3,3,321
1,2,0,0,15,0,0,,0,,3,
1,1,1,0,2.044,0,2,15,0.99,0,4,177
1,0,2,0,0.0,0,2,18,0.0,4,4,311
2,0,0,0,0.0,0,2,15,0.0,5,4,177
tot_elapsed_time,avg_lev_assistance,tot_react_time,n_timeout,n_attempt,n_sociable
3.1530000000000005,0.0,16.365000000000002,14,11,0
user_action,game_state,attempt,agent_assistance
0,0,0,0
0,0,0,1
2,1,0,0
0,1,1,2
1,1,0,1
0,1,1,3
1,2,0,1
0,2,1,2
cum_elapsed_time,to,cum_react_time,from,timeout,user_action,token_id,caregiver_feedback,avg_caregiver_assistance_per_move,attempt
0.0,1,0.0,1,0,,715,0,0.0,1
0.0,2,0.0,7,0,,671,0,0.0,1
0.0,3,0.0,16,1,,667,0,0.0,2
0.0,4,0.0,12,1,,661,0,0.0,2
0.0,5,0.0,14,1,,619,0,0.0,2
with_feedback,objective,session,user_id,timeout
True,descending_odd,3,1,15
game_state,user_action,attempt,caregiver_feedback,react_time,caregiver_assistance,user_react_time,from,elapsed_time,to,timeout,token_id
0,0,0,0,0.0,0,2,1,0.0,1,0,715
0,0,0,0,0.0,0,2,7,0.0,2,0,671
1,2,0,0,15,0,0,,0,,0,
1,0,1,0,0.0,0,2,16,0.0,3,1,667
1,1,0,0,0.0,0,2,12,0.0,0,1,661
1,0,1,0,0.0,0,2,12,0.0,4,1,661
2,1,0,0,0.0,0,2,14,0.0,0,1,619
2,0,1,0,0.0,0,2,14,0.0,5,1,619
tot_elapsed_time,avg_lev_assistance,tot_react_time,n_timeout,n_attempt,n_sociable
0.0,0.0,0.0,3,8,0
......@@ -165,8 +165,8 @@ parser.add_argument('--with_feedback', '--f', type=eval, choices=[True, False],
args = parser.parse_args()
run_batch = True
from_id = 1
to_id = 10
from_id = 11
to_id = 18
if run_batch == False:
user_id = args.user_id
......@@ -302,13 +302,10 @@ else:
max_value_for_user = 15
max_value_for_assistance = 30
attempt_preferences_for_correct_move = attempt_given_user#[2, 3, 4, 4]
assistance_preferences_for_correct_move = user_given_assistance#[2, 3, 3, 4, 5, 5]
game_preferences_for_correct_move = game_given_user#[2, 3, 4]
assistance_preferences_for_correct_move_game_attempt = assistance_given_attempt_game#[[4, 5, 2, 1, 1, 1],
# [1, 3, 5, 3, 1, 1],
# [1, 2, 2, 5, 4, 1],
# [1, 1, 2, 5, 4, 4]]
attempt_preferences_for_correct_move = attempt_given_user
assistance_preferences_for_correct_move = user_given_assistance
game_preferences_for_correct_move = game_given_user
assistance_preferences_for_correct_move_game_attempt = assistance_given_attempt_game
user_action_vars = ["(correct)", "(wrong)", "(timeout)"]
agent_assistance_vars = ["(lev_0)", "(lev_1)", "(lev_2)", "(lev_3)", "(lev_4)", "(lev_5)"]
......@@ -358,6 +355,7 @@ else:
str(bn_models.assistance_preferences[elem][1])+","+
str(bn_models.assistance_preferences[elem][2])+"; \n")
user_model.write("}")
user_model.close()
agent_model.write("probability (agent_assistance | game_state, attempt) { \n")
bn_models.agent_assistance_preferences_on_attempt_game = bn_models.get_agent_assistance_given_attempt_and_game_state(assistance_preferences_for_correct_move_game_attempt)
......@@ -377,6 +375,8 @@ else:
)
it += 1
agent_model.write("}")
agent_model.close()
print(bn_models.attempt_preferences)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment