rate: a desk row offers only the buttons that start from its state
The first desk score offered every button of the bucket, where portal shows a row only the moves from its own state; that scored the live vel 17 of 26 and sent a rewrite of the neighbour-help desk chasing an instrument fault. With the row's buttons only: 24 of 26, and the rewrite loses on the fair test too. Noted: an accent-stripped state id (ikke_lost) reads as English even to a strong picker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
9089503524
commit
8e6a93ebb7
+15
-4
@@ -307,19 +307,30 @@ pub fn rate(argv: &[String]) -> anyhow::Result<()> {
|
||||
if !desks.is_empty() {
|
||||
println!("{:<20} {:<24} {:>8} {}", "desk", "bucket", "buttons", "mistaken for");
|
||||
for (page, group, bucket, moves) in &desks {
|
||||
let labels: Vec<&str> = moves.iter().map(|(_, _, l)| l.as_str()).collect();
|
||||
// A desk row shows only the buttons that start from the
|
||||
// row's state, so those are the ones the worker chooses
|
||||
// among; a state with one button has nothing to confuse.
|
||||
let mut right = 0;
|
||||
let mut asked = 0;
|
||||
let mut mistaken = Vec::new();
|
||||
for (i, (from, to, label)) in moves.iter().enumerate() {
|
||||
let labels: Vec<&str> = moves.iter().filter(|(f, _, _)| f == from).map(|(_, _, l)| l.as_str()).collect();
|
||||
if labels.len() < 2 {
|
||||
continue;
|
||||
}
|
||||
asked += 1;
|
||||
let picked = button_pick(&cmd, group, bucket, from, to, &labels, i)?;
|
||||
if picked == *label {
|
||||
right += 1;
|
||||
} else {
|
||||
mistaken.push(format!("{to} as {picked:?}"));
|
||||
mistaken.push(format!("{from}>{to} as {picked:?}"));
|
||||
}
|
||||
}
|
||||
println!("{:<20} {:<24} {:>3} of {:<2} {}", page, bucket, right, moves.len(), mistaken.join("; "));
|
||||
report.insert(format!("desk {page} {bucket}"), json!({ "right": right, "of": moves.len(), "mistaken": mistaken }));
|
||||
if asked == 0 {
|
||||
continue;
|
||||
}
|
||||
println!("{:<20} {:<24} {:>3} of {:<2} {}", page, bucket, right, asked, mistaken.join("; "));
|
||||
report.insert(format!("desk {page} {bucket}"), json!({ "right": right, "of": asked, "mistaken": mistaken }));
|
||||
}
|
||||
println!();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user