Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#35 tree window doesnt show bad lines in green/red

v.4.4
wont-fix
nobody
None
5
2013-04-08
2011-08-03
Anonymous
No

when i use a database and use the tree window it will not show all bad/good lines in red/green even if the percentage for it is 60% and there are 2000 games in the line. as far as i understood the help files this should be a bug. also its bad that the table is not alligned so the numbers confuse the eye totally.

Discussion

  • Fulvio
    Fulvio
    2013-04-08

    The red/green of the tree window is based on the expected score, not the raw percentage of wins.
    Below the current code:

    proc ::tree::getColorScore { line } {
    set data [::tree::getLineValues $line]
    if { $data == {} } { return "" }
    set ngames [lindex $data 0]
    set freq [lindex $data 1]
    set success [lindex $data 2]
    set eloavg [lindex $data 3]
    set perf [lindex $data 4]
    if { $ngames < $::tree::scoreHighlight_MinGames } {
    return ""
    }
    set wavg [ expr 50 + $::tree::scoreHighlight_WhiteExpectedScoreBonus ]
    set bavg [ expr 50 - $::tree::scoreHighlight_WhiteExpectedScoreBonus ]
    if { [sc_pos side] == "white" && $success > [ expr $wavg + $::tree::scoreHighlight_Margin ] || \ [sc_pos side] == "black" && $success < [ expr $wavg - $::tree::scoreHighlight_Margin ] } {
    return greenfg
    }
    if { [sc_pos side] == "white" && $success < [ expr $wavg - $::tree::scoreHighlight_Margin ] || \ [sc_pos side] == "black" && $success > [ expr $wavg + $::tree::scoreHighlight_Margin ] } {
    return redfg
    }
    return ""
    }

     
  • Fulvio
    Fulvio
    2013-04-08

    • status: open --> wont-fix
    • milestone: --> v.4.4