Skip to content

Commit

Permalink
Added new Agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
gstamatakis committed Dec 30, 2017
1 parent 9b57ab2 commit 1fa41ea
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 2 deletions.
86 changes: 86 additions & 0 deletions src/BestAgentWithoutMem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import Core.ThrashAgent;
import Utils.SearchMethodEnum;
import Utils.SimulatedAnnealingParams;
import Utils.StrategyEnum;
import Utils.ValFreqEnum;
import negotiator.parties.NegotiationInfo;

import java.util.Random;

public class BestAgentWithoutMem extends ThrashAgent {

@Override
public void init(NegotiationInfo info) {
super.init(info);
}

@Override
public Random getRand() {
return new Random();
}

@Override
public StrategyEnum getAgentStrategy() {
return StrategyEnum.Threshold;
}

@Override
public SearchMethodEnum getSearchingMethod() {
return SearchMethodEnum.SimulatedAnnealing;
}

@Override
public ValFreqEnum getFrequencyValueSelection() {
return ValFreqEnum.ValueFreq;
}

@Override
public SimulatedAnnealingParams getSimulatedAnnealingParams() {
return new SimulatedAnnealingParams(1.0, 0.001, 0.999, 1);
}

@Override
public double getBidUtilThreshold() {
return 0.96;
}

@Override
public double getTimeScalingFactor() {
return 0;
}

@Override
public double getCutoffValue() {
return 1e-5;
}

@Override
public double getVetoVal() {
return 0.00;
}

@Override
public boolean useHistory() {
return false;
}

@Override
public double getSoftConcessionThreshold() {
return 0.9;
}

@Override
public double getConcessionThreshold() {
return 0.98;
}

@Override
public int getMemoryDepth() {
return 1;
}

@Override
public String getDescription() {
return "Th SA Std";
}
}
4 changes: 2 additions & 2 deletions src/Core/BidHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ public void setBestOppVals(Opponent opponent, AgentID sender) {
}

public double getLuckyValue(AgentID partyId) {
double val = 0.999;
double val = 1.0;
try {
for (int i : acceptedUtils.get(partyId.getName()).keySet()) {
val = Math.min(acceptedUtils.get(partyId.getName()).get(i), val);
}
} catch (Exception ignored) {
}
gLog.println("Lucky val for " + partyId.getName() + ": " + val);
return val;
return 1.0;
}
}

0 comments on commit 1fa41ea

Please sign in to comment.