From b6f32ee5cdd219d44065a6f3602c2cbbc402a533 Mon Sep 17 00:00:00 2001 From: rupa Date: Fri, 18 Jan 2013 19:44:28 -0500 Subject: [PATCH] Change aging algorithm. Aging happens when the sum of rankings passes a threshold. Raise this threshold from 1000 to 6000. Change aging multiplier from .9 to .99. This formula is still pretty naive, and wants improvement, but seems to be nicer. The previous constants tended to forget things too fast. Closes #53, for now. --- z.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/z.sh b/z.sh index 25e2d2f..e5056fa 100755 --- a/z.sh +++ b/z.sh @@ -62,8 +62,8 @@ _z() { count += $2 } END { - if( count > 1000 ) { - for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging + if( count > 6000 ) { + for( i in rank ) print i "|" 0.99*rank[i] "|" time[i] # aging } else for( i in rank ) print i "|" rank[i] "|" time[i] } ' 2>/dev/null >| "$tempfile"