Skip to content

Commit 4a86ceb

Browse files
author
Frankie Robertson
committed
Fix estimator_compare to use prompt_response
1 parent f9680a6 commit 4a86ceb

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

experiments/estimator_compare.jl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,7 @@ function main()
4343
function get_response(response_idx, response_name)
4444
params = item_params(item_bank, response_idx)
4545
println("Parameters for next question: $params")
46-
options = potential_answers[response_idx, :]
47-
options_fmt = join(options, "/")
48-
49-
function get_word(idx)
50-
while true
51-
print("Which two of $options_fmt have the same meaning $idx/2 (blank = do not know) > ")
52-
word = readline()
53-
if strip(word) == ""
54-
return nothing
55-
end
56-
if word in options
57-
return word
58-
end
59-
println("Could not find $word in $options_fmt")
60-
end
61-
end
62-
word1 = get_word(1)
63-
word2 = get_word(2)
64-
if word1 === nothing || word2 === nothing
65-
return 0
66-
end
67-
return Set([word1, word2]) == Set(gold_answers[response_idx, :]) ? 1 : 0
46+
prompt_response(response_idx)
6847
end
6948
function new_response_callback(tracked_responses, terminating)
7049
if tracked_responses.responses.values[end] > 0

0 commit comments

Comments
 (0)