Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/solvers/logit/efglogit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ LogitBehaviorSolve(const LogitQREMixedBehaviorProfile &p_start, double p_regret,
double p_firstStep, double p_maxAccel,
MixedBehaviorObserverFunctionType p_observer)
{
if (p_start.size() == 0) {
return {p_start};
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand All @@ -321,7 +324,6 @@ LogitBehaviorSolve(const LogitQREMixedBehaviorProfile &p_start, double p_regret,
if (scale != 0.0) {
p_regret *= scale;
}

const Game game = p_start.GetGame();
Vector<double> x(ProfileToPoint(p_start));
TracingCallbackFunction callback(game, p_observer);
Expand All @@ -347,6 +349,9 @@ LogitBehaviorSolveLambda(const LogitQREMixedBehaviorProfile &p_start,
double p_firstStep, double p_maxAccel,
MixedBehaviorObserverFunctionType p_observer)
{
if (p_start.size() == 0) {
return {p_start};
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand Down Expand Up @@ -380,6 +385,9 @@ LogitBehaviorEstimate(const MixedBehaviorProfile<double> &p_frequencies, double
MixedBehaviorObserverFunctionType p_observer)
{
const LogitQREMixedBehaviorProfile start(p_frequencies.GetGame());
if (start.size() == 0) {
return start;
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand Down
9 changes: 9 additions & 0 deletions src/solvers/logit/nfglogit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ LogitStrategySolve(const LogitQREMixedStrategyProfile &p_start, double p_regret,
double p_firstStep, double p_maxAccel,
const MixedStrategyObserverFunctionType &p_observer)
{
if (p_start.size() == 0) {
return {p_start};
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand Down Expand Up @@ -385,6 +388,9 @@ LogitStrategySolveLambda(const LogitQREMixedStrategyProfile &p_start,
double p_firstStep, double p_maxAccel,
const MixedStrategyObserverFunctionType &p_observer)
{
if (p_start.size() == 0) {
return {p_start};
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand Down Expand Up @@ -418,6 +424,9 @@ LogitStrategyEstimate(const MixedStrategyProfile<double> &p_frequencies, double
MixedStrategyObserverFunctionType p_observer)
{
const LogitQREMixedStrategyProfile start(p_frequencies.GetGame());
if (start.size() == 0) {
return start;
}
PathTracer tracer;
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);
Expand Down
Loading