[Cs5500] tiny amount
Ahmed Abdelmeged
mohsen at ccs.neu.edu
Fri Dec 2 14:26:55 EST 2011
Numerical instability in ProtocolInterpreter. Should be an easy exercise.
protected void updateReputation(int playerNum, double result) {
if(updateReputationsOnlyWhenBobLoses && playerNum != 1) return;
RemotePlayerProxy player1 = players[playerNum];
RemotePlayerProxy player2 = players[1 - playerNum];
double player1InitialReputation = player1.getReputation();
double player2InitialReputation = player2.getReputation();
players[playerNum].setReputation(players[playerNum].getReputation()
+ claim.getConfidence() * result);
players[1 - playerNum].setReputation(players[1 -
playerNum].getReputation() - claim.getConfidence() * result);
double player1FinalReputation = player1.getReputation();
double player2FinalReputation = player2.getReputation();
if(player1FinalReputation - player1InitialReputation >= 0){
winner = player1.getName();
pointsWon = player1FinalReputation - player1InitialReputation;
}else{
winner = player2.getName();
pointsWon = player2FinalReputation - player2InitialReputation;
}
}
On Fri, Dec 2, 2011 at 1:20 PM, Karl Lieberherr <lieber at ccs.neu.edu> wrote:
> Hi Ahmed:
>
> How is it possible that the winner wins only a tiny amount with refuting:
>
> claim mmg.MMGInstanceSet {{ }} scg.protocol.ForAllExistsMax {{
> }} 0.6180339887498949 1.0
> proposer {{ TheGreatGonzo }}
> opposer {{ danset }}
> action refuting
> responses provider {{ danset }} pr provide mmg.MMGInstance {{
> 0.5849833561100104 }}
> provider {{ TheGreatGonzo }} pr solve mmg.MMGSolution {{
> 0.7047709588046943 }}
> winner {{ TheGreatGonzo }}
> pointsWon 1.000017846308765E-10
>
> -- Karl
>
>
--
Ahmed
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the Cs5500
mailing list