How is granted credit is determined

Message boards : Number crunching : How is granted credit is determined
Message board moderation

To post messages, you must log in.

AuthorMessage
Tetsuji Maverick Rai
Volunteer tester
Avatar

Send message
Joined: 25 Apr 99
Posts: 518
Credit: 90,863
RAC: 0
Japan
Message 134344 - Posted: 8 Jul 2005, 17:48:48 UTC
Last modified: 8 Jul 2005, 17:57:57 UTC

I found a code to determine the granted credit from 2 or more valid credits.

It's self-explanatory and easy to read.

this code

see below
// the granted credit is the average of claimed credits
// of valid results, discarding the largest and smallest

line and you'll understand. (sorry I don't know how to put the code in this message board. It's displayed in a strange format.)
Luckiest in the world. WMD = Weapon of Mass Distraction.
Click this table.
ID: 134344 · Report as offensive
Digitalis
Volunteer tester
Avatar

Send message
Joined: 24 Jul 99
Posts: 93
Credit: 85,678
RAC: 0
Ireland
Message 134365 - Posted: 8 Jul 2005, 18:10:44 UTC - in response to Message 134344.  
Last modified: 8 Jul 2005, 18:28:50 UTC

I found a code to determine the granted credit from 2 or more valid credits.

It's self-explanatory and easy to read.

this code

see below
// the granted credit is the average of claimed credits
// of valid results, discarding the largest and smallest

line and you'll understand. (sorry I don't know how to put the code in this message board. It's displayed in a strange format.)


Like this?

  // the granted credit is the average of claimed credits
        // of valid results, discarding the largest and smallest
        //
        if (nvalid == 2) {
            granted_credit = min_credit;
        } else {
	    // Take care of case where all claimed credits are equal.
	    if (max_credit == min_credit) {
		granted_credit = min_credit;
	   } else {
           	sum = 0;
            	for (k=0; k

Well I started out thinking "this will be easy" but for some reason if I try to post anything beyond the final k it gets truncated and the formatting is lost. A problem with the forum I think.

ID: 134365 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 134398 - Posted: 8 Jul 2005, 18:58:53 UTC
Last modified: 8 Jul 2005, 19:01:34 UTC

use "<pre>" and you also have to convert all the < and > into &lt; and &gt;

        // the granted credit is the average of claimed credits
        // of valid results, discarding the largest and smallest
        //
        if (nvalid == 2) {
            granted_credit = min_credit;
        } else {
	    // Take care of case where all claimed credits are equal.
	    if (max_credit == min_credit) {
		granted_credit = min_credit;
	   } else {
           	sum = 0;
            	for (k=0; k<results.size(); k++) {
	    		if (!sah_results[k].have_result) continue;
               	 	if (results[k].validate_state != VALIDATE_STATE_VALID) continue;
               		if (k == max_credit_i) continue;
               	 	if (k == min_credit_i) continue;
               	 	sum += results[k].claimed_credit;
            	}
            	granted_credit = sum/(nvalid-2);
	   }
        }
        for (k=0; k<results.size(); k++) {
            if (results[k].validate_state == VALIDATE_STATE_VALID) {
                results[k].granted_credit = granted_credit;
            }
        }
    } else {
        canonicalid = 0;
    }

    retval = 0;
return_retval:
    return retval;
}

ID: 134398 · Report as offensive
Tetsuji Maverick Rai
Volunteer tester
Avatar

Send message
Joined: 25 Apr 99
Posts: 518
Credit: 90,863
RAC: 0
Japan
Message 134418 - Posted: 8 Jul 2005, 20:01:23 UTC - in response to Message 134398.  
Last modified: 8 Jul 2005, 20:13:58 UTC

use "<pre>" and you also have to convert all the < and > into < and >
---snip---


Thanks. This is what I wanted to quote :) This describes how to calculate granted credits, except that this doesn't tell what triggers this caluculation;

When only 2 valid results are present, the lowest is granted.
When 3 valid results are present, the highest and the lowest credits are discarded, and the middle value is granted. When 4 or more valid results are present (for ex, after long outage, many results have been waiting for validation), the highest and the lowest values are discarded, and the average of the other claimed credits is granted. Precisely speaking, calculation is the same either when 3 valid results are present or when 4 or more valid resuls are present. I think I have understood,

YES, I must have understood!! :)

Luckiest in the world. WMD = Weapon of Mass Distraction.
Click this table.
ID: 134418 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 134455 - Posted: 8 Jul 2005, 22:40:41 UTC

I think I said that in the Wiki ... I will have to try to remember to look at it tomorrow to see if we are that clear as that is what it is ...
ID: 134455 · Report as offensive

Message boards : Number crunching : How is granted credit is determined


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.